A system and method for processing digital video. The invention allows for
manual level and gain adjustment of the video similar to that used in a
histogram based automatic level and gain control system using a cumulative
distribution function. Level changes are made by an offset to the existing
automatic level and gain. Level changes are first made by applying an
offset L and the midscale gray intensity bin on the histogram is located.
Gain changes are made by changing the relative gain multiplier (G) which
acts on the automatic level and gain algorithm causing the gain to change
equally about midscale gray (i.e., midscale gray is maintained). In
accordance with the invention, as part of the histogram based manual level
and gain algorithm, the local gain is clipped to a predetermined maximum
in order to prevent an overly noisy picture when too much gain is applied.
The inventive method determines how to prevent a shift in the level when
increasing the gain (i.e., G>1) even when clipping is applied. An
anti-saturation algorithm is also applied to prevent saturation from
affecting the video too drastically. In order to provide the ability to
change the picture from black to white an offset is required under low
gain. Lastly, the inventive method allows for fine and coarse adjustments
and includes histogram equalization, polarity reversal and gamma
correction.