Just as a forewarning, I don’t have much experience with programming or machine vision. But…
I am working on a project where I would like the OpenMV Cam to look at a product and tell me if there are 3 small lights present. Two of the lights should be solid and one light should be blinking at a certain rate. The lights are each a different color, and the camera will be fixed in place. I was thinking I would have to combine the find_circles example with a color tracker example, but I’m not sure.
I was hoping for any helpful tips or a point in the right direction. Any help would be greatly appreciated.
Hi, just start with the color tracking examples and you’ll be fine. This is very easy to do. Use the Threshold Editor under OpenMV IDE → Tools → Machine Vision to edit the tracking colors.
If you’re having problems with the camera’s exposure see the sensor control scripts for how to control that.
Thank you for the tips! It’s working for the most part, except the camera is picking up the yellow color at the red light location. Please advise if there is an easy solution to this.
Hi, yellow and red are similar. You need to shrink the red color bounds to remove the yellow color. Note that you needn’t get rid of all pixels. Just remove enough of them and then hae object area/pixel filterting take care of the small blobs. See the pixel/area parameter on find_blobs().
Thank you, you have been extremely helpful. I do have one last question: How can I use python to run the Locate_colors.py on the OpenMV camera? I’m trying to use pyserial to open the serial, but I’m not sure how to run the specific Locate_colors.py program and acquire that output. Any tips would be greatly appreciated. Thank again.
Thank you! That example is for accessing the images from the camera though; are there examples for accessing the output that would normally be displayed in the Serial Terminal of OpenMV IDE?