| MatHoughLines Method |
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
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public LineSegmentPolar[] HoughLines(
double rho,
double theta,
int threshold,
double srn = 0,
double stn = 0
)
Public Function HoughLines (
rho As Double,
theta As Double,
threshold As Integer,
Optional srn As Double = 0,
Optional stn As Double = 0
) As LineSegmentPolar()
public:
array<LineSegmentPolar>^ HoughLines(
double rho,
double theta,
int threshold,
double srn = 0,
double stn = 0
)
member HoughLines :
rho : float *
theta : float *
threshold : int *
?srn : float *
?stn : float
(* Defaults:
let _srn = defaultArg srn 0
let _stn = defaultArg stn 0
*)
-> LineSegmentPolar[]
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:
LineSegmentPolarThe 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