Patent ID: 7826656

Claim:
A method for compensating image array data, the image array data comprising a plurality of color pixels, and the color pixels at least comprising a plurality of first color pixels, the method for compensating comprising: selecting one of the first color pixels for compensation, wherein the color pixels horizontally adjacent to the selected color pixel are second color pixels, and the color pixels vertically adjacent to the selected color pixel are third color pixels, wherein the selected first color pixel is defined as A ij , and i represents a row number and j represents a column number, and i and j are positive integers; operating the first color pixels horizontally adjacent to the second color pixel in a predetermined region around the selected first color pixel, so as to obtain a first average value, wherein the steps of obtaining the first average value comprising: capturing and comparing a first plurality of the first color pixels comprising five pixels A (i−2)j , A i(j−2) , A ij , A i(j+2) and A (i+2)j to obtain a first median value; capturing and comparing a second plurality of the first color pixels comprising five pixels A (i−2)(j−2) , A (i−2)(j+2) , A ij , A (i+2)(j−2) and A (i+2)(j+2) to obtain a second median value; and obtaining an average of the first median value and the second median value as the first average value; operating the first color pixels horizontally adjacent to the third color pixel in the predetermined region, so as to obtain a second average value; and obtaining a compensation value according to the first average value and the second average value, so as to compensate the selected first color pixel.