Hough Circles Detection CPU and GPU - min distance parameter

asked 2016-09-21 15:36:45 -0500

Hello!

I do not understand how parameter minimum distance works in GPU HoughCircles function. In CPU version it works properly and means minimum acceptable distance between center of two circles in pixels. With GPU version I cannot get good results even for simply problem what is easy for CPU function. I think the reason is minimum distance parameter which behaves really strange when I am changing it. For example the number of false circles increase even when I use bigger or smaller values than some optimal value which I get experimentally. For value like 20 I am still getting circles with the same position and diffrence in radius 2-5. I know that GPU functions are parallel. I also saw this topic: http://answers.opencv.org/question/20... . But I still not understand why filtration at the end of execution can't be better. It seems that I must make myself auxiliary filtration to remove false circles.

Regards, ksiadz13

edit retag flag offensive close merge delete

Comments

And did you try the suggestion of the topic you quote to simply use your own filtration after getting all the circles? It is basically an euclidean distance calculation between all circle centers.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-09-22 06:16:10 -0500 )edit

Yes I did my own filtration and it works correctly. What is more in own filtration it is possible to distinguish two circles with the same center and different radius. In CPU function it not works (I read not check yet).

I am asking because maybe someone could explain me how I should understand min distance parameter in GPU function because now I must set it experimentally. In CPU function it is easier - just pixel distance.

In the following executions of GPU function vary not only the sequence but also the number of detected circles. Sequence is related to how individual threads are ending their tasks. The different number of circles may mean that filtration which is being done includes only threads in one block. That is just my supposition but maybe someone can say if I am right.

ksiadz13 gravatar imageksiadz13 ( 2016-09-22 07:18:15 -0500 )edit