Reputation: 1026
I am using OpenCV 2.4.2
and here is a quotation from OpenCV documentation
C++: void HoughLinesP(InputArray image, OutputArray lines, double rho, double theta, int threshold, double minLineLength=0, double maxLineGap=0 )
Parameters:
image – 8-bit, single-channel binary source image. The image may be modified by the function.
lines – Output vector of lines. Each line is represented by a 4-element vector , where and are the ending points of each detected line segment.
rho – Distance resolution of the accumulator in pixels.
theta – Angle resolution of the accumulator in radians.
threshold – Accumulator threshold parameter. Only those lines are returned that get enough votes().
minLineLength – Minimum line length. Line segments shorter than that are rejected.
maxLineGap – Maximum allowed gap between points on the same line to link them
My Question is
are minLineLength and maxLineGap measured in Pixels? or what?
Upvotes: 1
Views: 2323
Reputation: 1009
Digging into an old Intel OpenCV manual, you can see that it describes LineLength as Pixels http://opencv.jp/opencv-1.0.0_org/docs/opencvman_old.pdf
It retrieves no more than linesNumber line segments; each of those must be not shorter than lineLength pixels.
Pixels seem to be the most logical here. Rho, the distance resolution of the accumulator is defined as being in Pixels.
The sample here shows a value of 30 being used:
http://www.scribd.com/doc/77374092/155/cv-HoughLinesP
Upvotes: 5