Calculates distances from the centroid to points sampled at regular intervals along the perimeter of the shape. This provides an alternative to polar sampling for shapes with complex bounds.
Value
A list containing:
dist: Radial distances from the centroid to the sampled points.coords: Coordinates of the sampled points.
Examples
# Example using sample data
image_path <- system.file("extdata", "otolith.jpg", package = "aforoR")
contour <- extract_contour(preprocess_image(image_path))
perim_dists <- dper(contour[, 1], contour[, 2], n = 512)
plot(perim_dists$dist, type = "l", main = "Perimeter-based Distances")
