Some embodiments provide a program that performs a color balance operation. The program identifies an image that includes several pixels. Each pixel includes a luma component value and chroma component values. The program analyzes the luma component values of the pixels in the image to identify several luma ranges. The program determines, for each luma range in the several luma ranges, a set of transforms for modifying chroma component values of pixels in the image in order to remove a color cast from the image. The program applies the sets of transforms to the image to remove the color casts from the image.
Legal claims defining the scope of protection, as filed with the USPTO.
1. A non-transitory machine readable medium storing a program which when executed by at least one processing unit performs a color balance operation, the program comprising sets of instructions for: identifying an image comprising a plurality of pixels, each pixel comprising a luma component value and chroma component values; analyzing the luma component values of the pixels in the image to identify a plurality of luma ranges; determining, for each luma range in the plurality of luma ranges, a set of transforms for modifying chroma component values of pixels in the image in order to remove a color cast from the image, wherein each set of transforms is specific to a different luma range; and applying the sets of transforms to the image to remove the color casts from the image.
2. The non-transitory machine readable medium of claim 1 , wherein the set of transforms for each luma range in the plurality of luma ranges is further for modifying luma component values of pixels in the image in order to adjust the contrast of the image.
3. The non-transitory machine readable medium of claim 1 , wherein the set of transforms for each luma range in the plurality of luma ranges modifies the luma component values of pixels in the image in order to adjust the contrast of the image by equalizing a distribution of the luma component values of the pixels in the image.
4. The non-transitory machine readable medium of claim 1 , wherein each set of transforms comprises a transform to modify a set of pixels in the image having a particular luma component value such that an average of color component values of the set of pixels in the image is equivalent to defined color component values for the particular luma component value.
5. The non-transitory machine readable medium of claim 1 , wherein each set of transforms comprises a transform to modify a set of pixels of the image having a particular luma component value such that an average saturation value of the set of pixels in the image is equivalent to a defined saturation value for the particular luma component value.
6. The non-transitory machine readable medium of claim 1 , wherein the program further comprises a set of instructions for converting the image to a Y′CbCr color space before analyzing the luma component values of the pixels in the image.
7. The non-transitory machine readable medium of claim 1 , wherein the image is a frame of a video clip.
8. The non-transitory machine readable medium of claim 1 , wherein the image is still image.
9. The non-transitory machine readable medium of claim 1 , wherein the set of transforms are a set of transformation matrices.
10. The non-transitory machine readable medium of claim 1 , wherein the set of instructions for applying the sets of transforms to the image comprises a set of instructions for applying at least one transform in the sets of transforms to each pixel in the image.
11. A non-transitory machine readable medium storing a program which when executed by at least one processing unit balances colors of an image, the program comprising sets of instructions for: determining a first set of operations for modifying brightness values of the image to defined brightness values; determining a second set of operations for modifying hue values of the image based on defined hue values after the modification to the brightness values; determining a third set of operations for modifying saturation values of the image based on saturation values of the image after modification to the hue values; and determining a transform that incorporates the first, second, and third set of operations.
12. The non-transitory machine readable medium of claim 11 , wherein the program further comprises a set of instructions for applying the transform to the image to push colors in the image towards neutral colors in order to balance the colors of the image.
13. The non-transitory machine readable medium of claim 11 , wherein the program further comprises a set of instructions for applying the determined first set of operations and second set of operations to the image before determining the third set of operations.
14. The non-transitory machine readable medium of claim 11 , wherein the first set of operations comprises a contrast operation that matches the contrast of the image to the contrast of defined brightness values.
15. The non-transitory machine readable medium of claim 14 , wherein the contrast operation comprises a gain operation and a lift operation.
16. The non-transitory machine readable medium of claim 11 , wherein the second set of operations comprises a set of shear transformations for shifting hues of the image towards defined hue values.
17. A method of color balancing a video clip comprising a plurality of frames, each frame comprising a plurality of pixels, the method comprising: performing, by one or more computing devices: providing a first tool for identifying a frame of the video clip; providing a second tool for identifying a dominant set of colors in the identified frame and determining a color balance operation for modifying pixels in the identified frame to neutralize an appearance of the dominant set of colors in the identified frame; and providing a third tool for applying the color balance operation to each frame in the video clip to neutralize an appearance of the dominant set of colors from each frame in the video clip.
18. The method of claim 17 , wherein the color balance operation for modifying pixels in the identified frame is further to adjusting the contrast of the identified frame.
19. The method of claim 18 , wherein the color balance operation adjusts the contrast of the identified frame by equalizing a distribution of brightness of pixels in the identified frame.
20. The method of claim 17 , wherein the identified frame of the video clip is a frame in the middle of the video clip.
21. The method of claim 17 further comprising providing a fourth tool for performing a color analysis of each frame of the video clip.
22. The method of claim 21 , wherein the first tool identifies the frame of the video clip based on the color analysis of each frame of the video clip.
23. The method of claim 22 , wherein performing the color analysis comprises determining a set of attributes of the frame.
24. The method of claim 23 , wherein the set of attributes of the frame includes a color value of the average color of pixels in the frame.
25. The method of claim 23 , wherein the set of attributes of the frame includes a luma value of the darkest pixel in the frame.
26. The method of claim 23 , wherein the set of attributes of the frame includes a luma value of the brightest pixel in the frame.
27. The method of claim 23 , wherein the set of attributes of the frame includes a saturation value of the most saturated pixel in the frame.
Cooperative Patent Classification codes for this invention. Click any code to explore related patents in that topic.
June 3, 2011
September 2, 2014
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.