compute a histogram for each layer of an image - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Image Processing : ImageTools Package : ImageTools/Histogram

ImageTools[Histogram] - compute a histogram for each layer of an image

Calling Sequence

Histogram( img, buckets, opts )

Parameters

img

-

Image; input image

buckets

-

(optional) posint; number of buckets/bins in the histogram (per layer)

opts

-

(optional) equation(s) of the form option = value; specify options for the Histogram command

Description

• 

The Histogram command computes a histogram of the intensity of each layer of an image, and returns a Vector (for one-layer images) or Matrix (for multi-layer images) containing the histogram information.

• 

The img parameter specifies the image.

• 

The optional buckets parameter specifies the number of buckets per color channel desired. For most images, which were originally read from 8-bit per channel image files, the default of 256 is a suitable value.

• 

For a single layer (grayscale) image, the Histogram command returns a column Vector with buckets elements. For multi-layer images, a buckets x N Matrix is returned, where N is the number of layers.

Examples

withImageTools:

Create a grayscale image with intensity varying from 1/4 to 3/4.

img:=Create100,200,r,c→evalf12+1sin2πr100+cos2πc2008:

Histogramimg,10

Histogramimg,10,autorange,centers

Histogramimg,10,range=0..0.5,centers

Histogramimg,10,range=0..0.5,normalized

See Also

ImageTools, ImageTools[PlotHistogram]


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam