houghCircles | R Documentation |
houghCircles
finds circles in a grayscale image using the
Hough transform.
houghCircles(
image,
method,
dp,
min_dist,
param1 = 100,
param2 = 100,
min_radius = 0,
max_radius = 0
)
image |
An 8-bit (8U) single-channel (GRAY) |
method |
A character string indicating the detection method to be used. The available methods are "GRADIENT" and "ALT" (generally more accurate). |
dp |
Inverse ratio of the accumulator resolution to the image resolution.
For example, if |
min_dist |
Minimum distance between the centers of the detected circles. If the parameter is too small, multiple neighbor circles may be falsely detected. If it is too large, some circles may be missed. |
param1 |
First method-specific parameter. In this case, it is the higher
threshold of the two passed to the Canny edge detector (the lower one is
twice smaller). The default value is 100 but note that |
param2 |
Second method-specific parameter. In case of
|
min_radius |
The minimum acceptable circle radius. |
max_radius |
The maximum acceptable circle radius. If
|
A matrix with 5 columns corresponding to the unique id of each circle, the x and y coordinates of their centers, the estimates of their radius, and the estimated relative reliability of the detected circles ("votes").
Simon Garnier, garnier@njit.edu
houghLinesP
dots <- image(system.file("sample_img/dots.jpg", package = "Rvision"))
dots_gray <- changeColorSpace(dots, "GRAY")
circ <- houghCircles(dots_gray, "ALT", 1.5, 25, 300, 0.9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.