Histogram

Histogram (clip, string ''mode'')

Adds a luminance histogram to the right side of the clip.

Starting from AviSynth v2.50 this filter will also show valid and invalid colors in YUV mode. Invalid values (below 16 and above 235) will be colored brown/yellow-ish.

Starting in v2.53 an optional mode parameter has been added to show additional information of a clip. mode can be "Classic" (default old mode), "Levels", "Color", "Luma" (v2.54), "Stereo" (v2.54), "StereoOverlay" (v2.54), "Color2"  (v2.58) and "AudioLevels" (v2.58).

Classic mode

This will add a per-line luminance graph (which is actually called a Waveform Monitor) on the right side of the video. the left side of the graph represents luma = 0 and the right side represents luma = 255. The non-valid CCIR-601 ranges are shown in a brown/yellow-ish color, and a greenish line represents Y = 128.

Available in YUV mode.

Levels mode

This mode will display three level-graphs on the right side of the video frame (which are called Histograms). This will show the distribution of the Y, U and V components in the current frame.

The top graph displays the luma (Y) distribution of the frame, where the left side represents Y = 0 and the right side represents Y = 255. The valid CCIR601 range has been indicated by a slightly different color and Y = 128 has been marked with a dotted line. The vertical axis shows the number of pixels for a given luma (Y) value. The middle graph displays the U component, and the bottom graph displays the V component.

Available in YV12 mode.

Color mode

This mode will display the chroma values (U/V color placement) in a two dimensional graph (which is called a vectorscope) on the right side of the video frame. It can be used to read of the hue and saturation of a clip. At the same time it is a histogram. The whiter a pixel in the vectorscope, the more pixels of the input clip correspond to that pixel (that is the more pixels have this chroma value).

The U component is displayed on the horizontal (X) axis, with the leftmost side being U = 0 and the rightmost side being U = 255. The V component is displayed on the vertical (Y) axis, with the top representing V = 0 and the bottom representing V = 255.

The position of a white pixel in the graph corresponds to the chroma value of a pixel of the input clip. So the graph can be used to read of the hue (color flavor) and the saturation (the dominance of the hue in the color). As the hue of a color changes, it moves around the square. At the center of the square, the saturation is zero, which means that the corresponding pixel has no color. If you increase the amount of a specific color, while leaving the other colors unchanged, the saturation increases, and you move towards the edge of the square.

Available in YV12 mode.

Color2 mode

This mode will display the pixels in a two dimensional graph (which is called a vectorscope) on the right side of the video frame. It can be used to read of the hue and saturation of a clip.

The U component is displayed on the horizontal (X) axis, with the leftmost side being U = 0 and the rightmost side being U = 255. The V component is displayed on the vertical (Y) axis, with the top representing V = 0 and the bottom representing V = 255. The grey square denotes the valid CCIR601 range.

The position of a pixel in the graph corresponds to the chroma value of a pixel of the input clip. So the graph can be used to read of the hue (color flavor) and the saturation (the dominance of the hue in the color). As the hue of a color changes, it moves around the circle. At the center of the circle, the saturation is zero, which means that the corresponding pixel has no color. If you increase the amount of a specific color, while leaving the other colors unchanged, the saturation increases, and you move towards the edge of the circle. A color wheel is plotted and divided into six hues (red, yellow, green, cyan, blue and magenta) to help you reading of the hue values. Also every 15 degrees a white dot is plotted.

At U=255, V=128 the hue is zero (which corresponds to blue) and the saturation is maximal, that is, sqrt( (U-128)^2 + (V-128)^2 ) = 127. When turning clock-wise, say 90 degrees, the chroma is given by U=128, V=255 (which corresponds to red). Keeping the hue constant and decreasing the saturation, means that we move from the circle to the center of the vectorscope. Thus te color flavor remains the same (namely red), only it changes slowly to greyscale.  Etc ...

Available in YV12 mode.

Luma mode

This mode will amplify luminance, and display very small luminance variations. This is good for detecting blocking and noise, and can be helpful at adjusting filter parameters. In this mode a 1 pixel luminance difference will show as a 16 pixel luminance pixel, thus seriously enhancing small flaws.

Available in YV12 mode.

Stereo and StereoOverlay mode

This mode shows a clasic stereo graph, from the audio in the clip. Some may know these from recording studios. This can be used to see the left-right and phase distribution of the input signal. StereoOverlay will overlay the graph on top of the original. Each frame will contain only information from the current frame to the beginning of the next frame. The signal is linearly upsampled 8x, to provide clearer visuals.

This mode requires a stereo signal input and StereoOverlay requires YV12 video.

AudioLevels mode

This mode shows the audiolevels for each channel in decibels (multichannel is supported). More accurately it determines:

Changes:

v2.53Added different modes.
v2.55Added dots to mode = "stereo" to show bias/offsets.
v2.56Added invalid colors in YUY2 mode.
v2.58Color2 and AudioLevels modes added.
v2.60Added planar support.

$Date: 2007/09/12 07:54:58 $