pixelsInContour | R Documentation |
pixelsInContour
determines the pixels that are inside a
specified contour.
pixelsInContour(contours, id = NULL)
contours |
A list of two matrices as produced by |
id |
An optional vector indicating the identity of the specific contours for which to run the function. |
A matrix with 3 columns:
the contour identity (indicates the set of points belonging to the same contour).
the x coordinates of the points inside the contour.
the y coordinates of the points inside the contour.
Simon Garnier, garnier@njit.edu
findContours
dots <- image(system.file("sample_img/dots.jpg", package = "Rvision"))
dots_gray <- changeColorSpace(dots, "GRAY")
dots_bin <- dots_gray < 200
contours <- findContours(dots_bin)
pixelsInContour(contours, id = c(3, 5))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.