Patent ID: 8330772

Claim:
A method for processing raw image data using front-end processing logic of an image signal processor comprising: using an image processor: receiving the raw image data, the raw image data having been acquired using an image sensor; processing the raw image data to detect and correct defective pixels in the raw image data; processing the raw image data to correct for lens shading distortion after detecting and correcting the defective pixels, wherein correcting for the lens shading distortion comprises applying a lens shading gain to each pixel of the raw image data, the lens shading gain being determined based upon based upon one or more grid points in a gain grid; after the correcting the raw image data for lens shading distortion, processing the raw image data to determine one or more sets of statistics indicative of one or more properties of the image sensor; applying black level compensation to the raw image data after detecting and correcting the defective pixels but before correcting the lens shading distortion; and applying inverse black level compensation to the raw image data after correcting for the lens shading distortion but before determining the one or more sets of statistics.