Ask Your Question

OpenCV Hough on GPU is unstable

asked 2013-09-19 04:33:54 -0600

MarcusCola gravatar image

updated 2013-09-19 04:54:46 -0600

It seems there is a problem with OpenCV Hough implementation on GPU. Application: apply gpu::Hough on a video: it counts 664 objects. Close Application. Restart the same application on the same video: it counts 691 objects. Close Application. Restart the same application on the same video: it counts 667 objects.

Using Opencv Hough on CPU the count is always 662 objects. How is it possible? Thank you

edit retag flag offensive close merge delete


I would suggest creating a bug report, adding sample code, system configuration, and outputs. This will make people aware of the problem and help you identify the reason.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-09-19 04:36:57 -0600 )edit

Ok StevenPuttemans, i have done what you have suggested! I'm waiting for responses. It is incredible!

MarcusCola gravatar imageMarcusCola ( 2013-09-19 08:21:05 -0600 )edit

No response from anyone in . Suggestions?

MarcusCola gravatar imageMarcusCola ( 2013-09-20 02:00:33 -0600 )edit

Being patient for once... It has only be a day since your report. Give people the time to look and investigate the matter.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-09-20 04:28:06 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2013-09-24 07:46:21 -0600

MarcusCola gravatar image

Thansk to Vladislav Vinogradov, i think this could be useful:

HoughCircles performs filtration of detected circles according to min_dist parameter. CPU implementation of HoughCircles is single-threaded, it returns circles in the same order for all launches.

GPU implementation is multi-threaded, and the order of detected circles can be different for different launches.

That's why the filtration stage in GPU implementation can remove different circles for different launches. And it can affect to the total number of detected circles. For example, for 3 circles in one line A B C we can remove central circle B or remove A and C.

If you need to have the same results for all launches, you can disable filtration (set min_dist to zero), sort the output array of detected circles and perform your own filtration.

edit flag offensive delete link more



nice explanation.

berak gravatar imageberak ( 2013-09-24 08:00:42 -0600 )edit

Question Tools

1 follower


Asked: 2013-09-19 04:33:54 -0600

Seen: 402 times

Last updated: Sep 24 '13