
Last chance! 50% off unlimited learning
Sale ends in
Extract coordinates of the centres of circles from a 2D image using the Hough transform
circle_hough_transform(
pixels,
rmin,
rmax,
threshold,
resolution = 360,
min.separation = rmin/4,
ncpu = 1
)
a data frame with columns x, y, r and score
input data, either a matrix representing a 2D image or a data frame of signal coordinates with columns x, y. For images, background is expected to be 0 and signal to have positive values.
minimum search radius.
maximum search radius.
score threshold between 0 and 1.
number of steps in the circle transform (default: 360). This represents the maximum number of votes a point can get.
distance between circle centres below which overlapping circles are considered the same and merged (default to 0.25*rmin)
number of threads to use to speed up computation (default: 1)
point.set <- data.frame(x = c(-9.8,-5.2,12.5,2.5,4.5,1.3,-0.2,0.4,9.3,-1.4,0.5,-1.1,-7.7),
y = c(-4.2,1.5,-0.5,12,-3,-7.2,10.9,6.7,-1.3,10,6.7,-6.2,2.9))
circles <- circle_hough_transform(pixels = point.set, rmin = 3, rmax = 6, resolution = 100,
threshold = 0.1, ncpu = 1)
Run the code above in your browser using DataLab