|
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 by Array, lines. Each line segment corresponds to a row of lines: , where and 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
|
|
>
|
|
>
|
|
>
|
|
>
|
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:
|
>
|
|
|
|
Compatibility
|
|
•
|
The ImageTools[ProbabilisticHoughLine] command was introduced in Maple 2020.
|
|
|
|