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)

Arguments

img

a cimg object

thr

threshold to use for the image

as_cimg

return the points as a cimg object?

Value

either a cimg of points or a data frame of points indicating the boundary