Calculates radial distances from the centroid to a specified number of points sampled along the contour using polar coordinates. This method ensures regular angular sampling, which is a prerequisite for standard AFORO wavelet analysis.
Value
A list containing:
pixindices: Indices of the sampled points in the original contour.radii: Distances from the centroid to each sampled point.coord: Coordinates of the sampled points relative to the centroid.
Examples
# Example using sample data
image_path <- system.file("extdata", "otolith.jpg", package = "aforoR")
contour <- extract_contour(preprocess_image(image_path))
polar_dists <- regularradius(contour[, 1], contour[, 2], n = 512)
plot(polar_dists$radii, type = "l", main = "Radial Distances")
