问题
Is there a way to detect a circle with a specific grey level using openCV? I want to detect a circle that marks out from the others.
Currently, I'm using cvHoughCircles to detect my circles. I know the method returns an array of cvSeq containing the info on each circle (point and radius), but it does not provide any color information.
Thank you
回答1:
You should first isolate the colour you want, and then do a houghcircles on that image.
Say you want to find green circles from a bunch of green, red and blue circles. Its simple in this case, just threshold the green channel. You'll get only the green circle in the thresholded image. Do a sobel/canny on it and execute houghcircles.
来源:https://stackoverflow.com/questions/3198237/detecting-a-circle-of-a-specific-color-or-gray-level-with-opencv