Patent ID: 7751642

Claim:
An image processing method, comprising: receiving a raw color image, as produced by an image sensor; generating a color image having a plurality of pixels by processing raw image data from said raw color image, wherein pixels for which color values are absent in said raw image data are assigned color values derived from present color values in said raw image data; generating a sharpening term by processing raw image data from said raw color image; and combining said color image with said sharpening term so as to produce an improved color image; wherein said generating a color image involves interpolating said assigned color values from said present color values in said raw image data; said generating a color image by interpolation comprises determining an orientation of said raw color image in order to adjust said interpolation according to said orientation; and wherein said orientation is determined by: determining a plurality of edge detection matrices corresponding to respective orientations including a vertical orientation and a horizontal orientation, said edge detection matrices being determined using said raw color image and respective convolution matrices corresponding to said respective orientations; determining a plurality of edge detection measures from said plurality of edge detection matrices; and determining said orientation based on comparing values of said plurality of edge detection measures; wherein: said plurality of edge detection matrices includes a horizontal edge detection matrix and a vertical edge detection matrix; said plurality of edge detection measures includes a horizontal edge detection measure and a vertical edge detection measure; if said horizontal edge detection measure is greater than twice said vertical edge detection measure, then said orientation is determined to be said horizontal orientation; and if said vertical edge detection measure is greater than twice said horizontal edge detection measure, then said orientation is determined to be said vertical orientation.