Patent ID: 8832168

Claim:
A method for processing an image for display in a computer system, comprising: receiving an input display value for a pixel of the image in a first color space; generating, in a processing unit of the computer system, a corrected display value in a second color space by evaluating a second-order polynomial that approximates a power function corresponding to the gamma of a display device, in accordance with the input display value; processing, in the processing unit of the computer system, the corrected display value in the second color space to produce a processed display value for the pixel; and converting, in the processing unit of the computer system, the processed display value to the first color space by evaluating a function that is an approximation of the inverse of the power function in accordance with the processed display value, wherein the second-order polynomial is selected among a plurality of second-order polynomials that piecewise approximate the power function over a plurality of intervals, and wherein the polynomials and the intervals are determined such that a maximum error between the approximation and the power function is approximately equal for each of the intervals.