arcLength
estimates a closed contour perimeter or a curve
length from a set of 2D coordinates.
Author
Simon Garnier, garnier@njit.edu
Examples
dots <- image(system.file("sample_img/dots.jpg", package = "Rvision"))
dots_gray <- changeColorSpace(dots, "GRAY")
dots_bin <- dots_gray < 200
contours <- findContours(dots_bin)
ix <- contours$contours[, 1] == 0
arcLength(contours$contours[ix, 2:3])
#> [1] 352.6346