Patent ID: 7342607

Claim:
A mathematical calculation method for an image-capturing device, adapted for an image-capturing sensor capturing an image signal, wherein the image-capturing sensor includes a plurality of photocells for obtaining three primary colors (red, blue, green), each photocell catches one color and further estimates the other two color values as three colors of each pixel, and the mathematical calculation method comprising of the following steps: defining two green pixels adjacent to a red pixel R 3 above or beneath vertically as G 6 and G 9 , and two green pixels adjacent to the red pixel R 3 to a left side or to a right side horizontally as G 7 and G 8 , respectively; defining two red pixels spaced one-pixel's distance from the red pixel R 3 above or beneath vertically as R 1 and R 5 , and two red pixels spaced one-pixel's distance from the red pixel R 3 's left side or right side horizontally as R 2 and R 4 , respectively; obtaining four differences (k 1 ˜k 4 ) by subtracting an average value of the two relative red pixels, which is adjacent to a respective one of the mentioned four green pixels (G 6 ˜G 9 ), from the respective green pixel; calculating four weighing values (k 5 ˜k 8 ) from the four differences (k 1 ˜k 4 ); summarizing the value of the red pixel R 3 and the four products which is induced by multiplying the four differences (k 1 ˜k 4 ) and the four weighing values (k 5 ˜k 8 ) respectively, as a green value G 3 ′ in the red pixel; defining four blue pixels adjacent to the upper-left side the, lower-left side, the upper-right side and the lower-right side of the red pixel R 3 as B 18 , B 19 , B 20 and B 21 , respectively; repeating the mentioned steps, in order to get four green values in the other four red pixels and four green values (G 18 ′˜G 21 ′) in the four blue pixels (B 18 ˜B 21 ), respectively; obtaining four differences (k 11 ˜k 14 ) by subtracting four blue pixels (B 18 ˜B 21 ) from the four green values (G 18 ′˜G 21 ′); obtaining a blue value B 3 ′ in the red pixel R 3 by subtracting an average value of the four differences (k 11 ˜k 14 ) from the green value G 3 ′; repeating the mentioned steps, in order to get four blue values (B 1 ′, B 2 ′, B 4 ′ and B 5 ′) in the other four red pixels, respectively; repeating the mentioned steps, in order to get four red values (R 18 ′, R 19 ′, R 20 ′ and R 21 ′) in the four blue pixels, respectively; and obtaining four red values (R 6 ′˜R 9 ′) and four blue values (B 6 ′˜B 9 ′) in a respective one (G 6 ) of the four green pixels (G 6 ˜G 9 ) by calculating the red difference (G 1 ′˜R 1 , G 3 ′˜R 3 ) and the blue difference (G 18 ′˜B 18 , G 19 ′−B 19 ).