CROSS REFERENCE TO RELATED APPLICATIONSThis application is a divisional of U.S. Ser. No. 10/921,692, filed on Aug. 19, 2004, which is a continuation of U.S. Ser. No. 09/387,068, filed Aug. 30, 1999, which claims the benefit of U.S. Ser. No. 60/098,581, filed Aug. 31, 1998, all of the preceding are herein incorporated by reference.
BACKGROUND OF THE INVENTIONThis invention relates generally to color digital cameras, and more particularly to the processing of pixel information generated by the sensor of a color digital camera.
Digital color cameras are used with computer or other digital processing systems. Such cameras include a sensor, optics, preprocessing electronics, and a cable or other communication link to transfer data to the digital processing system. Digital cameras are made by Connectix, Intel, and others.
In a conventional digital camera, the sensor is often a charge coupled device (CCD) that produces electrical image signals corresponding to an object producing or reflecting light onto the sensor. The electrical image signals are then processed and recorded on a storage medium such as a memory card or other computer readable medium.
A problem encountered with digital cameras is that the sensor can become saturated when the light intensity exceeds the intensity saturation limit of the sensor. When the light level is above the saturation level of the sensor, all further video information, other than the saturation information, is lost. In the past, this problem has been addressed by attempting to manipulate the amount of light striking the sensor or adjusting the sensor itself.
Some of the prior art has attempted to utilize a light intensity measuring circuit which processes data from the sensor and controls movement of an iris. The iris closes to restrict the amount of incident light striking the sensor and opens to allow more incident light to strike the sensor. However, the movement of the iris is slow compared to other means of intensity adjustment. Furthermore, due to its mechanical nature, the iris often closes more than necessary or doesn't close enough, at which point it must be repositioned. The result is slow correction time and fluctuations in brightness, ending in degradation of picture quality. The latter is especially if utilized with video cameras, where the fluctuating brightness is captured. Furthermore, a solitary bright light can cause the iris to close so much that gradation of the dark regions becomes compressed and deteriorated. The same occurs when direct strong light is incident, such as in the case of strong rear lighting.
In a system in which an electric charge corresponding to an amount of light received is accumulated on a photodiode and passed to an n-layer substrate of the sensor, other prior art has sought to draw away excess voltage that flows from the photodiode of the sensor when an excessive amount of light is received. For example, a p-layer is positioned between the photodiode and substrate of the sensor and grounded. This applies a reverse bias voltage to the substrate and p-layer so that a depletion layer is formed between the photodiode and the substrate. Surplus electric charges that overflow from the photodiode, due to an excessive amount of received light, are absorbed in the depletion layer. The voltage of the substrate is then adjusted to accommodate bright and dark scenes. A great disadvantage is that signals from the photodiodes are disrupted in that they must now pass through a layer specifically designed to absorb such signals. Another disadvantage of this is that the voltage of the substrate must be preset based on estimated light conditions, especially disadvantageous for capturing moving video. Another disadvantage is that the voltage of the entire substrate must be changed, not just for the portion receiving the excessively intense light. This results in poor picture quality in that bright areas of light are compensated for but dim spots are not.
Another problem encountered with digital cameras is that picture quality drops as the light intensity falls below a certain level. Furthermore, even images in a dark portion of a scene can be hard to observe if a direct strong light is incident in the scene. The prior art has attempted to correct such problems by monitoring signals from the sensor that have been separated into red, green and blue component signals and have also been gamma corrected. Then, a dark area proportion in a whole picked up image is detected. Next, a portion of the processed original signal is modified to stretch the dark signal region to improve the gradation of the dark area. The processed original signal and the modified signal are combined to output a resultant gradation improved signal. The disadvantage of this prior art method is that separation and gamma correction of the original signal are performed before the dark area is detected. This reduces the accuracy of the detection of the dark area. Further, the dark area is estimated from the processed original signal as a whole, not on a pixel by pixel basis, further reducing the accuracy of the detection of the dark area and making correction of the dark area more difficult.
SUMMARY OF THE INVENTIONIn the present invention, an electrical signal from a light sensor is monitored to detect an intensity saturation condition of at least one pixel of the light sensor. The intensity saturation condition of the pixel is at saturation upon receiving light with an intensity above a predetermined level and below saturation upon receiving light with an intensity below a predetermined level. The electrical signal is converted to a digital signal. A reserved bit combination is imposed on the digital signal indicating the intensity saturation condition of the pixel. A control signal is transmitted in response to the bit combination of the digital signal to compensate for the intensity saturation condition of the pixel. An analog to digital converter can be utilized to convert the electrical signal to the digital signal. The analog to digital converter may be programmable to receive electrical signals of different intensities from the light sensor.
Monitoring the electrical signal may include determining whether a voltage of an electrical signal from the light sensor is above a predetermined level. Further, the control signal may reset the predetermined level of voltage. The analog to digital converter may form part of an analog to digital circuit that also includes an AND gate and an OR gate.
The electrical signal from the light sensor may include a series of signals scanned from preselected pixels from an array of pixels of the sensor, or may include a series of signals scanned pixel by pixel from the array of pixels of the sensor.
In one aspect of the invention, an integrated circuit may perform the aforementioned actions. The integrated circuit may form part of a camera module. Optionally, the camera module may further include the light sensor, a lens assembly aligned with the light sensor, and a printed circuit board supporting the integrated circuit.
In another embodiment of the present invention, pixel data from an output of a light sensor is monitored to determine a number of pixels at saturation. The number of pixels at saturation are compared to a predetermined threshold number. The light sensor is reprogrammed to adapt to more brightness if the number of pixels at saturation is above the threshold number. The light sensor may also be programmed to adapt to less brightness if the number of pixels at saturation is below the threshold number.
A saturation detector may be coupled to the light sensor for detecting an intensity saturation condition of the light sensor. The saturation detector can be reprogrammed to adapt to more brightness if the number of pixels at saturation is above the threshold number. The monitoring of the pixel data may be performed without disturbing data flow. Optionally, reprogramming of the saturation detector can be performed in predetermined increments.
In yet another embodiment of the present invention, pixel data from an output of a light sensor is monitored to determine a number of pixels near saturation. The number of pixels near saturation are compared to a predetermined threshold number. The light sensor is reprogrammed to adapt to less brightness if the number of pixels near saturation is below the threshold number.
A saturation detector may be coupled to the light sensor to detect an intensity saturation condition of the light sensor. The saturation detector may be reprogrammed to adapt to less brightness if the number of pixels at saturation is below the threshold number. Optionally, reprogramming of the saturation detector may be performed in predetermined increments. The pixel data may also be monitored without disturbing data flow.
In still yet another embodiment of the present invention, pixel data from an output of a light sensor is monitored to determine a number of pixels at saturation and a number of pixels near saturation. The number of pixels at saturation is compared to a predetermined first threshold number and the number of pixels near saturation are compared to a predetermined second threshold number. The light sensor is reprogrammed to adapt to more brightness if the number of pixels at saturation is above the first threshold number. The light sensor is reprogrammed to adapt to less brightness if the number of pixels near saturation is below the second threshold number.
In one aspect of the invention, a saturation detector may be coupled to the light sensor to detect an intensity saturation condition of the light sensor. The saturation detector can be reprogrammed to adapt to more brightness if the number of pixels at saturation is above the first threshold number, and can be reprogrammed to adapt to less brightness if the number of pixels near saturation is below the second threshold number. Optionally, reprogramming of the saturation detector can be performed in predetermined increments. Also, monitoring the pixel data may be performed without disturbing data flow.
In yet another embodiment of the present invention, a saturation detector detects and measures an intensity saturation condition of at least one pixel of a light sensor. The saturation detector emits a digital signal with a reserved bit combination indicating the intensity saturation condition of the pixel. A processor receives and processes the digital signal from the saturation detector and transmits a control signal in response to the digital signal to compensate for the intensity saturation condition of the pixel.
The saturation detector may include a voltage detector for determining whether a voltage of an electrical signal from the light sensor is above a predetermined level. The voltage detector may be programmable such that the control signal resets the predetermined level of the voltage. The saturation detector may include an analog to digital converter for converting an electrical signal from the light sensor into a digital signal for indicating the intensity saturation condition of the pixel. Optionally, the analog to digital converter may be programmable to convert electrical signals of different intensities. Also, the analog to digital converter may form part of an analog to digital circuit that also includes an AND gate and an OR gate
The present invention detects situations where too much light is being received, or too little light is being received. When such conditions are detected, they may be corrected by altering the setting of an ADC and a voltage detector on a preprocessor, and by altering the gamma correction and color correction on a host or digital processor. Such gamma and color correction can take place on a pixel by pixel basis.
An intensity saturation condition for each of the pixels of the light sensor may be detected, and a reserved bit combination may be imposed on an ADC output bus to inform a digital processor of the saturation condition for some or each of the independent pixels. A digital processor can use this information to control the ADC to compensate for the saturation condition.
Because the saturation condition of individual pixels is scanned, gamma and color correction may take place on a pixel-by-pixel basis, providing the advantage of producing excellent picture quality free of excessively bright and dim areas. Further, random sampling may be used to reduce the consumption of electric power.
These and other advantages of the present invention will become apparent to those skilled in the art upon a reading of the following descriptions of the invention and a study of the several figures of the drawing.
BRIEF DESCRIPTION OF THE DRAWINGSFIG. 1 is a block diagram of a camera system including an apparatus for detecting camera sensor intensity saturation;
FIG. 2 is a schematic of the camera sensor intensity saturation apparatus ofFIG. 1;
FIGS. 3aand3bshows a waveform illustrating operation of the voltage detector shown inFIG. 2;
FIG. 4 is a table of the logic of the XOR gate;
FIG. 5 is a flow diagram for a process implemented by the digital processor ofFIG. 1 to control the ADC ofFIG. 2 in response to the detection of an intensity saturation condition of the sensor; and
FIG. 6 is a diagram illustrating the brightness value ranges associated with pixel data from a camera sensor.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTSInFIG. 1, a digitalvideo camera system10 includes alens assembly12, asensor14 for converting incident light into a video signal, an analog/digital preprocessor16, and adigital processor18. Thelens assembly12 focuses an image of anobject20 on asurface22 of thesensor14. Often, thelens assembly12,sensor14, andpreprocessor16 are housed within a common housing or enclosure (not shown). Thedigital processor18 may, in some circumstances, also be housed within the same enclosure. However, in many instances thedigital processor18 can be an external processor, such as a microcomputer.
The lens assembly can be in any suitable form, including a simple plastic lens assembly or a complex multi-lens optical assembly, depending upon the application. Thesensor14 is one of a variety of solid-state sensors made by, for example, charge coupled device (CCD) or complementary metal oxide semiconductor (CMOS) technologies.
Thepreprocessor16 preferably includes a number of sections including an analog to digital converter (ADC)24,other processing circuitry26, and controllogic28. Analog sensor data is input into thepreprocessor16 over ananalog bus30, and digital sensor data is output from thepreprocessor16 overdigital bus32. Thedigital processor18 receives the digital “video” data overbus32, and provides control signals to thepreprocessor16 overcontrol bus34. As will be discussed in greater detail below, thepreprocessor16 of the present invention detects an intensity saturation condition on the analog “video”bus30, informs thedigital processor18 of the condition by a particular bit pattern over thedigital video bus32, and then thedigital processor18 provides appropriate control signals over thecontrol bus34 to compensate for the saturation condition.
InFIG. 2, theADC circuit24 of the present invention is shown in greater detail. More particularly, one embodiment ofADC circuit24 includes aprogrammable ADC36, aprogrammable voltage detector38, an ANDgate40, and an exclusive or (XOR)gate42. The ADC in the present example receives an analog input on aline44 and has ten (10)output lines46 as the ADC output. These outputs range from the most significant bit (msb) to the least significant bit (lsb). The circuitry and logic of theADC circuitry24 imposes a particular bit pattern on the preprocessedADC output48 when the intensity level on theline44 exceeds a predetermined value or threshold, or is otherwise detected to be in saturation. The particular bit pattern chosen in this embodiment is “1111111111” in binary or “1023” in decimal.
TheADC36 is a conventional programmable ADC circuit that takes the analog signal online44 and converts it to digital signal onbus48. Therefore, this ADC has ten bits of resolution. Other embodiments have more, none or fewer bits of resolution. The signal online46 is a series of signals scanned pixel-by-pixel from the array of pixels on thesurface22 ofsensor14. TheADC36 can be controlled as far as sensitivity to different intensity ranges via anADC control line50 forming a part of thecontrol bus36 from thedigital processor18.
Theprogrammable voltage detector38 is used to detect the voltage level online44 to determine when a particular pixel is saturated. When the pixel is saturated, the ADC output is set to all 1's to signal a saturation condition for that pixel. It should therefore be noted that the saturation detection is on a pixel-by-pixel basis, and that thedigital processor18 can act upon the pixel saturation information to control the ADC viaADC control line50.
The actual threshold VTHdetected by thedetector38 can be set by adetector program line52. More particularly, thedetector38 can include a register that can be programmed vialine52 to determine the threshold voltage VTHonline44 which will create a digital output signal on aline54. In the present embodiment, the digital output signal online54 is “1” or “HI” when the voltage V on theline44 is below VTH, and the digital output signal online54 is “0” or “LO” when the voltage V on theline44 is above VTH. Therefore, in this embodiment, a LO signal on theline54 indicates a saturation or “whiteout” condition.FIG. 3 illustrates the relationship between the voltage V online44 and the output of thedetector38. Of course, other circuits can be used to determine a saturation condition for the sensor array. Voltage threshold detection is only one method for accomplishing this task.
The ANDgate40 has 11 inputs, where one input is coupled to theoutput line54 of thedetector38, and where the remaining 10 inputs are coupled to theADC output bus46. Therefore, the output of the ANDgate40 on a line B will be “1” or “HI” only when thebus46 is at 1111111111 (in binary) and when the voltage V oninput line44 is below VTH. Under these conditions, the output X ofXOR42 is forced to 0 (LO), forcing the output of preprocessedADC output bus48 to 1111111110. This is because the output on thebus48 of 1111111111 is reserved to signal a saturation condition.
When the voltage V online44 is above the threshold voltage VTH, the output of the ADC onbus46 will be 1111111111, and the signal online54 will be 0. This will cause the output of the ANDgate40 to go “LO” or “0”, allowing the output of theXOR42 to become the same as the lsb onbus46, i.e. to become 1. Theoutput bus48 will therefore be 1111111111, signaling the saturation of that pixel. When the output on thebus46 is other than 1111111111, the output of the ANDgate40 will be 0, and the data on thebus48 will be the same as the data on thebus46.
The logic of theXOR gate42 is shown inFIG. 4. That is, when the input on line B to theXOR gate42 is LO, then the output of the XOR gate is the same as the input on line A. The condition where A is LO and B is HI is impossible, since a LO signal on A would force B LO as well. When both A and B are both HI, then x is forced LO by theXOR gate42.
InFIG. 5, aprocess56 for detecting camera sensor intensity saturation as implemented by adigital processor18 begins at58, and the flags “A” and “B” are cleared in anoperation60. Then, in anoperation62, the process “eavesdrops” on a frame of pixels; keeping a running count of bright and whiteout pixels. By “eavesdrops” it is meant that the process does not disturb the data flow, but merely monitors the pixel data as it is received. This is usually accomplished by using a few registers to keep count of certain pixel types, including bright and whiteout pixels. A “bright” pixel is near, but not yet at, saturation. A “whiteout” pixel is at saturation, and is designated by “1111111111” in this example.
Next, in a decision operation64, it is determined whether the number of whiteout pixels are greater than a threshold1 number. A typical threshold1 number for whiteout pixels depends upon the brightness of a scene, but for an average scene, the threshold1 may be about 20 whiteout pixels. If it is greater than the threshold1, anoperation66 sets flag A to indicate that thepreprocessor16 should be reprogrammed for a brighter scene. This is accomplished, at least in part, by reprogramming theADC50 and thevoltage detector38.
Operation68 determines whether the number of bright pixels is less than a threshold2, which is typically about 50, but which again is dependent upon the scene. If it is less than the threshold,operation70 sets flat B to flag that thepreprocessor16 should be reprogrammed for a darker scene. This, again, is accomplished in part by reprogramming theADC50 and thevoltage detector38.
Operation72 determines whether the A flag has been set. If so,operation74 reprograms theADC50 and thevoltage detector38 to handle an incrementally brighter scene. TheADC50 is programmed to cover a wider range of voltages with the same number of bit combinations. Thevoltage detector38 is reprogrammed to raise the threshold voltage VTH. This is accomplished incrementally to avoid making too large of a step.
Operation76 determines whether the B flag is set and the A flag is not set. If these conditions are true, then anoperation78 reprograms thesensor ADC36 and thevoltage detector38. More particularly, theADC50 is programmed to cover a narrower range of voltages for the same number of bit combinations. Thevoltage detector38 is reprogrammed to lower the threshold voltage VTH. This is accomplished incrementally to avoid making too large of a step. Theprocess56 is then completed at80 awaiting the next frame of data.
FIG. 6 illustrates the different categories of brightness in the present example. Here, thevalue 1023 represents whiteout, while values of about 900 to 1022 represent the bright pixel range. Values below about 900 represent the non-bright pixel range.
It will therefore be appreciated that the process and apparatus of the present invention detects a saturation condition and forces a digital output bus to a predetermined pattern to indicate the saturation condition. The process and apparatus of the present invention prevents the predetermined pattern from occurring when the saturation condition is not present.
It will further be appreciated that the present invention detects situations where too much light is being received, or too little light is being received. When such conditions are detected, they are corrected by altering the setting of an ADC and a voltage detector on a preprocessor, and by altering the gamma correction and color correction on a host or digital processor, as will be appreciated by those skilled in the art.
It should be noted that the logic used in the example ofFIGS. 1 and 2 and the processes illustrated inFIG. 5 exemplify only one implementation of the present invention. Those skilled in the art will appreciate that other logic components can accomplish the design goals of the present invention. For example, NAND gates, OR gates, inverters and other forms of logic can be used to accomplish the goals of the invention, which includes the detection of a saturation condition, the imposition of a particular bit pattern on the video output bus, and the correction of the saturation condition in response thereto. Likewise, alternative process operations can be used to implement the present invention.