Method of correcting image data of an image sensor
A method of correcting image data of an image sensor provided herein includes collecting a process window from the image sensor; obtaining weight factors of the process window in various directions based on readout values of the second photodiodes in the process window; obtaining interpolated values of the second photodiodes at positions of the first photodiodes in the first pixel groups in the process window by using the weight factors; and estimating a corrected value B target of a target first photodiode by an equation I: B target =G int ×(B mean /G mean ), wherein G int is the interpolated value of the second photodiodes at a position of the target first photodiode, B mean is a mean of readout values of first photodiodes in a corresponding first pixel group including the target first photodiode and G mean is a mean of the interpolated values of the second photodiodes at positions of the first photodiodes in the corresponding first pixel group.
1 . A method of correcting image data of an image sensor, wherein the image sensor is connected to a processing computer and comprises first pixel groups and second pixel groups alternately arranged along a horizontal direction and a vertical direction, each of the first pixel groups comprises four first photodiodes commonly covered by a first microlens, each of the second pixel groups comprises four second photodiodes respectively covered by four microlenses, and the method comprises:
collecting a process window from the image sensor;
obtaining weight factors of the process window in various directions based on readout values of the second photodiodes in the process window;
obtaining interpolated values of the second photodiodes at positions of the first photodiodes in the first pixel groups in the process window by using the weight factors; and
estimating a corrected value of a target first photodiode of the first photodiodes by an equation I:
B
target
=
G
int
×
(
B
mean
/
G
mean
)
wherein B target is the corrected value of the target first photodiode of the first photodiodes, G int is the interpolated value of the second photodiodes at a position of the target first photodiode, B mean is a mean of readout values of first photodiodes in a corresponding first pixel group including the target first photodiode and G mean is a mean of the interpolated values of the second photodiodes at positions of the first photodiodes in the corresponding first pixel group.
2 . The method of claim 1 , wherein the process window comprises 10×10 of photodiodes among the first photodiodes and the second photodiodes.
3 . The method of claim 1 , wherein each of the weight factors in a component direction of the various directions is obtained by:
obtaining intra-gradients of the readout values of the second photodiodes in the component direction by calculating an absolute value of a difference between the readout values of two adjacent second photodiodes in the component direction;
obtaining global-gradients of binned values of the second pixel groups in the component direction by calculating an absolute value of a difference of binned values of two adjacent second pixel groups, wherein the binned value of each of the second pixel groups is obtained by binning the readout values of the four second photodiodes in the each of the second pixel groups;
multiplying a sum of the intra-gradients and a sum of the global-gradients in the component direction to obtain a gradient value; and
determining the weight factor based on the gradient value in the component direction, wherein the greater the gradient value is the smaller the weight factor is.
4 . The method of claim 3 , wherein the gradient value in the component direction is converted to the weight factor in the component direction by an equation II:
Y n =X n (−θ) , wherein Y n is the weight factor, X n is the gradient value, n indicates the component direction and θ is a positive number.
5 . The method of claim 4 , wherein θ is selected from 0.7~3.0.
6 . The method of claim 1 , wherein the various directions comprise the horizontal direction, the vertical direction, a first diagonal direction and a second diagonal direction.
7 . The method of claim 1 , wherein the interpolated values of the second photodiodes at a position of the target first photodiode is obtained based on component interpolated values in the various directions.
8 . The method of claim 7 , wherein one of the component interpolated values in a component direction of the various directions is obtained from readout values of m second photodiodes, m is a multiple of 2, and the m second photodiodes are arranged in the component direction and adjacent to the position of the target first photodiode, and equally located at opposite sides of the position of the target first photodiode in the component direction.
9 . The method of claim 8 , wherein the one of the component interpolated values in the component direction is obtained by an equation III:
V
n
=
(
∑
i
=
1
m
Rn
i
×
F
i
)
/
∑
i
=
1
m
F
i
Vn is the component interpolated value in the component direction, n indicates the component direction, Rn i is a readout value of an i th of the m second photodiodes, and F i is a component weight value.
10 . The method of claim 9 , wherein F i is larger for one of the m second photodiodes more adjacent to the position of the target first photodiode than another of the m second photodiodes relatively further than the position of the target first photodiode.
11 . The method of claim 9 , wherein F i is larger for one of the m second photodiodes more adjacent to a target first pixel group including the target first photodiode than another of the m second photodiodes relatively further than the target first pixel group.
12 . The method of claim 7 , wherein each of the interpolated values is obtained by an equation IV:
G
int
=
(
∑
Y
n
×
V
n
)
/
∑
Y
n
,
wherein G int is the interpolated value, Y n is the weight factor of the process window in a component direction of the various directions, V n is the component interpolated value in the component direction, and n indicates the component direction.