Patent ID: 8135237

Claim:
A method of processing a digital image, said method comprising: capturing an image from a Bayer patterned pixel array; providing digital Bayer pattern pixel signals corresponding to the pixels of said array; demosaicing said digital Bayer pattern pixel signals to produce said digital image; removing noise from said digital Bayer pattern pixel signals prior to or as part of said demosaicing by using a weight matrix, wherein said step of removing noise further comprises: calculating a plurality of differences between a center pixel being processed and a plurality of surrounding pixels; counting each of the plurality of differences whose value is less than a first threshold to obtain a count; and processing the center pixel based on weighted values for the center pixel and the plurality of surrounding pixels obtained from the weight matrix, wherein the weighted values are determined by using a row of the weight matrix corresponding to the count, and wherein the weight matrix comprises: [ 1 1 1 1 1 1 1 1 / 2 1 / 2 1 1 1 1 1 1 1 1 0 2 1 1 1 1 1 1 0 0 2 2 1 1 1 1 0 0 0 2 2 2 1 1 0 0 0 0 2 2 2 2 0 0 0 0 0 4 2 2 0 0 0 0 0 0 4 4 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 2 2 2 2 0 0 0 0 ] .