Patent ID: 8023013

Claim:
A method for correcting pixel values of a plurality of pixels, comprising the steps of: (A) generating said pixel values from a sensor in response to an optical signal; (B) generating a plurality of corrected values by applying a per-pixel correction model to said pixel values, wherein (i) said per-pixel correction model comprises a plurality of gain values and a plurality of offset values, (ii) said per-pixel correction model includes a plurality of bad pixel flags that together indicate at least one bad pixel of said pixels, (iii) at least one of said bad pixel flags is a predetermined one of said gain values and (iv) at least one of said bad pixel flags is a predetermined one of said offset values; (C) comparing for each of said pixels both (i) a corresponding one of said gain values with said predetermined gain value and (ii) a corresponding one of said offset values with said predetermined offset value; and (D) replacing at least one bad pixel value with a new pixel value where said comparing concludes that said corresponding gain value matches said predetermined gain value and said corresponding offset value matches said predetermined offset value, wherein said new pixel value is determined independently of said corresponding gain value and independently of said corresponding offset value.