Finds lines segments in a binary image using probabilistic Hough transform.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 3.4.1.20180605-33-CaRLSharp
Syntaxpublic static LineSegmentPoint[] HoughLinesP(
InputArray image,
double rho,
double theta,
int threshold,
double minLineLength = 0,
double maxLineGap = 0
)
Public Shared Function HoughLinesP (
image As InputArray,
rho As Double,
theta As Double,
threshold As Integer,
Optional minLineLength As Double = 0,
Optional maxLineGap As Double = 0
) As LineSegmentPoint()
public:
static array<LineSegmentPoint>^ HoughLinesP(
InputArray^ image,
double rho,
double theta,
int threshold,
double minLineLength = 0,
double maxLineGap = 0
)
static member HoughLinesP :
image : InputArray *
rho : float *
theta : float *
threshold : int *
?minLineLength : float *
?maxLineGap : float
(* Defaults:
let _minLineLength = defaultArg minLineLength 0
let _maxLineGap = defaultArg maxLineGap 0
*)
-> LineSegmentPoint[]
OpenCvSharp.Cv2.HoughLinesP = function(image, rho, theta, threshold, minLineLength, maxLineGap);
Parameters
- image
- Type: OpenCvSharpInputArray
- 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 ) - minLineLength (Optional)
- Type: SystemDouble
The minimum line length. Line segments shorter than that will be rejected. [By default this is 0] - maxLineGap (Optional)
- Type: SystemDouble
The maximum allowed gap between points on the same line to link them. [By default this is 0]
Return Value
Type:
LineSegmentPointThe output lines. Each line is represented by a 4-element vector (x1, y1, x2, y2)
See Also