Green contours surround 2 varroa mites
My beekeeping journal
I have several notebooks to journal my hobbies. There is one for the backyard chickens and one for the worm farm - you get the idea, I’m a mess! What’s going on in these journals? Usually, it's just my pencil or ink block letter writings, but when I get excited about a topic, out comes the straight edge and I draw with a mechanical pencil, colored pencil, and highlighter.
The big picture
I usually capture photographs of my counting board and hive inspections for ease of use when I later write in my beekeeping journal or need to capture time and date for my blog. Here, I’m focusing on my counting board debris for a small spring swarm trap capture and using a chatbot interface (for example, ChatGPT). In the spring, the debris begins as beautiful, clear wax mirrors; over time, I see grainy lumps of pollen; then darker wax cappings appear.
In the summer, I find small hive beetles and female varroa mites in my debris observations. For spotting tiny varroa mites, I use a magnifying glass and methodically raster scan (line by line style) the counting board. The mites are approximately 2mm in width (left-to-right) and are nearly all found resting on their feet (back facing upwards). If you look closely you can see their feet sticking out on the mouth side of the insect. I asked the chatbot 1) what is the size of the varroa mite, and 2) is a varroa mite an insect? The chatbot supported this observation as a female mite and goes on to say that a male mite is much smaller and rarely seen outside the brood cell. Here’s a table that chatbot produced. The table values look reasonable, but if you type “add sources” to the chatbot reply, you might be more confident with the results.
Trait | Insects | Arachnids (like Varroa mites) |
---|---|---|
Body segments | 3 (head, thorax, abdomen) | 2 (cephalothorax, abdomen) |
Legs | 6 | 8 |
Antennae | Yes | No |
Taking the iPhone photo
Here are my steps to photograph the debris board.
- Place the debris board in bright indirect sunlight
- Touch the iPhone screen to focus
- Adjust the brightness slider (icon looks like the sun) until the debris-free region matches the expected white color
Computer vision prototyping
I typed “how to get started with OpenCV and Python” into the chatbot prompt and followed the numbered steps. I made incremental progress by replying to the chatbot with write code using OpenCV and Python to: 1) read my JPG file, 2) define the mite color by clicking on the image, 3) calculate a mask using color distance, 4) dilate the mask, 5) threshold the mask, 6) find external and internal contours, 7) filter contours with area limits, 8) filter contours with approximate convexity limits, 9) filter contours with approximate circularity limits, 10) draw the filtered contours on the my JPG using a heavy green line, and 11) write this result to an image file. This seems like lots of work, but it's a factor of 10 easier than writing my own code from scratch. Sometimes the chatbot would suggest that I upload the file to execute all the steps for me. FYI, there is a “+” icon near the prompt area to browse your computer and upload your JPG file.The mites are reddish-brown and have a shiny spot when their backs are facing the iPhone. In photography, the shiny spot is often referred to as a "specular highlight", and this requires infilling with the processing step #4, dilation.
Computer Vision Conclusion
To detect all the mites I had to trial-and-error adjust my program limits to include non-mite debris. The computer vision project was interesting, but I quickly reached the pixel limit of my iPhone and my hobby lighting skills. The best news, the filtered contours drew my attention to a few mites that I missed without the program.
No comments:
Post a Comment