Patent ID: 7800665

Claim:
An image processing method, a digital image being outputted by an optical sensor and comprising M pixels, M being a positive integer, the ith pixel among the M pixels having an ith set of original gray levels, i being an integer index ranging from 1 to M, the method comprising the steps of: (a) generating M sets of logarithm values, the ith set of logarithm values among the M sets of logarithm values being generated based on the ith set of original gray levels and a set of adjusting parameters relative to the optical sensor; (b) gathering statistics of the M sets of logarithm values; and (c) determining a target color temperature of the digital image according to the gathered statistics of step (b); wherein the set of adjusting parameters is generated by the following steps: (d1) receiving a plurality of sampled pixels outputted by the optical sensor, each of the sampled pixels having a set of sample gray levels respectively, each set of sample grey levels respectively comprising a red sample grey level (RS), a green sample grey level (GS), and a blue sample grey level (BS); (d2) generating a first logarithm curve on a first logarithm plane according to the sets of sample gray levels of the sampled pixels; (d3) converting the first logarithm curve into a second logarithm curve on a second logarithm plane, the second logarithm curve being approximately parallel to a coordinate axis of the second logarithm plane; and (d4) generating the set of adjusting parameters according to the difference between the first logarithm curve and the second logarithm curve; and wherein a longitudinal axis and a transverse axis of the first logarithm plane are Log(GS/RS) and Log(GS/BS) respectively.