Miko Kronn
Miko Kronn

Reputation: 2454

Color filter in MATLAB

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

Upvotes: 2

Views: 2234

Answers (1)

Oliver Charlesworth
Oliver Charlesworth

Reputation: 272487

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.

Upvotes: 4

Related Questions