minMaxLoc: Coordinates of the Maxima and Minima of an Image

View source: R/statistics.R

minMaxLocR Documentation

Coordinates of the Maxima and Minima of an Image

Description

minMaxLoc returns the maximum and minimum pixel values of an Image object, as well as their coordinates in the image. If the Image object has more than one channel, it returns the values for each channel.

Usage

minMaxLoc(x, mask = NULL)

Arguments

x

An Image object.

mask

A single-channel (GRAY) 8-bit (8U) Image object with the same dimensions as x. This can be used to mask out pixels that should not be considered when calculating the minima and maxima (pixels set to 0 in the mask will be ignored during the calculation).

Value

A matrix (or a list of matrices for multi-channels images).

Author(s)

Simon Garnier, garnier@njit.edu

See Also

Image, min.Rcpp_Image, max.Rcpp_Image.

Examples

balloon <- image(system.file("sample_img/balloon1.png", package = "Rvision"))
minMaxLoc(balloon)


swarm-lab/Rvision documentation built on Feb. 7, 2024, 4:59 a.m.