ProbabilisticHoughLine - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : ImageTools Package : ProbabilisticHoughLine

ImageTools

  

ProbabilisticHoughLine

  

detect lines segments using Probabilistic Hough Transform

 

Calling Sequence

Parameters

Description

Examples

Compatibility

Calling Sequence

ProbabilisticHoughLine(img, rho, theta, threshold, lineLength, lineGap)

Parameters

img

-

Image

rho

-

algebraic , radial increment

theta

-

algebraic , angular increment in radian

threshold

-

posint , minimum number of points required to detect a line

lineLength

-

posint , minimum length of the line

lineGap

-

posint , maximum length of the gap between lines

Description

• 

The ProbabilisticHoughLine command detects line segments in img, and returns the detected line segments as an m by 4 Array, lines. Each line segment corresponds to a row of lines: linesi=xi1,yi1,xi2,yi2, where xi1,yi1 and xi2,yi2 are the two end points of the ith line segment.

• 

This command is implemented by a call to the Intel Integrated Performance Primitives (IPP) library; in particular, its ippiHoughProbLine_8u32f_C1R command. For more details, see its documentation.

• 

This command interprets integer coordinate values to represent the corners of pixels, like the commands in the ImageTools[Draw] package do. It always returns coordinates for the centers of pixels, so the coordinates returned are always half integers.

• 

img should be a binary image, so calling EdgeDetect and Threshold are usually necessary before calling ProbabilisticHoughLine.

Examples

withImageTools:

imgReadcatkerneloptsdatadir,/images/Maplesoft.png

edgeThresholdEdgeDetectimg,1.5

Embededge

lineProbabilisticHoughLineedge,1,π1800,80,50,10

DrawLine := proc(img, line)
    local i;
    for i to upperbound(line, 1) do
        Draw:-Line(img, line[i, 1], line[i, 2], line[i, 3], line[i, 4], [255, 0, 0]);
    end do;
end proc:

DrawLineimg,line

Embedimg

Compatibility

• 

The ImageTools[ProbabilisticHoughLine] command was introduced in Maple 2020.

• 

For more information on Maple 2020 changes, see Updates in Maple 2020.

See Also

ImageTools[Draw][Line]

ImageTools[HoughLine]