GPU Hough (Bug #3271)


Added by Marco Colaprico over 11 years ago. Updated over 11 years ago.


Status:Cancelled Start date:2013-09-19
Priority:Normal Due date:
Assignee:Vladislav Vinogradov % Done:

50%

Category:gpu (cuda)
Target version:2.4.7
Affected version:2.4.6 (latest release) Operating System:Linux
Difficulty: HW Platform:x64
Pull request:

Description

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

Work flow is: cvtColor, GaussianBlur, HoughCricle
System: Ubuntu 12.04 lts, OpenCV 2.4.6.1


main.cpp - main program (2 kB) Marco Colaprico, 2013-09-20 11:32 am

FindBottles.pro - Qt project file with OpenCV set (212 Bytes) Marco Colaprico, 2013-09-20 11:32 am


Associated revisions

Revision f187fd99
Added by Vadim Pisarevsky over 10 years ago

Merge pull request #3271 from mgeorg:reset_ffmpeg_mutex

History

Updated by Marco Colaprico over 11 years ago

Marco Colaprico wrote:

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

Work flow is: cvtColor, GaussianBlur, HoughCricle
System: Ubuntu 12.04 lts, OpenCV 2.4.6.1

  • Assignee set to Vadim Pisarevsky

Updated by Daniil Osokin over 11 years ago

Marco, please attach a test to reproduce this bug.

  • Assignee changed from Vadim Pisarevsky to Marco Colaprico
  • Category set to gpu (cuda)
  • Target version set to 2.4.7

Updated by Marco Colaprico over 11 years ago

Hi Daniil,
this is the test program: it is a bottle counter. I have disable tracking phase, so there is only circle detection. For the entire video it counts:
5959 at first execution, 5953 at the second one, 5959 and 5962, and so on.
The same program, on the same video.

There is a problem: how can i share the video processed? it is 90 MB about.

Thanks a lot!

Updated by Vladislav Vinogradov over 11 years ago

  • Assignee changed from Marco Colaprico to Vladislav Vinogradov

Updated by Vladislav Vinogradov over 11 years ago

Hello Marco Colaprico!

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.

Updated by Marco Colaprico over 11 years ago

  • % Done changed from 0 to 50

Updated by Anna Kogan over 11 years ago

Vlad, so this behavior is OK - it's not a bug? If yes, we can close the ticket.

Updated by Anna Kogan over 11 years ago

  • Status changed from New to Open

Updated by Vladislav Vinogradov over 11 years ago

  • Status changed from Open to Cancelled

Also available in: Atom PDF