detectBarnes | R Documentation |
The function first applies the Canny edge detection algorithm to the input image.
It then detects circles corresponding to the board and holes using the
detectCircles
function. The function filters the detected hole circles
based on their distance from the board circle, ensuring they fall within acceptable
ranges relative to the specified radii. Finally, it calculates the median radius
and angle differences of the remaining circles and constructs a circular representation
for the holes based on these parameters.
detectBarnes(im, boardRadius, holeRadius, sigma = 25, plot = TRUE)
im |
A matrix representing the image where the circles will be detected. |
boardRadius |
The expected radius of the board circles. |
holeRadius |
The expected radius of the hole circles. |
sigma |
An optional parameter that controls the standard deviation for the Gaussian filter used in edge detection (default value is 25). |
plot |
Opcion of plot |
Detects circles representing boards and holes in a given image of a maze. It utilizes edge detection to identify potential circle patterns based on specified radius parameters. The function returns the detected circles' coordinates, along with additional information about the board and hole radii.
A list containing:
c1 |
Coordinates of the detected board circle. |
boardRadius |
Radius of the board circle. |
c2 |
A list of coordinates representing the detected hole circles. |
holeRadius |
Radius of the hole circles. |
path <- system.file('extdata/data.tiff', package='BioTrajectory')
im <- tiff::readTIFF(path)
im <- imager::as.cimg(t(im[,,1]))
Barnes <- detectBarnes(im, boardRadius=207, holeRadius=13, sigma=25)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.