Ask Your Question

Revision history [back]

Filter out different colors from image

Hello, I do have the following image. This represents a wheel profile with several colored markings. My aim is to filter out these colored lines, get the color and the position in y coordinate on the wheel. puu.sh/uFthR/4669730c31.bmp

(The image quality is way better in an original image, couldnt upload such a big image)

There can be other colors like red, green blue, yellow, brown, even white, but not black, purple... and so on. Up to 10 different colors.

I would like to create a function where I can put min and max values for RGB and using this range, it should create a mask where I then can use HoughLinesP to get the colored line.

I thought of that as the best way to get these colored lines. If anyone has a better idea on how I could solve this problem, please let me know, I am very new to OpenCV and image processing in general.

I already got some progress on finding at least some of the colors using a post from stackoverflow (I cant post links yet)

But unfortunately I was getting problems already when looking for yellow color lines. Since I also need to find white lines, I am not entirely sure, if this way is the best way to use.

So that is why I ask you guys, if there is maybe a better way on finding different color lines in that kind of image.

Thank you in advance :)