nrow, ncol and nchan return the number of rows, columns or
channels present in an Image
object.
Arguments
- x
An
Image
object.
See also
dim
which returns all
dimensions.
Author
Simon Garnier, garnier@njit.edu
Examples
balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
nrow(balloon)
#> [1] 360
ncol(balloon)
#> [1] 640
nchan(balloon)
#> [1] 3