1. Field of the Invention
The disclosure generally relates to green imbalance, and more particularly to a lookup-table-based green imbalance correction system and method for an image sensor.
2. Description of Related Art
A Bayer color filter array (CFA) is commonly used in companion with an image sensor, such as a complementary metal-oxide-semiconductor (CMOS) image sensor, to capture color information. One of the disadvantages of the CMOS image sensor is that a gain of a green pixel (Gr) in a line with red pixels usually differs from a gain of a green pixel (Gb) in a line with blue pixels. This gives rise to green imbalance or mismatch. Some common causes of the green imbalance may be layout of photo diode, non-uniformity of a color filter array, lens coating and mounting, and mismatched amplifiers. Therefore, overall green imbalance is ordinarily location dependent and non-uniform. The green imbalance results in lines or cross hatched patterns that are annoying and cannot be negligible.
Conventional methods of overcoming the green imbalance are either computation intensive or incapable of adapting to an electronic apparatus with newly assembled components (e.g., lens).
For the foregoing reasons, a need has arisen to propose a novel scheme of correcting green imbalance in a flexible and fast manner.
In view of the foregoing, it is an object of the embodiment of the present invention to provide a lookup-table-based system and method for correcting green imbalance. A lookup table utilized in the embodiment may be flexibly adapted to an electronic apparatus with different assembled components. One embodiment further corrects green imbalance by taking into consideration the location of pixels under processing.
According to one embodiment, a lookup-table-based green imbalance correction system includes an image sensor with a color filter array placed over the image sensor, a memory, a green imbalance correction device and a color interpolation device. The image sensor is configured to output raw data, and the memory is configured to store a lookup table. The green imbalance correction device is configured to correct the raw data according to the lookup table, thereby resulting in corrected raw data. The color interpolation device is coupled to receive the corrected raw data to result in full-color data.
Before the raw data are subjected to interpolation, by a color interpolation device 13, to result in full-color data that may, for example, be presented on a display device 14 (such as a liquid crystal display), the raw data in the embodiment are furthermore corrected by a green imbalance correction device 12, therefore generating corrected raw data which are rendered with substantially low amount in green imbalance. The green imbalance correction device (“correction device” for short) 12 and/or the color interpolation device 13 may be part of an image signal processor (ISP), or be implemented in hardware and/or software operated under control of the ISP. According to one aspect of the embodiment, a memory 15 is employed to store a lookup table that may be utilized by the correction device 12 to perform green imbalance correction, hence resulting in the lookup-table-based green imbalance correction system 100. The lookup table and its cooperation with the correction device 12 will be detailed in the following paragraphs.
where str is within 0 and 255, and wi is within 0 and 255.
As exemplified in the expression above, the neighboring green pixels Gi are first weighted using (that is, multiplied by) associated weights wi, respectively, and the weighted neighboring green pixels, as a whole, are thereafter adjusted by the strength str.
In the embodiment, the weights wi associated with the neighboring green pixels G1-G4 are determined according to their differences (or distances) with the current green pixel G0 respectively, that is, |Gi-G0| (i=1 to 4).
As described above, the corrected current green pixel may be expressed as summation of weighted neighboring green pixels and the uncorrected current green pixel, and the summation may further be adaptively adjusted in considerations of the location of the process mask within the image. Specifically, in the embodiment, the strength may be determined according to (e.g., be proportional to) a distance between a center (i.e., the current green pixel G0 of the process mask and a prime point of the image made of the raw data. For example, the larger the distance is (that is, near a boundary of the image), the larger the strength is, and vice versa. In the embodiment, the strengths associated with distances may be derived according to parameters stored in the memory 15 and according to corresponding distances. The strengths may thus be derived in real time. No need for changing the strengths may be required unless, for example, another image resolution is configured. The prime point may, but not necessarily, be a center of the image. For example, the prime point may be associated with a focal point of a lens that is deliberatively or unintentionally deviated from a center of the image.
Although specific embodiments have been illustrated and described, it will be appreciated by those skilled in the art that various modifications may be made without departing from the scope of the present invention, which is intended to be limited solely by the appended claims.