METHOD FOR COMPENSATING PIXEL INTERFERENCE OF IMAGE

Information

  • Patent Application
  • 20080063269
  • Publication Number
    20080063269
  • Date Filed
    January 18, 2007
    17 years ago
  • Date Published
    March 13, 2008
    16 years ago
Abstract
A method for compensating a pixel of an image is provided The method includes using four median value extraction matrices to obtain the edge information of the image, where the edge information obtained by two of the matrices is Gb value, and the edge information obtained by the other two matrices is Gr value, calculating the corresponding average values of the Gb and Gr values, multiplying a differential value between the average value of the Gb value and the average value of the Gr value with a proportion value to obtain a compensation value, and adding the compensation value to or subtracting the compensation value from the original Gb and Gr values to obtain compensated Gb and Gr values.
Description

BRIEF DESCRIPTION OF THE DRAWINGS


FIG. 1 is a block diagram of the circuit of a conventional image capturing device.



FIG. 2 is a schematic view of a 5×5 Bayer array data.



FIG. 3 is a schematic view of the conventional compensation technique to image array data.



FIG. 4 is a schematic view of a 5×5 Bayer array data according to a preferred embodiment of the present invention.





DESCRIPTION OF EMBODIMENTS


FIG. 4 is a 5×5 Bayer array data 40. Referring to FIG. 4, the present invention uses four standard median filters to obtain tiny components β1, β2, β3, and β4, which are obtained by the following formulas.





β1=SMF(Gb02,Gb20,Gb22,Gb24,Gb42)





β2=SMF(Gb00,Gb04,Gb22,Gb40,Gb44)





β3=SMF(Gr11,Gr13,Gr33)





β4=SMF(Gr11,Gr31,Gr33)


Here, SMF refers to the operation of extracting the median value. Assuming Gb02>Gb20>Gb22>Gb24>Gb42, the output of the standard median filter is Gb22. Similarly, persons of ordinary skill in the art can sequentially determine the values of β2, β3, and β4. β1 and β2 reveal the edge information of the Gb pixels in this embodiment. On the other hand β3 and β4 reveal the edge information of the Gr pixels in this embodiment. Through the filter element distribution of the four standard median filters, the components of the tiny line structures falling in the Gb and Gr pixels are obtained respectively. Regardless whether the line structures in this embodiment are straight lines, oblique lines, right angles, V-shaped lines, or any other polygons, the tiny components of the Gb and Gr pixels can be obtained using the four standard median filters.


Then, the average value of β1 and β2 of the Gb pixels is obtained, i.e., the average value of the tiny structures in the Gb pixels is obtained, which is represented by d1 as follows.







d
1

=


(


β
1

+

β
2


)

2





similarly, the average value of β3 and β4 of the Gr pixels is obtained, i.e., the average value of the tiny structures in the Gr pixels is obtained, which is represented by d2 as follows.







d
2

=


(


β
3

+

β
4


)

2





Then the compensated Gb22 is calculated according to the formula below.





Gb
22
new
=Gb
22+(d2−d1)/2


The components of each of the compensated Gb and Gr pixels can be obtained by repeating the above steps.

To sum up, the method of the present invention compensates the interference of the pixels of the image sensor in the regions with uniform and smooth colors, on the tiny line structures and on the edges thereof, so as to suppress the occurrence of the false colors.


It will be apparent to those skilled in the art that various modifications and variations can be made to the structure of the present invention without departing from the scope or spirit of the invention. In view of the foregoing, it is intended that the present invention cover modifications and variations of this invention provided they fall within the scope of the following claims and their equivalents.

Claims
  • 1. 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 Aij, 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.operating the first color pixels horizontally adjacent to the third color pixel in the predetermined region, so as to obtain a second average value; andobtaining a compensation value according to the first average value and the second average value, so as to compensate the selected first color pixel.
  • 2. The method for compensating image array data as claimed in claim 1, the method for compensating further comprises: capturing and comparing five pixels A(i−2)j, Ai(j−2), Aij, Ai(j+2) and A(i+2)j to obtain a first median value;capturing and comparing five pixels A(i−2)(j−2), A(i−2)(j+2), Aij, A(i+2)(j−2) and A(i+2)(j+2) and to obtain a second median value; andobtaining an average of the first median value and the second median value as the first average value.
  • 3. The method for compensating image array data as claimed in claim 1, further comprising: capturing and comparing three pixels A(i−1)(j−1), A(i−1)(j+1) and A(i+1)(j+1) to obtain a third median value;capturing and comparing three pixels A(i−1)(j−1), A(i+1)(j−1), and A(i+1)(j+1), to obtain a fourth median value; andobtaining an average of the third median value and the fourth median value as the second average value.
  • 4. The method for compensating image array data as claimed in claim 1, further comprising multiplying a differential value between the second average and the first average value with a proportion value to obtain the compensation value.
  • 5. The method for compensating image array data as claimed in claim 1, further comprising adding the compensation value to the original Aij value to obtain a new Aij value.
  • 6. The method for compensating image array data as claimed in claim 1, wherein the first color pixels are green pixels.
  • 7. The method for compensating image array data as claimed in claim 1, wherein one of the second color pixels and the third color pixels are red pixels, and the other are blue pixels.
Priority Claims (1)
Number Date Country Kind
95133604 Sep 2006 TW national