views:

27

answers:

1

For this picture:
How do I make filter that returns true on brown color (insect) and false on background?

+3  A: 

Choose an RGB value that represents brown. Then for each pixel, calulate e.g. the Euclidean distance in RGB space, and apply a threshold to the result.

RGB may not be the best colour space.

Oli Charlesworth
What is the best color space?
Miko Kronn
I have no idea. Try RGB first. If that doesn't work, then investigate other colour spaces.
Oli Charlesworth