1

I need to count the number of pixels in an image (loaded via OpenCV in Python), which have a certain color.

However, I don't need to count one specific color (= RGB combo), but also pixels with a color close to that color I am looking for.

See for example this image:

enter image description here

Here I need to count the number of pixels that have this light green-blue color. But as you can see there is not only one single RGB combo with this color, there is a range of colors in this green-blue-ish tone.

What would be a fast way to count not only those pixels with a certain color value but also pixels that are "close" to this value? 

Matthias
  • 9,817
  • 14
  • 66
  • 125

0 Answers0