An integer indicating the number of bins of the histogram
(default: 256).
range
The range of pixel values to include in the histogram (default:
c(0, 256)). The lower boundary is inclusive but the higher one is exclusive.
mask
A single-channel (GRAY) 8-bit (8U) Image object
with the same dimensions as image. This can be used to mask out
pixels that should not be considered when calculating the histogram (pixels
set to 0 in the mask will be ignored during the histogram calculation).
plot
A logical indicating whether to plot the histogram (default:
FALSE).
col
A value or vector of any kind of R color specification
compatible with col2rgb representing the color of the
histogram for each image channel (default:
c("blue", "green", "red", "black")).
xlab, ylab
Character strings for the axis labels (default: "Pixel
value" for the x axis and "Counts" for the y axis).
If plot=FALSE, the function returns a m x n matrix,
with m = nbins and n equal to the number of channels in the
image + 1. The first column corresponds to the bin values. If
plot=TRUE, the function plots the histogram and returned the
aforementioned matrix silently.