edge detection iphone opencv

馋奶兔 提交于 2019-12-11 06:16:39

问题


My application is to detect coins. I have done most of it using OpenCv . Am using CannyDetection and houghTransform to detect circles of image.

But am not getting right circles of coins, I think it might be problem with ThresoldValues passing to cannyEdgeDetector. Can any one tell me how to choose thresold values for detecting circles of coins.


回答1:


Unfortunately, there's no magic number for that. The circles detection depend a lot on the parameters you pass to cvHoughCircles(), and they are sensitive to the size of the coin which changes according to the proximity of the camera.

Check this answer for example: Simple object detection using OpenCV and machine learning

That example works wonders for that specific size of coins. But if it was being capture by a camera and we moved it, the size of the coins would change and the application wouldn't be able to provide such accurate results anymore.

What I'm saying is you need to work with a fixed distance between your camera and the coins for this approach to work. Find an appropriate distance that suits you and then tweak the parameters of the functions until you are satisfied.



来源:https://stackoverflow.com/questions/6407938/edge-detection-iphone-opencv

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