findNonZero | R Documentation |
findNonZero
retrieves the locations of all non-zero
pixels in an image.
findNonZero(image, values = FALSE)
image |
A single-channel |
values |
A logical indicating whether the values of the non-zero pixels should also be returned (default: FALSE). |
If values=FALSE
, a matrix with two columns, corresponding to
the x (columns) and y (rows) coordinates of the non-zero pixels. If
values=TRUE
, an additional column corresponding to the pixel values
will also be returned.
Simon Garnier, garnier@njit.edu
Image
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
balloon_gray <- changeColorSpace(balloon, "GRAY")
findNonZero(balloon_gray)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.