Image capture devices that are used to capture images illuminated with florescent lights may have image defects due to the flicker in the illumination from the florescent lights. Image capture devices that use a complementary metal-oxide-semiconductor (CMOS) sensor to capture the image may have the most image defects due to the rolling shutter used with the CMOS sensor.
Fluorescent light fixtures use ballasts to drive the lamp at 2× the line frequency which results in a frequency of 100 Hz (on 50 Hz power systems) and 120 Hz (on 60 Hz power systems). The lamp output varies as the applied voltage cycles between the positive and negative voltages at the 2× frequency.
Image capture device 102 is mounted above a platen 108 for supporting a document or other object to be imaged. The document or other object to be imaged is not shown for clarity reasons. Device 102 is configured to capture an image of a document or other object placed onto platen 108. Illumination device 104 is mounted on one side of image capture device 102 and illumination device 106 is mounted on the other side of image capture device. In other example embodiments of the invention there may be only one illumination device mounted to, or in-line with, the image capture device. The two illumination devices are used to illuminate objects placed on platen 108 so that image capture device can capture an image of the object. In other embodiments, there may be more than two illumination devices.
Image capture device 102 may use a complementary metal-oxide-semiconductor (CMOS) sensor to capture the image of documents placed on the platen 108. CMOS sensors utilize a rolling shutter that moves across the sensor to capture images. The rolling shutter comprises a leading reset edge followed by a readout edge. The readout edge follows the reset edge by a time X. Time X is set based on the desired exposure time and the lighting conditions. Time X is typically in the millisecond (msec) range. The distance or time between the readout edge and the reset edge (Time X) is typically called the exposure length, the exposure time, the integration time, the shutter width or the like. In-between the reset edge and the readout edge is an exposure area. Each time the exposure area travels completely across the image sensor a single image is captured.
Image capture system 100 may be used in an area illuminated by florescent lights. When an image is captured by a camera with a rolling shutter, the flicker causes banding in the image if the shutter width or exposure time is not an integral multiple of the flicker cycle time (or flicker frequency). However, the existence of two unique power systems complicates the issue of determining the flicker cycle, time.
In one example embodiment of the invention, image capture system 100 will capture two images of the object/document placed on platen 108. One of the images will be captured using only the ambient light created by the florescent lights. The other image will be captured using the ambient light and light from the two illumination devices (104 and 106). The time at which the two images are captured will be synchronized to a multiple of the flicker period of the florescent lights. The image captured with just ambient light will be subtracted from the image captured with both ambient light and light from illumination devices 104 and 106 to form the final image. The order in which the two images are captured is not important. The image captured using only ambient light can be the first or second image captured. In one example embodiment of the invention, the light from the two illumination devices (104 and 106) will provide at least 2 times more illumination than just the ambient light. In another example embodiment of the invention, the light from the two illumination devices (104 and 106) will provide between 8 and 10 times more illumination than just the ambient light. In yet another example embodiment of the invention, the light from the two illumination devices (104 and 106) will provide more than 50 times the illumination than just the ambient light.
Because the start times of the two exposures are synchronized to a multiple of the flicker period of the florescent lights, the dark/light bands in each of the two images will be located at the same position. Because the dark/light bands are located in the same place in the two images, subtracting the image captured with only ambient light from the other image will eliminate the variation in brightness due to flicker.
A CMOS image sensor typically comprises N rows of pixels. An image is captured by sequentially exposing each row of pixels. The start of the exposure for each row of pixels corresponds to when a reset edge reaches the row of pixels. The exposure length is controlled by when the following readout edge reaches the row of pixels. The time it takes for the reset edge to travel from one row of pixels to the next row of pixels is called the slew time, and is typically a constant determined by the row readout time of the sensor.
The second image is captured starting at a synchronized time after the image 1 start time. The slew time and the exposure time for the second image are the same as the slew time and the exposure time for the first image. The length of synchronized time is an integer multiple of the flicker period. Because the synchronized time is an integer multiple of the flicker period, the two image start times occur at the same position or phase of the flicker period. Time z is the time between the start of a flicker period and the image start time. Time z is the same for the image 1 start time and image 2 start time. Once the two images are captured, the ambient light image is subtracted from the other image, producing an image that is flicker free. The images are subtracted by taking the value for each pixel in the ambient light image and subtracting that value from the value of the same pixel in the second image.
There are two different flicker periods, one at 100 Hz and one at 120 Hz, depending on where the image capture device is located. In one example embodiment of the invention, the flicker period is determined and the synchronized time is set to an integer multiple of that flicker period. The flicker period can be determined in a number of different ways, for example by determining the geographical location of the device and using a table lookup to determine what is the AC Main power oscillation, by user input or the like. In another example embodiment of the invention, the synchronized time is set to a cycle time multiple of both of the two flicker periods. 50 msec is a cycle time multiple of both of the two flicker periods. When the synchronized time is set to an integer Multiple of 50 msec, the final image will be flicker free when the flicker period is either 100 Hz or 120 Hz.
Some low cost fluorescent ballasts have asymmetry between the two rectified phases. This asymmetry causes a doubling of the flicker period. In areas where low cost fluorescent ballasts may be present, using a synchronized time set to an integer multiple of 16.666 msec, 20 msec or 100 msec will eliminate the flicker for these types of fluorescent lights.
The description above, uses an image capture system were the image sensor is fixed above a platen where the object to be imaged is placed. However, this invention can also be used with a handheld image capture device, for example a digital camera, a cell phone, a PDA, a laptop, or the like. Any movement of the handheld image capture device between capturing the two images can be compensated for by image alignment between the two images, image stabilization during the image capture process or the like. Image alignment is done by spatially aligning the two images before subtraction.