Patent ID: 7859580

Claim:
A method for determining a missing color pixel value of an image pixel of an imager pixel array, the method comprising: computing horizontal and vertical scores associated with the missing color pixel value based at least in part on pixel values of pixels not in the same row or column of the imager pixel array as the image pixel having the missing color pixel value; selecting an interpolation direction for the pixel having the missing color pixel value based at least in part on a comparison of the horizontal and vertical scores; and estimating the missing color pixel value by interpolating in the selected interpolation direction, wherein the horizontal score comprises a horizontal gradient score for quantifying a change in pixel values in a horizontal direction and the vertical score comprises a vertical gradient score for quantifying a change in pixel values in a vertical direction, and wherein the horizontal gradient score, D (r,c) h , is computed as follows: D ( r , c ) h = S ( r , c ) h + S ( r - 1 , c ) h + S ( r + 1 , c ) h 2 + S ( r - 2 , c ) h + S ( r + 2 , c ) h N S ( r , c ) h =  P ( r , c - 1 ) - P ( r , c + 1 )  +  2 ⁢ ⁢ P ( r , c ) - P ( r , c - 2 ) - P ( r , c + 2 )  S ( r - 1 , c ) h = ⁢  P ( r - 1 , c - 1 ) - P ( r - 1 , c + 1 )  + ⁢  2 ⁢ ⁢ P ( r - 1 , c ) - P ( r - 1 , c - 2 ) - P ( r - 1 , c + 2 )  S ( r + 1 , c ) h = ⁢  P ( r + 1 , c - 1 ) - P ( r + 1 , c + 1 )  + ⁢  2 ⁢ ⁢ P ( r + 1 , c ) - P ( r + 1 , c - 2 ) - P ( r + 1 , c + 2 )  S ( r - 2 , c ) h = ⁢  P ( r - 2 , c - 1 ) - P ( r - 2 , c + 1 )  + ⁢  2 ⁢ ⁢ P ( r - 2 , c ) - P ( r - 2 , c - 2 ) - P ( r - 2 , c + 2 )  S ( r + 2 , c ) h = ⁢  P ( r + 2 , c - 1 ) - P ( r + 2 , c + 1 )  + ⁢  2 ⁢ ⁢ P ( r + 2 , c ) - P ( r + 2 , c - 2 ) - P ( r + 2 , c + 2 )  and the vertical gradient score, D (r,c) v , is computed as follows: D ( r , c ) v = S ( r , c ) v + S ( r , c - 1 ) v + S ( r , c + 1 ) v 2 + S ( r , c - 2 ) v + S ( r , c + 2 ) N S ( r , c ) v =  P ( r - 1 , c ) - P ( r + 1 , c )  +  2 ⁢ ⁢ P ( r , c ) - P ( r - 2 , c ) - P ( r + 2 , c )  S ( r , c - 1 ) v =  P ( r - 1 , c - 1 ) - P ( r + 1 , c - 1 )  + =  2 ⁢ ⁢ P ( r , c - 1 ) - P ( r - 2 , c - 1 ) - P ( r + 2 , c - 1 )  S ( r , c + 1 ) v = ⁢  P ( r - 1 , c + 1 ) - P ( r + 1 , c + 1 )  + ⁢  2 ⁢ ⁢ P ( r , c + 1 ) - P ( r - 2 , c + 1 ) - P ( r + 2 , c + 1 )  S ( r , c - 2 ) v = ⁢  P ( r - 1 , c - 2 ) - P ( r + 1 , c - 2 )  + ⁢  2 ⁢ ⁢ P ( r , c - 2 ) - P ( r - 2 , c - 2 ) - P ( r + 2 , c - 2 )  S ( r , c + 2 ) v = ⁢  P ( r - 1 , c + 2 ) - P ( r + 1 , c + 2 )  + ⁢  2 ⁢ ⁢ P ( r , c + 2 ) - P ( r - 2 , c + 2 ) - P ( r + 2 , c + 2 )  wherein P (r,c) represents a native pixel value of a pixel located at row r and column c of the imager pixel array and N is a number greater than 2.