Images that are captured using a camera generally have several kinds of color problems. For example, if the camera is not properly white balanced, images tend to have a red or blue cast. If there is insufficient lighting in the scene, images tend to be dark and show little contrast. Also, if light reflects off objects in the scene, other objects tend to have a color cast associated with the reflected light.
These and other color problems commonly are fixed using color correction tools on a computer workstation. These tools allow a user to select one or more image processing functions to apply to an image and to adjust parameters of these functions. Currently available color correction tools are powerful, but tend to have a steep learning curve.
To reduce the learning curve and the time required to manipulate the image processing functions, there are some automatic tools for color correction. Such tools analyze an image and adjust parameters of a color correction operation to improve the color in the image. An example of such a tool is the PHOTOSHOP software from Adobe Systems Incorporated of Menlo Park, Calif. An example kind of function that may be provided is automatic color balancing. Using automatic color balancing, a histogram of the red, blue and green channels is created. The histogram is then stretched so that it matches the end points of the range of values for each channel or the minimum and maximum values from among the red, green and blue channels. Such automatic color balancing generally also improves the contrast of the image, which is generally desirable.
However, color correction for video, which is a sequence of images, is more complicated. Although it may be possible to analyze and correct separately every image in a sequence of images, such analysis and correction would consume significant processing resources. On the other hand, it may be undesirable to apply contrast modifications developed by analysis of one image to other images. A change in contrast in one image may not be appropriate to apply to another image. Also, the change in contrast to the other image may negatively impact its quality.
Automatic color correction is applied to a scene or clip, including a sequence of images, in a motion picture by selecting a representative image of the scene, analyzing the image and adjusting parameters of a color correction operation that is performed on the sequence of images included in the scene. This operation can be repeated automatically for all scenes or for selected scenes in the motion picture. The parameters may be adjusted to automatically color balance the image while maintaining substantially constant contrast.
Analysis of the representative image may include identifying an offset of a peak in a two-dimensional histogram of the colors in the representative image from a white point. Parameters of a color correction operation are adjusted according to this offset. Separate histograms and offsets may be determined for shadows, midtones and highlight regions of the representative image.
Analysis of the representative image may include determining a one dimensional histogram of the luminance information in the representative image. The darkest level and the brightest level in the image are used to balance the image. In particular, the histograms for color channels in the image, such as red, green and blue, are adjusted to match the darkest level and brightest level identified by the luminance histogram.
Accordingly, in one aspect, a method, computer program product and system are provided for automatic color correction of a sequence of images. An indication of one or more representative images in the sequence of images is received. Characteristics of the one or more representative images are analyzed. Parameters for a color correction operation are determined according to the analyzed characteristics of the one or more representative images. The color correction operation is applied with the determined parameters to the sequence of images.
In another aspect, a method, computer program product and system are provided for analyzing characteristics of one or more representative images from a sequence of images. A two-dimensional histogram of colors in the representative image is generated, wherein the two-dimensions include a white point. An offset between a peak value in the two-dimensional histogram and the white point is determined.
In another aspect, a method, computer program product and system are provided for analyzing characteristics of one or more representative images from a sequence of images. A histogram of luminance in the representative image is generated, whereby the histogram indicates a darkest value and a brightest value. Adjustments to histograms of colors in the representative image are determined so as to match a darkest value and a brightest value for each color to the darkest value and brightest value for the luminance.
In another aspect, a system is provided for automatic color correction of a sequence of images. The system includes an image analyzer having an input for receiving an indication of one or more representative images in the sequence of images and an output for providing information indicative of characteristics of the one or more representative images. A parameter calculator has an input for receiving the information indicative of characteristics of the one or more representative images and an output for providing parameters for a color correction operation according to the analyzed characteristics of the one or more representative images. A color corrector has a first input for receiving the parameters and a second input for receiving the sequence of images and an output for providing the sequence of images color corrected according to the determined parameters.
In another aspect, a method, computer program product and system is provided for automatic color correction of a sequence of clips of video information. An indication of a representative image for each clip in the sequence is received. Characteristics of the representative image for each clip are analyzed. Parameters for a color correction operation for each clip are determined according to the analyzed characteristics of the representative image for the clip. The color correction operation with the parameters determined for the clip is applied to each clip.
Referring now to
To perform automatic color correction on a clip 102, one or more representative images 104 from among the images in the clip 102 is selected by an image selector 106. There are a variety of ways that the representative images 104 may be selected by the image selector 106. For example, but not limited to these examples, an image may be selected from the middle of the clip. Every n-th image in the sequence may be selected. Every image in the clip also may be selected.
The representative image is input to an image analyzer 108. The image analyzer produces results 110 that are used by a parameter calculator 112 to determine what parameters 114 to use for color correction. The image analyzer may generate, for example, but not limited to, a two-dimensional chrominance histogram (in a manner described below) or a one-dimensional luminance histogram (in a manner described below). The parameter calculator may determine, for example, but not limited to, an offset between a peak in a chrominance histogram and a white point from which a corresponding offset for a color correction operation can be determined (in a manner described below).
Given the determined parameters 114 for an appropriate color correction operation, a color corrector 116 uses those parameters and applies the color correction operation to all of the images in the clip 102. The color corrector thus produces the color corrected clip 118.
Referring now to
An example technique for analyzing an image and generating color correction parameters will now be described in connection with
One way to correct an image is to use hue offsets (as specified using color wheels) as shown in the color wheel interface 500 of
In
After the shadow and highlight histograms are created for the representative image, they may be filtered (704) to reduce the likelihood that noise affects the determination of the offset. Such a filter may be, for example but not limited to, a low-pass filter such as a three-by-three tent filter. Filtering also may be performed based on the distance of a pixel from the center. For example, each value for each cell in each two-dimensional histogram may be scaled by the sum of one less the distance from the center. Such filtering helps limit the effect of a large colored object in the image on the histogram.
After the shadow and highlight histograms are filtered, the Cr and Cb values corresponding to the largest value in each histogram are identified (706). These pairs of values (herein called Cr_shadow, Cb_shadow and Cr_highlight, Cb_highlight) represent the offset of the colors in the image from a white point for the shadow and highlight regions of the image. The midtone offset (Cr_midtone, Cb_midtone) may be estimated (708) from the offsets of the shadows and highlights. This offset may be estimated by, for example but not limited to, summing the shadow offset with the highlight offsets. In particular, Cr_midtone=Cr_shadow+Cr_highlight and Cb_midtone=Cb_shadow+Cb_highlight.
These offsets are then converted to color correction parameters, depending on the color correction operation to be performed. For example, but not limited to this example, the color correction operations may be a hue offset applied to each of the luminance regions of shadows, midtones and highlights. Such offsets may be applied through and/or displayed in, for example but not limited to, a color wheel interface such as shown in
This particular form of color correction maintains the luminance substantially constant. The nonlinearity of the color correction operations performed using hue offsets on luminance regions may introduce a slight change in luminance.
Another example technique for analyzing an image and generating color correction parameters will now be described in connection with
To correct only the color balance in this image, without modifying the contrast, the histogram of each channel 900, 902 and 904 would appear as shown in
One way to correct such an image is to use curves that map input values of a channel to new output values of the same channel, for example by using a curves interface 1000 as shown in
Curves allow a user to manipulate one or more function curves that adjust individual components of pixels of an image, such as red, green, blue components. One or more points may be added to the curve, or may be moved, to modify the function that it performs. Thus, the curves allow a user to perform a mathematically nonlinear adjustment to a color component. These curves are particularly useful for color correction because a large number of color problems in an image are nonlinear problems created at the time of acquisition of the image, and these problems are typically introduced in the red, green and blue components of pixels of the image.
After generating the histograms, the minimum value and maximum value for each histogram is determined (1204). That is, the lowest red, green, blue and luminance value for which there is a pixel is identified. Also, the largest red, green, blue and luminance value for which there is a pixel also is identified. The minimum value and maximum value may be forced to correspond to a certain minimum number of pixels to avoid an anomalous pixel from causing an incorrect minimum or maximum to be obtained.
Given the minimum and maximum values for each of the red, green and blue channels and luminance, the color correction parameters may be determined 1206. For example, if the color correction operations is performed using curves, a slope and offset defining the curve for each channel is determined using the minimum and maximum values of the channel and the minimum and maximum luminance values. In particular, the following set of equations (Equation 1) may be used:
RedSlope=(LumMax−LumMin)/(RedMax−RedMin)
RedOffset=LumMin−RedSlope*RedMin
GreenSlope=(LumMax−LumMin)/(GreenMax−GreenMin)
GreenOffset=LumMin−GreenSlope*GreenMin
BlueSlope=(LumMax−LumMin)/(BlueMax−BlueMin)
BlueOffset=LumMin−BlueSlope*BlueMin
These values may be used to create look up tables for performing the color correction operation.
In the processes of
A percentage value, between zero percent and one hundred percent, also can be used to control the extent of the changes through automatic balancing. A user interface could be provided for allowing a user to specify a percentage amount of balancing to be performed. The percentage value would limit the hue offset and saturation or curve slope and offset that are computed as the color correction parameters. For example, the RedMin, RedMax, GreenMin, GreenMax, BlueMin and Blue Max values may be adjusted prior to utilizing Equation 1, above, by the following set of equations (Equation 2), given a value (AB) between 0 and 1:
RedMin=AB*RedMin+(1−AB)*LumMin
GreenMin=AB*GreenMin+(1−AB)*LumMin
BlueMin=AB*BlueMin+(1−AB)*LumMin
RedMax=AB*RedMax+(1−AB)*LumMax
GreenMax=AB*GreenMax+(1−AB)*LumMax
BlueMax=AB*BlueMax+(1−AB)*LumMax
By using these kinds of operations for automatic balancing, the luminance and thus the contrast in the image remains substantially the same. Thus, a separate control for contrast adjustment may be combined with this automatic balancing.
As one example, a master curve interface may be provided in the interface of
LumMin=AC*LumMin+(1−AC)*LumMinLimit; and
LumMax=AC*LumMax+(1−AC)*LumMaxLimit,
where LumaMinLimit and LumaMaxLimit represent the limit of the range of legal values for luminance, and typically are 16 and 235 respectively.
A user interface could be provided to allow a user to set a percentage for both of the automatic balancing and automatic contrast adjustment, which could be treated as a default value for an automatic correction operation.
A user interface also could be provided to allow a user to cycle through viewing a clip using different amounts of balancing and/or contrast. For example, a user interface may have a button for performing an automatic correction function. If the button is pressed multiple times on the same clip, each time would perform the automatic correction function with a different percentage of correction. For example, automatic correction could cycle through 100%, 75%, 50%, 25% and then no correction.
The various components of the system described herein may be implemented as a computer program using a general-purpose computer system. Such a computer system typically includes a main unit connected to both an output device that displays information to a user and an input device that receives input from a user. The main unit generally includes a processor connected to a memory system via an interconnection mechanism. The input device and output device also are connected to the processor and memory system via the interconnection mechanism.
One or more output devices may be connected to the computer system. Example output devices include, but are not limited to, a cathode ray tube (CRT) display, liquid crystal displays (LCD) and other video output devices, printers, communication devices such as a modem, and storage devices such as disk or tape. One or more input devices may be connected to the computer system. Example input devices include, but are not limited to, a keyboard, keypad, track ball, mouse, pen and tablet, communication device, and data input devices. The invention is not limited to the particular input or output devices used in combination with the computer system or to those described herein.
The computer system may be a general purpose computer system which is programmable using a computer programming language, such as “C++,” Visual Basic, JAVA or other language, such as a scripting language or even assembly language. The computer system may also be specially programmed, special purpose hardware. In a general-purpose computer system, the processor is typically a commercially available processor, such as various processors available from Intel, AMD, Cyrix, Motorola, and IBM. The general-purpose computer also typically has an operating system, which controls the execution of other computer programs and provides scheduling, debugging, input/output control, accounting, compilation, storage assignment, data management and memory management, and communication control and related services. Example operating systems include, but are not limited to, the UNIX operating system and those available from Microsoft and Apple Computer.
A memory system typically includes a computer readable medium. The medium may be volatile or nonvolatile, writeable or nonwriteable, and/or rewritable or not rewriteable. A memory system stores data typically in binary form. Such data may define an application program to be executed by the microprocessor, or information stored on the disk to be processed by the application program. The invention is not limited to a particular memory system.
A system such as described herein may be implemented in software or hardware or firmware, or a combination of the three. The various elements of the system, either individually or in combination may be implemented as one or more computer program products in which computer program instructions are stored on a computer readable medium for execution by a computer. Various steps of a process may be performed by a computer executing such computer program instructions. The computer system may be a multiprocessor computer system or may include multiple computers connected over a computer network. The components shown in
Having now described an example embodiment, it should be apparent to those skilled in the art that the foregoing is merely illustrative and not limiting, having been presented by way of example only. Numerous modifications are within the capabilities of one of ordinary skill in the art and are contemplated as falling within the scope of the invention.
Number | Name | Date | Kind |
---|---|---|---|
2571697 | Evans | Oct 1951 | A |
4667228 | Kawamura et al. | May 1987 | A |
4694329 | Belmares-Sarabia et al. | Sep 1987 | A |
4908701 | Udagawa | Mar 1990 | A |
5060060 | Udagawa et al. | Oct 1991 | A |
5353061 | Rodriguez et al. | Oct 1994 | A |
5371615 | Eschbach | Dec 1994 | A |
5387930 | Toh | Feb 1995 | A |
5420704 | Winkelman | May 1995 | A |
5541649 | Yamamoto et al. | Jul 1996 | A |
5608548 | Sobol | Mar 1997 | A |
5668890 | Winkelman | Sep 1997 | A |
5781188 | Amiot et al. | Jul 1998 | A |
5808697 | Fujimura et al. | Sep 1998 | A |
5812286 | Lin | Sep 1998 | A |
5926291 | Haraguchi et al. | Jul 1999 | A |
5949918 | McCaffrey | Sep 1999 | A |
5982926 | Kuo et al. | Nov 1999 | A |
6108037 | Takei et al. | Aug 2000 | A |
6151064 | Connolly et al. | Nov 2000 | A |
6151410 | Kuwata et al. | Nov 2000 | A |
6181321 | Zhao et al. | Jan 2001 | B1 |
6198841 | Toyama et al. | Mar 2001 | B1 |
6278482 | Ashizaki | Aug 2001 | B1 |
6381363 | Murching et al. | Apr 2002 | B1 |
6459825 | Lippincott | Oct 2002 | B1 |
6571255 | Gonsalves et al. | May 2003 | B1 |
6594388 | Gindele et al. | Jul 2003 | B1 |
6628830 | Yamazoe et al. | Sep 2003 | B1 |
6642930 | Matsuura et al. | Nov 2003 | B1 |
6647141 | Li | Nov 2003 | B1 |
6668096 | Yamamoto | Dec 2003 | B1 |
6694051 | Yamazoe et al. | Feb 2004 | B1 |
6728428 | Kinjo | Apr 2004 | B1 |
6771323 | Dean et al. | Aug 2004 | B1 |
6795212 | Ichikawa | Sep 2004 | B1 |
6864915 | Guimaraes et al. | Mar 2005 | B1 |
6868190 | Morton | Mar 2005 | B1 |
6897880 | Samra | May 2005 | B2 |
6919924 | Terashita | Jul 2005 | B1 |
6965645 | Zhang et al. | Nov 2005 | B2 |
7057768 | Zaklika et al. | Jun 2006 | B2 |
7088388 | MacLean et al. | Aug 2006 | B2 |
7110604 | Olsson | Sep 2006 | B2 |
7127127 | Jojic et al. | Oct 2006 | B2 |
7327382 | Rodriguez et al. | Feb 2008 | B2 |
20010050708 | Spence et al. | Dec 2001 | A1 |
20020171668 | Samra | Nov 2002 | A1 |
20020186770 | Jawerth et al. | Dec 2002 | A1 |
20030002736 | Maruoka et al. | Jan 2003 | A1 |
20030099407 | Matsushima | May 2003 | A1 |
20030197710 | Gonsalves et al. | Oct 2003 | A1 |
20040022434 | Yamazoe et al. | Feb 2004 | A1 |
20040071343 | Yamazoe et al. | Apr 2004 | A1 |
20040071445 | Tarnoff et al. | Apr 2004 | A1 |
20040197022 | Gonsalves | Oct 2004 | A1 |
20050041159 | Nakamura et al. | Feb 2005 | A1 |
20050146615 | Silverbrook et al. | Jul 2005 | A1 |
20060133669 | Manbeck et al. | Jun 2006 | A1 |
20070046688 | Gonsalves et al. | Mar 2007 | A1 |
Number | Date | Country |
---|---|---|
1160727 | May 2001 | EP |
WO0207426 | Jan 2002 | WO |
Number | Date | Country | |
---|---|---|---|
20040197022 A1 | Oct 2004 | US |