hist.im

0th

Percentile

Histogram of Pixel Values in an Image

Computes and displays a histogram of the pixel values in a pixel image. The hist method for class "im".

Keywords
methods, spatial
Usage
## S3 method for class 'im':
hist(x, \dots, probability=FALSE)
Arguments
x
A pixel image (object of class "im").
...
Arguments passed to hist.default or barplot.
probability
Logical. If TRUE, the histogram will be normalised to give probabilities or probability densities.
Details

This function computes and (by default) displays a histogram of the pixel values in the image x.

An object of class "im" describes a pixel image. See im.object) for details of this class.

The function hist.im is a method for the generic function hist for the class "im". Any arguments in ... are passed to hist.default (for numeric valued images) or barplot (for factor or logical images). For example, such arguments control the axes, and may be used to suppress the plotting.

Value

  • A single number.

See Also

hist, hist.default, barplot, im.object, summary.im.

Aliases
  • hist.im
Examples
X <- as.im(function(x,y) {x^2}, unit.square())
  hist(X)
  hist(cut(X,3))
Documentation reproduced from package spatstat, version 1.11-8, License: GPL version 2 or newer

Community examples

Looks like there are no examples yet.