cvHoughCircles(Mat& image, vector<Vec3f>& circles, int method, double dp, double minDist, double param1=100, double param2=100, int minRadius=0, int maxRadius=0)
according to documentation:
param1 – The first method-specific parameter.
in the case of CV_HOUGH_GRADIENT it is
the higher threshold of the two passed
to Canny() edge detector (the lower
one will be twice smaller)
I really don’t understand point of param1 and param2. I’ve tried plenty different values, but still no idea.
Could anyone please explain them to me.
Thanks
Currently, the only implemented method in
cvHoughCircles()isCV_HOUGH_GRADIENT.So,
param1– refers to the edge threshold that will be used by the Canny edge detector (applied to a grayscale image).cvCanny()accepts two thresholds and is internally invoked bycvHoughCircles(). Therefore the higher (first) threshold is set toparam1(passed as argument intocvHoughCircles()) and the lower (second) threshold is set to half of this value.param2– Is the value for accumulator threshold. This value is used in the accumulator plane that must be reached so that a line is retrieved.I would recommend you to read this book, which is in my opinion the best one describing OpenCv.
I hope this helps.