countNonZero
returns the number of non-zero pixels in an
Image
object.
Arguments
- image
A single-channel
Image
object.
Author
Simon Garnier, garnier@njit.edu
Examples
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
changeColorSpace(balloon, "GRAY", "self")
#> NULL
countNonZero(balloon > 100)
#> [1] 169254