Hought Circle coin detection variation

asked 2016-05-27 06:00:50 -0500

crazy gravatar image

I am working on getting coin diameter in pixels using OpenCV but I am not able to get perfect pixels diameter as it varies from 2- 6 pixels randomly by taking a image from same height. I am using HOughCircle method for coin detection. Is there any way by which pixels diameter always remain same from same height. it should not vary or any improvement.

edit retag flag offensive close merge delete


Thats the downside of lighting variances and noise on your camera combined with the fitting of the Hough Circle detector. There is no way to avoid this rather then smoothing over time, which is probably not possible here?

StevenPuttemans gravatar imageStevenPuttemans ( 2016-05-27 08:19:59 -0500 )edit

Coins do vary. I used to work on coin op car washes and a new coin acceptor company was out to build the best coin acceptor out there and win the casino market. They discovered the same thing you are discovering, coins vary, .... a lot. No way to correct that part of it. Not sure why you would need them all to be the same.....but if you do, you are out of luck. You need quite a bit of tolerance for coins....you will never get the same diameter because they are not the same.

jmbapps gravatar imagejmbapps ( 2016-05-27 19:41:04 -0500 )edit

@StevenPuttemans, @jmbapps Is there any other possible solution by which I will able to get accurate diameter of coin?

crazy gravatar imagecrazy ( 2016-05-28 11:44:58 -0500 )edit

It has been over 10 years...but I believe coins are 'out of round' as well, meaning that they are never perfectly round. This means the diameter will vary depending on where you measure it, if I remember right. The diameter will vary, which means your parameters will have to be more forgiving, and not so exact, in my opinion.

jmbapps gravatar imagejmbapps ( 2016-05-29 08:43:31 -0500 )edit

@StevenPuttemans , @jmbapps Is there any way for circle(dark black circle on white paper) detection which give always same diameter means there should be a no variation or very less variation. As right now I am using black circle on white paper yet same variation coming.

crazy gravatar imagecrazy ( 2016-05-30 00:47:00 -0500 )edit

It is inevitable when using vision based metrics. If you want exact metrics, you will need to go for a mechanical approach, which is way more accurate.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-05-30 02:58:02 -0500 )edit

@StevenPuttemans what is mechanical approach?

crazy gravatar imagecrazy ( 2016-06-07 06:06:33 -0500 )edit

That means that you use electrical grippers to define the size of the coin. You simply leave out houghcircles or you look for a technique with higher accuracy.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-06-19 15:25:52 -0500 )edit