1 | initial version |
You can do a threshold to first get all of the circles from the background.
Find contours and determine which are circles based on shape similarity etc.
Then use each contour to form a mask for each circle.
Then you can use basic averages for each contour to assess it's colour.
The inRange function is another option for fast segmentation by known colour.
Also, only green circles will appear in the green channel of the RGB image. Black is 0 in all channels.