Skip to contents

nrow, ncol and nchan return the number of rows, columns or channels present in an Image object.

Usage

nrow.Rcpp_Image(x)
ncol.Rcpp_Image(x)
nchan(x)

Arguments

x

An Image object.

Value

A numeric value.

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