This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

ImageHistogram

ImageHistogram[image]
plots a histogram of the pixel levels for each channel in image.
ImageHistogram
uses n levels for each channel.
ImageHistogram
puts all values into n bins between min and max.
  • For a three-channel image, ImageHistogram by default displays the channels using red, green, and blue.
  • ImageHistogram supports an Appearance option which determines the detailed appearance of the histogram. Possible settings include:
"RGB"show RGB channel values and overlapping colors
"Separated"make separate histograms for each channel
"Stacked"stack values for each channel
"Transparent"show channels overlapping using transparency
AspectRatioratio of height to width
AxesFalsewhether to draw axes
FrameTruewhether to include a frame
FrameTicksNoneframe ticks
InterpolationOrder0the polynomial degree of curves used in joining data points
JoinedTruewhether to join bars
PlotRangePaddingNonehow much to pad the range of values
  • ImageHistogram by default takes the first histogram bin to start at channel value and the last one to end at . Channel values below or above are shown in the first and last bins, respectively.
  • ImageHistogram takes the first bin to start at min, and the last bin to end at max.
  • ImageHistogram[image, n, All] gives n equally spaced bins, extending over the complete range of values in each channel.
  • With an option setting False, pixels below min or above max are not counted.
Show the histogram of an RGB image:
Use additive colors to represent overlapping regions of the histograms:
Show separate histograms for each color channel:
Stack the color channels vertically:
Show the histogram of an RGB image:
In[1]:=
Click for copyable input
Out[1]=
 
Use additive colors to represent overlapping regions of the histograms:
In[1]:=
Click for copyable input
Out[1]=
 
Show separate histograms for each color channel:
In[1]:=
Click for copyable input
Out[1]=
 
Stack the color channels vertically:
In[1]:=
Click for copyable input
Out[1]=
Specify the number of levels:
Specify a data range that includes negative values for plotting the histogram:
Histogram of a CMYK image:
Control how pixels outside of the histogram range are counted and displayed:
By default the histogram is plotted with no interpolation:
Create a smooth histogram of an image:
Separate histograms for each color channel:
Disjoint histogram:
Specify tick spacing for a histogram of an image:
Specify particular ticks to be shown on the histogram:
Use PlotRange->Automatic for automatically determining the plot range:
PlotRange->All includes the entire histogram:
Modify the plot range to better visualize the distribution of higher intensities:
Image histogram can also be computed using Histogram, however it is slower:
Histogram of an image that is made progressively darker:
New in 7 | Last modified in 8