Detecting a circle of a specific color (or gray level) with openCV

微笑、不失礼 提交于 2019-12-03 21:34:03

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!