Finds lines in a binary image using standard Hough transform.
The input matrix must be 8-bit, single-channel, binary source image.
This image may be modified by the function.
Namespace: OpenCvSharp.CPlusPlus
Assembly: OpenCvSharp.CPlusPlus (in OpenCvSharp.CPlusPlus.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public CvLineSegmentPolar[] HoughLines( double rho, double theta, int threshold, double srn = 0, double stn = 0 )
Parameters
- rho
- Type: SystemDouble
Distance resolution of the accumulator in pixels - theta
- Type: SystemDouble
Angle resolution of the accumulator in radians - threshold
- Type: SystemInt32
The accumulator threshold parameter. Only those lines are returned that get enough votes ( > threshold ) - srn (Optional)
- Type: SystemDouble
For the multi-scale Hough transform it is the divisor for the distance resolution rho. [By default this is 0] - stn (Optional)
- Type: SystemDouble
For the multi-scale Hough transform it is the divisor for the distance resolution theta. [By default this is 0]
Return Value
Type: CvLineSegmentPolarThe output vector of lines. Each line is represented by a two-element vector (rho, theta) . rho is the distance from the coordinate origin (0,0) (top-left corner of the image) and theta is the line rotation angle in radians
See Also