histogram


Description:

[ Version ( since = "2.10" ) ]
public bool histogram (HistogramChannel channel, double start_range, double end_range, out double mean, out double std_dev, out double median, out double pixels, out double count, out double percentile)

Returns information on the intensity histogram for the specified drawable.

This tool makes it possible to gather information about the intensity histogram of a drawable. A channel to examine is first specified. This can be either value, red, green, or blue, depending on whether the drawable is of type color or grayscale. Second, a range of intensities are specified. The histogram function returns statistics based on the pixels in the drawable that fall under this range of values. Mean, standard deviation, median, number of pixels, and percentile are all returned. Additionally, the total count of pixels in the image is returned. Counts of pixels are weighted by any associated alpha values and by the current selection mask. That is, pixels that lie outside an active selection mask will not be counted. Similarly, pixels with transparent alpha values will not be counted. The returned mean, std_dev and median are in the range (0..255) for 8-bit images or if the plug-in is not precision-aware, and in the range (0.0..1.0) otherwise.

Parameters:

this

The drawable.

channel

The channel to query.

start_range

Start of the intensity measurement range.

end_range

End of the intensity measurement range.

mean

Mean intensity value.

std_dev

Standard deviation of intensity values.

median

Median intensity value.

pixels

Alpha-weighted pixel count for entire image.

count

Alpha-weighted pixel count for range.

percentile

Percentile that range falls under.

Returns:

TRUE on success.