In the following detailed description, reference is made to various specific embodiments in which the invention may be practiced. These embodiments are described with sufficient detail to enable those skilled in the art to practice the invention, and it is to be understood that other embodiments may be employed, and that structural and logical changes may be made without departing from the spirit or scope of the present invention.
Rather than using the conventional method and equation for calculating hue from red, green and blue color component values (RGB), various embodiments of the invention utilize a range of hue values (0°-360°) which may be approximated and represented by a limited number of output values depending on the required degree of precision. Thus, a hue value may be determined from input RGB values without using complex arithmetic operators such as multipliers and dividers.
The pixel cells may be configured to detect only a certain color of light and may thereby be characterized according to the color. Various means may be employed to ensure collection of only the correct color of light for any such designated pixel cell. For example, pixel cells may contain photosensors that are only sensitive to a certain band of wavelengths. In this approach, certain photosensors may be sensitive only to red light, others only to green light, and still others only to blue light. Alternatively, the array may be covered by a color filter array such that each pixel receives light associated with only a particular color (e.g., red, green or blue).
The arrangement of pixel cells by color in pixel array 140 may vary. The Bayer filter is a color filter array (CFA) that is a commonly used in digital imager circuits. The Bayer filter consists of red, green and blue light filters arranged in a checkerboard-like pattern, alternating red and green in one row, blue and green in the next, red and green again in the next, and so on. The rows are aligned such that the columns alternate colors in a similar fashion.
Each color pixel cell outputs a voltage representing a band of wavelengths corresponding to the color. A red pixel cell, therefore, outputs a voltage representing the amount of photons corresponding to red light that is received by that pixel cell. Ideally, the red pixel cell would also output signals representing the amounts of photons corresponding to green and blue light that are incident to the pixel cell. To accomplish this would require relatively complicated or resource intensive circuitry. To avoid such complicated circuitry, estimate values of the missing colors output hue values may be interpolated from the outputs of neighboring pixel cells through a process referred to as a demosaic operation. In the case of an image sensor employing a Bayer pattern, such a demosaic operation yields representative red, green and blue (RGB) output hue values for each pixel cell, producing a more complete and accurate image. Other methods of determining RGB output hue values may also be used.
Pixel cells of pixel array 140 are output row-by-row as activated by a row driver 145 in response to a row address decoder 155. Column driver 160 and column address decoder 170 are used to selectively activate individual pixel columns. A timing and control circuit 150 controls address decoders 155, 170 for selecting the appropriate row and column lines for pixel readout. The control circuit 150 also controls the row and column driver circuitry 145, 160 such that driving voltages may be applied. Generally, each pixel cell outputs both a pixel reset signal Vref and a pixel image signal Vsig, which are read by a sample and hold circuit 161. Vref represents a reset state of a pixel cell. Vsig represents the amount of charge generated by the photosensor in a pixel cell in response to applied light during an integration period. The difference between Vsig and Vref represents the actual pixel cell output with common-mode noise eliminated. The differential signal (Vref-Vsig) is produced by differential amplifier 162 for each readout pixel cell. The differential signals are then digitized by an analog-to-digital converter 175. The analog-to-digital converter 175 supplies the digitized pixel signals to an image processor 180, which forms and outputs a digital image.
It should be evident that although the invention as described herein is, for convenience, described with reference to a CMOS pixel array and readout circuitry, the invention is not so limited. It can be used with any type of image array having color pixel. The image processor 180 applies various effects, algorithms, and operations to the image which require a calculation of the hue value from the red, green and blue color component values. For example, a method described in U.S. patent application Ser. 11/204,117 titled “IMAGE SAMPLING METHOD FOR AUTOMATIC WHITE BALANCE,” which is assigned to Micron, uses hue value variance to select pixels for automatic white balance statistics.
S=(3)(2P) Equation 2.
where P is either zero or a whole number greater than zero and S is the total number of segments 290. For a number of segments 290 satisfying Equation 2, hue values can be determined based on a set of conditionals that will not require complex arithmetic multiplication or division operators, as will be further explained below.
The hue color circle 205 may be divided into different numbers of segments 290 depending on the precision of the hue approximation that is required for a given application.
After the hue color circle 205 has been divided, each segment 290 is assigned a unique output hue value so that each output hue value represents the range of hue values that fall within the segment. Preferably, the output hue value assignments should progress in numerical order from 0 to (number of segments—1), with output hue value 0 corresponding to a segment that includes hue circle degree value 0°, or has a border value of 0°.
After assigning output hue values to segments 290, a table 310 is created to define output hue value conditionals and designate the segment border degree values, as shown in
Mathematically, the conditionals could be created in any desired number of ways since any number of variables, if-then checks or equivalent techniques could be used to describe or evaluate the traits of the color component values 260, 270, 280 within the segments 290. Preferably, the set of conditionals used to create the table should be simple rather than complex, in other words, have fewer variables and conditional checks. It should be understood, however, that the invention does not present a mathematical algorithm for determining the absolute simplest conditional or set of conditionals of all possibilities. It should also be understood that existing circuit layout or system capabilities may dictate a more complex set of conditionals and such circumstances are within the scope of this invention.
In defining the trait or traits upon which the conditionals are based to determine the output hue value, the segment 290 border hue values must be designated as belonging to one or the other segment 290. The segment 290 border hue values for this three segment example would correspond to borders 210, 230 and 250 in
According to the embodiment of
As shown in
H=60((0.7−0.8)/(1−0.7))=−20≈(360°+−20°)≈340°
It should be understood that the traits need not be defined in terms of a two-bit MED_INTERVAL. Instead, the trait may be defined by four one-bit variables or in some other way using the technique of defining the trait based on dividing the range between the MAX and MIN traits into intervals.
The output hue value table can be embedded on a chip or available in the system that will be needing it to determine the hue value approximation. This may be accomplished in any number of ways, including but not limited to programming, storing internally or externally, loading a look-up table of the output values, or building a circuit according to a truth table based on the output table. For example, in the imager 100 (
A typical processor system which may include an imager circuit 480 of the type illustrated in
The illustrated camera system 600, generally comprises a central processing unit (CPU) 610, such as a microprocessor for controlling camera operations, that communicates with one or more input/output (I/O) devices 640 over a bus 660. The imaging device 630, also communicates with the CPU 610 over the bus 660. The system 600 also may include random access memory (RAM) 620, and can include removable memory 650, such as flash memory, which also communicate with the CPU 610 over the bus 660. The imaging device 630 may be combined with a processor, such as a CPU, digital signal processor, or microprocessor, with or without memory storage on a single integrated circuit or on a different ship than the processor.
While the invention has been described in conjunction with specific embodiments, it is evident that many alternatives, modifications, permutations and variations will become apparent to those of ordinary skill in the art in light of the foregoing description. Accordingly, it is intended that the present invention embrace all such alternatives, modifications, permutations and variations as fall within the scope of the appended claims.