Ask Your Question

Yothri's profile - activity

2017-03-13 05:35:46 -0600 commented question Filter out different colors from image

I did what I just said, defining an upper and a lower Scalar which defines a range for the color I want. Using inrange() i get the mask then. That works for some colors, but for example in HSV color space, red has two color ranges. So I ended up getting 2 masks, and add them together to get red working.

Anyways, if there is someone who has a better solution for this, or more stuff I could try out, please let me know. Also @LBerger, could you explain your first comment a little more? Summing up rows to find color values?

2017-03-12 10:39:30 -0600 commented question Filter out different colors from image

Not sure if I got that correctly.

Wouldn't it be enough to convert the Mat to HSV, define two Scalars with min and max Hue Saturation and Value and use inRange to filter the color with the specific range out? Then i should have an image with only the color I specified where i can simply get the line from it? Question is, how accurate is this...

Or is that a waste of time?

2017-03-12 08:32:32 -0600 asked a question 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 :)