WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

ImageHistogram [image]

plots a histogram of the pixel levels for each channel in image.

ImageHistogram [image,bspec]

uses bin specification bspec.

ImageHistogram [image,bspec,range]

plots the histogram of the pixel values in the given range.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Options  
Appearance  
AspectRatio  
Axes  
Show More Show More
AxesLabel  
AxesOrigin  
AxesStyle  
Frame  
FrameLabel  
FrameStyle  
FrameTicks  
FrameTicksStyle  
ImageSize  
InterpolationOrder  
Joined  
Method  
PlotLegends  
PlotRange  
PlotTheme  
Ticks  
TicksStyle  
Applications  
Properties & Relations  
Possible Issues  
Interactive Examples  
Neat Examples  
See Also
Tech Notes
Related Guides
History
Cite this Page

ImageHistogram [image]

plots a histogram of the pixel levels for each channel in image.

ImageHistogram [image,bspec]

uses bin specification bspec.

ImageHistogram [image,bspec,range]

plots the histogram of the pixel values in the given range.

Details and Options

Examples

open all close all

Basic Examples  (3)

Histogram of an RGB image:

Histogram of a grayscale image:

Histogram of a 3D volume:

Scope  (6)

Specify the number of levels:

Histogram of a grayscale image showing all distinct levels:

Use range specification All to plot the histogram from the minimum to maximum value in the image:

Histogram of a binary image:

Use a range specification that includes negative values for plotting the histogram:

Histogram of a CMYK image:

Options  (70)

Appearance  (2)

Use additive colors to represent overlapping regions of histograms of an RGB image:

Show separate histograms for each color channel:

Stack the color channels vertically:

For non-RGB images, default plotting colors are used for all appearances:

Transparent histogram of a Lab image:

Stacked histogram:

Separated histogram:

AspectRatio  (3)

By default, the function uses a fixed height to width ratio for the plot:

Make the height the same as the width with AspectRatio 1:

AspectRatio Full adjusts the height and width to tightly fit inside other constructs:

Axes  (4)

By default, ImageHistogram uses a frame instead of axes:

Use axes instead of a frame:

Use AxesOrigin to specify where the axes intersect:

Turn each axis on individually:

AxesLabel  (3)

No axes labels are drawn by default:

Place a label on the axis:

Specify axes labels:

AxesOrigin  (2)

The position of the axes is determined automatically:

Specify an explicit origin for the axes:

AxesStyle  (4)

Change the style for the axes:

Specify the style of each axis:

Use different styles for the ticks and the axes:

Use different styles for the labels and the axes:

Frame  (5)

ImageHistogram uses a frame by default:

Use Frame False to turn off the frame:

Draw a frame on the left and right edges:

Draw a frame on the left and bottom edges:

Turn off the frame and use axes instead:

FrameLabel  (4)

Place a label along the bottom frame of a plot:

Frame labels are placed on the bottom and left frame edges by default:

Place labels on each of the edges in the frame:

Use a customized style for both labels and frame tick labels:

FrameStyle  (2)

Specify the style of the frame:

Specify the style for each frame edge:

FrameTicks  (8)

Frame ticks are placed automatically by default:

Use a frame with no ticks:

Use frame ticks on the bottom edge:

Use All to include tick labels on all edges:

Place tick marks at specific positions:

Draw frame tick marks at the specified positions with specific labels:

Specify the lengths for tick marks as a fraction of the graphics size:

Use different sizes in the positive and negative directions for each tick mark:

Specify a style for each frame tick:

FrameTicksStyle  (3)

By default, the frame ticks and frame tick labels use the same styles as the frame:

Specify an overall style for the ticks, including the labels:

Use different styles for the different frame edges:

ImageSize  (7)

Use named sizes such as Tiny , Small , Medium and Large :

Specify the width of the plot:

Specify the height of the plot:

Allow the width and height to be up to a certain size:

Specify the width and height for a graphic, padding with space if necessary:

Setting AspectRatio Full will fill the available space:

Use maximum sizes for the width and height:

Use ImageSize Full to fill the available space in an object:

Specify the image size as a fraction of the available space:

InterpolationOrder  (2)

By default, the histogram is plotted with interpolation of order :

Create a smooth histogram of an image:

Joined  (1)

Render histogram using a stem plot:

Use a disjoint histogram:

Method  (1)

Control how pixels outside of the histogram range are counted and displayed:

PlotLegends  (4)

By default, no legend is shown:

Show legends for each plot:

Specify custom legends:

Using Appearance "RGB", there are seven segments and therefore legends to show:

PlotRange  (1)

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:

PlotTheme  (3)

Use a theme minimum styling:

Add horizontal grid lines to the plot:

Use a theme with dark background in a high-contrast color scheme:

Ticks  (7)

Ticks are placed automatically in each chart:

Use Ticks None to draw axes without any tick marks:

Specify tick spacings:

Place tick marks at specific positions:

Draw tick marks at the specified positions with the specified labels:

Specify the lengths for ticks as a fraction of graphics size:

Use different sizes in the positive and negative directions for each tick:

Specify a style for each tick:

TicksStyle  (4)

By default, the ticks and tick labels use the same styles as the axis:

Specify an overall ticks style, including the tick labels:

Specify ticks style for each of the axes:

Use a different style for the tick labels and tick marks:

Applications  (1)

Use the image histograms to estimate a suitable threshold:

Select threshold value using visual inspection of histograms:

Binarize image using selected threshold:

Properties & Relations  (3)

Image histogram can also be computed using Histogram ; however, it is slower:

Find the histogram distribution of an image:

ImageHistogram blends alpha channel with black:

Blend with black before computing the histogram:

Blend with white:

Drop the alpha channel:

Possible Issues  (1)

Histograms with varying bin widths cannot be displayed using the "Stacked" appearance:

Use a different appearance:

Interactive Examples  (1)

Interactive histogram of an RGB image:

Neat Examples  (1)

Histogram of an image that is made progressively darker:

Tech Notes

Wolfram Research (2008), ImageHistogram, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageHistogram.html (updated 2014).

Text

Wolfram Research (2008), ImageHistogram, Wolfram Language function, https://reference.wolfram.com/language/ref/ImageHistogram.html (updated 2014).

CMS

Wolfram Language. 2008. "ImageHistogram." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/ImageHistogram.html.

APA

Wolfram Language. (2008). ImageHistogram. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ImageHistogram.html

BibTeX

@misc{reference.wolfram_2025_imagehistogram, author="Wolfram Research", title="{ImageHistogram}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/ImageHistogram.html}", note=[Accessed: 17-November-2025]}

BibLaTeX

@online{reference.wolfram_2025_imagehistogram, organization={Wolfram Research}, title={ImageHistogram}, year={2014}, url={https://reference.wolfram.com/language/ref/ImageHistogram.html}, note=[Accessed: 17-November-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /