houghLinesP | R Documentation |
houghLinesP
finds line segments in a binary image using
the probabilistic Hough transform.
houghLinesP(
image,
rho,
theta,
threshold,
min_line_length = 0,
max_line_gap = 0
)
image |
An 8-bit (8U) single-channel (GRAY) binary |
rho |
The distance resolution of the accumulator in pixels. |
theta |
The angle resolution of the accumulator in radians. |
threshold |
The accumulator threshold parameter. Only lines that get more votes than that threshold are returned. |
min_line_length |
The minimum line length. Line segments shorter than that are rejected. |
max_line_gap |
The maximum allowed gap between points on the same line segment to link them. |
A matrix with 4 columns corresponding to the x and y coordinates of the extremities of each detected line.
Simon Garnier, garnier@njit.edu
houghCircles
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon_canny <- canny(balloon, 50, 50)
lines <- houghLinesP(balloon_canny, 1, pi / 180, 80, 0, 50)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.