Skip to contents

Returns the maximum and minimum pixel values of an Image object. If the Image object has more than one channel, it returns the maximum and minimum of each channel.

Usage

# S3 method for Rcpp_Image
min(x, ...)

# S3 method for Rcpp_Image
max(x, ...)

# S3 method for Rcpp_Image
range(x, ...)

Arguments

x

An Image object.

...

Unused at the moment.

Value

min and max return a matrix with 1 row and nchan(x)

columns. range returns a matrix with 2 rows and nchan(x) columns.

See also

Author

Simon Garnier, garnier@njit.edu

Examples

balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
min(balloon)
#>     B  G  R
#> min 0 15 17
max(balloon)
#>       B   G   R
#> max 255 248 254