HoughCircles call ignores radius parameters (C++; OpenCV 2.4.13)

asked 2020-09-15 10:13:23 -0500

yvkae5 gravatar image

I am having trouble getting a seemingly trivial piece of code to work with OpenCV 2.3-2.4 set of libraries. It works fine with OpenCV 4.x.

It seem that cv::HoughCircles(...) completely ignores minimum radius parameters. I get a vector of circles back (vector<vec3f>) of an enormous size (like 18446743965337911194!) and when I try to print any of the elements I mostly get circles of radius 0 or even negative radius. I am probably missing something simple, but I've already unsuccessfully tried a number of approaches to isolate my issue: played with other input parameters, even passed a completely black image so I would not be able to find any circles. Nothing seems to change the output.

Thanks!

edit retag flag offensive close merge delete

Comments

unfortunately, the 2.x opencv versions are no more maintained

berak gravatar imageberak ( 2020-09-16 01:05:02 -0500 )edit

Thank you. I would not be touching it either, but I am trying to match legacy code output. And because I am getting such outrageous result, it makes me think that I must be missing something.

yvkae5 gravatar imageyvkae5 ( 2020-09-16 09:23:41 -0500 )edit