This function scans each row and column of the image and finds the minimum and maximum coordinates which are less than thr (by default, the mean value of the image).
outer_contour(img, thr = mean(img), as_cimg = TRUE)
img | a cimg object |
---|---|
thr | threshold to use for the image |
as_cimg | return the points as a cimg object? |
either a cimg of points or a data frame of points indicating the boundary