ImageTools - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Programming : ImageTools Package : ImageTools/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 line gap

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 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

_rtable18446884681546039414

(4.1)

edgeThresholdEdgeDetectimg,1.5

_rtable18446884681406635414

(4.2)

Embededge

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

_rtable18446884681406616390

(4.3)

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]