Saturday, 31 August 2013

How to detect only single color such as Red, Blue or Green from an image using Java or Processing?

How to detect only single color such as Red, Blue or Green from an image
using Java or Processing?

I am working on a robotics project in which I have to some image
processing in order to recognize blue colored objects, red colored
obstacles, and green colored destination. I am using java for Image
Processing.
Right now, I have been able to locate Red, Green, and Blue colored objects
using Blobscanner library. But the difficulty is that, my algorithm only
works fine when the background is pure Black. Because I am using RGB color
model, and in RGB, black is represented as 0,0,0 and white as 255,255,255
and gray color also has some red component in it, so it also gets detected
by the algorithm. I don't know the algorithm which exactly pinpoints the
red color ignoring others.
Please help me detect only red color (and its other shades) in any image.

No comments:

Post a Comment