Patent ID: 8638342

Claim:
A method for processing image data, comprising: using an image processor: receiving a raw image pattern acquired using an image sensor, the raw image pattern comprising a plurality of green, red, and blue pixels arranged in accordance with a color filter array; interpolating a green value for each non-green pixel in the image pattern to obtain a full set of green values for the image data, wherein interpolating the green value for each non-green pixel comprises: receiving a current non-green pixel; determining a horizontal energy component and a vertical energy component for the current non-green pixel; applying horizontal filtering to determine a horizontal component of the interpolated green value for the current non-green pixel; applying vertical filtering to determine a vertical component of the interpolated green value for the current non-green pixel; applying a first weighting factor to the horizontal component and a second weighting factor to the vertical component, wherein the first weighting factor is based at least partially upon the ratio of the vertical energy component to the sum of the horizontal and vertical energy components, and wherein the second weighting factor is based at least partially upon the ratio of the horizontal energy component to the sum of the horizontal and vertical energy components; and summing the weighted vertical and horizontal components to determine the interpolated green value for the current non-green pixel; interpolating a red value for each blue and green pixel of the raw image pattern to obtain a full set of red values for the image data; interpolating a blue value for each red and green pixel of the raw image pattern to obtain a full set of blue values for the image data; and using the full sets of green, red, and blue values to generate a full color image.