OpenCvSharp.Cv2.HoughLinesP C# (CSharp) Method

HoughLinesP() public static method

Finds lines segments in a binary image using probabilistic Hough transform.
public static HoughLinesP ( InputArray image, double rho, double theta, int threshold, double minLineLength, double maxLineGap ) : LineSegmentPoint[]
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]
return LineSegmentPoint[]
        public static LineSegmentPoint[] HoughLinesP(
            InputArray image, double rho, double theta, int threshold, 
            double minLineLength = 0, double maxLineGap = 0)
        {
            if (image == null)
                throw new ArgumentNullException(nameof(image));
            image.ThrowIfDisposed();
            using (var vec = new VectorOfVec4i())
            {
                NativeMethods.imgproc_HoughLinesP(image.CvPtr, vec.CvPtr, rho, theta, threshold, minLineLength, maxLineGap);
                GC.KeepAlive(image);
                return vec.ToArray<LineSegmentPoint>();
            }
        }
        #endregion
Cv2