Table of Contents

Method HoughLinesP

Namespace
OpenCvSharp
Assembly
OpenCvSharp.dll

HoughLinesP(InputArray, double, double, int, double, double)

Finds lines segments in a binary image using probabilistic Hough transform.

public static LineSegmentPoint[] HoughLinesP(InputArray image, double rho, double theta, int threshold, double minLineLength = 0, double maxLineGap = 0)

Parameters

image InputArray
rho double

Distance resolution of the accumulator in pixels

theta double

Angle resolution of the accumulator in radians

threshold int

The accumulator threshold parameter. Only those lines are returned that get enough votes ( > threshold )

minLineLength double

The minimum line length. Line segments shorter than that will be rejected. [By default this is 0]

maxLineGap double

The maximum allowed gap between points on the same line to link them. [By default this is 0]

Returns

LineSegmentPoint[]

The output lines. Each line is represented by a 4-element vector (x1, y1, x2, y2)