Apparatus and method for calibrating image capture devices

An apparatus and method are disclosed for calibrating image capture devices, such as the type used in electronic devices. In some embodiments, the electronic device may include at least one array of pixels and a memory coupled to the at least one array of pixels. The electronic device may further include a central processing unit (CPU) coupled to the memory and at least one color filter optically coupled to the at least one array of pixels. The memory may further include one or more storage locations that include a response of the at least one color filter to one or more predetermined wavelengths from a target test source, as well as, one or more storage locations that include a response of one or more baseline color filters.

BACKGROUND OF THE INVENTION

1. Technical Field

The present invention relates generally to image capture devices, and more particularly to an apparatus and method for calibrating image capture devices.

Electronic devices are ubiquitous in society and can be found in everything from wristwatches to cellular telephones. With the proliferation of integrated circuitry, these electronic devices are becoming more and more sophisticated. Many of these electronic devices—especially consumer electronic devices—include the ability to take pictures using an image capture device embedded within the electronic device. The actual image capture devices employed in these electronic devices are often solid-state. Examples of image capture devices are charge coupled devices (CCDs) and complementary metal oxide semiconductor (CMOS) sensors devices. These solid-state type image capture devices are often cost effective (which may be especially important when being implemented in consumer electronics) because they are manufactured using semiconductor fabrication principles.

One disadvantage in utilizing solid state image capture devices, however, is that the color balance may vary between image capture devices due to manufacturing variations among the image capture devices. In other words, despite two electronic devices (such as two CCD cameras) being the same make and model, they may have different color balances so that pictures taken of the same object by each device may depict color variations when compared to one another. Color imbalances of this type may be particularly acute for the red content of the image, due to variations in the red and infrared (IR) content of the illumination source, and the effect of the IR blocking filter.

Accordingly, there is a need for calibrating the color response of image capture devices.

SUMMARY

An apparatus and method are disclosed for calibrating image capture devices, such as the type used in electronic devices. The electronic device may calibrate the response of its pixel and/or pixel processing path to certain wavelengths of light (e.g., the IR wavelength) based upon comparisons between the response of its color filter to the response of a baseline color filter. In some embodiments, the calibration of the electronic device may occur after the electronic device has been manufactured, which allows the electronic device to be calibrated without disassembling the electronic device.

In certain embodiments, the electronic device may include at least one array of pixels and a memory electronically coupled to the at least one array of pixels. The electronic device may further include a central processing unit (CPU) coupled to the memory and at least one color filter optically coupled to at least one array of pixels. The memory may store a response of at least one color filter to one or more predetermined wavelengths from a target test source, as well as, further storing a response of one or more baseline color filters to one or more predetermined wavelengths from a target test source.

Another embodiment takes the form of a method for calibrating an image capture device of an electronic device. The method may include the acts of storing, the color response of one or more baseline filters to a source of light having one or more predetermined wavelengths, storing the color response of one or more filters located within the electronic device to the source of light having one or more predetermined wavelengths, comparing the color response of the one or more baseline filters with the color response of the one or more filters located within the electronic device, and adjusting the response of one or more filters located within the electronic device to correspond to the response of the one or more baseline filters.

Yet another embodiment takes the form of a system for calibrating an image capture device configured to react to a light source of a predetermined wavelength, a calibration pattern optically coupled to the light source, at least one color filter optically coupled to the calibration pattern, a memory coupled to the at least one color filter, the memory comprising one or more storage locations, and a central processing unit (CPU) coupled to the memory. The calibration pattern further comprises one or more regions that emanate a predetermined wavelength, where the one or more regions that emanate a predetermined wavelength may be oriented in substantially close physical proximity within the calibration pattern, and where comparisons between at least two of the one or more regions that emanate a predetermined wavelength may be stored in one or more storage locations of the memory.

The use of the same reference numerals in different drawings indicates similar or identical items.

DETAILED DESCRIPTION OF THE INVENTION

The following discussion describes various embodiments that may improve camera calibration and, thus, potentially camera performance. Although one or more of these embodiments may be described in detail, the embodiments disclosed should not be interpreted or otherwise used as limiting the scope of the disclosure, including the claims. In addition, one skilled in the art will understand that the following description has broad application. Accordingly, the discussion of any embodiment is meant only to be exemplary and is not intended to intimate that the scope of the disclosure, including the claims, is limited to these embodiments.

One embodiment takes the form of an electronic device that may adjust the response of its pixel and/or pixel processing path to certain wavelengths of light (such as the IR wavelength) based upon comparisons between the response of its color filter and stored data, which in some embodiments, corresponds to the response of a baseline color filter. In some embodiments, adjustment of the response of the electronic device's pixel and/or pixel processing path may occur after the electronic device has been manufactured, which allows the electronic device to be calibrated without disassembly. As one example, the response of a pixel processing path may be changed based on one or more measured properties of an optical component or components of the electronic device, such as an infrared filter. That is, a correction value may be determined by comparing the response of the IR filter against an ideal IR filter. This correction value may then be used to change the response of the pixel processing path to account for differences between the device's IR filter and the ideal IR filter, as described in more detail below.

FIG. 1depicts an exemplary electronic device100. In this embodiment, the electronic device100may be any of many different types of consumer electronic devices, such as computers, cellular telephones, televisions, wristwatches, and/or standalone camera units to name but a few.

An image capture device105may be incorporated within the electronic device100and may allow the electronic device100to have camera-type functionality (e.g., permitting the device to take photographs). The actual image capture device105implemented in the electronic device100may take various forms and may include one or more arrays of pixels106, where each pixel has a certain photoelectric response when exposed to an object102. In some embodiments, the image capture device105includes CCDs and/or CMOS image sensors fabricated according to semiconductor manufacturing principles.

Each of the pixels in the array106may be pan-chromatic. That is, in the absence of any color filter, each pixel may respond to all wavelengths of visible light (although not necessarily equally to all such wavelengths). As a result the image capture device105may further include one or more filters110A-B. The filters110A-B may include an IR filter110A as well as a color filter110B, where light is filtered by the IR filter110A prior to being filtered by the color filter110B. In embodiments where the image capture device is fabricated according to semiconductor manufacturing principles, the filters110A-B may be integrated within the image capture device105at the time the image capture device105is manufactured. Furthermore, in some embodiments, the color filter110B may be an array of red, green, and blue filters arranged in a Bayer-type array pattern—i.e., with twice as many green items in the array as the red and blue so as to mimic the human eye's greater ability to resolve green light. Essentially, the color filter110B restricts the band of wavelengths of light that may impact the pixel, which in turn makes each such pixel function as if it were sensitive only to that particular set of wavelengths.

During operation, the electronic device100may focus on the object102through an optional lens115. The combination of the filters110A-B and the array106may render a “raw” image, where the incoming light to each pixel in the array106has been filtered to produce less than all of the colors that make up an image. For example, in some embodiments, each pixel in the array106may detect/output one color chosen from the group of red, green, and blue ( the “RGB” color grouping). Since these raw images may contain less than all of the colors required to render the full color image, one or more de-mosaicing algorithms may be implemented. A de-mosaicing algorithm is a digital image process used to interpolate a complete image from the partial raw image received from the color-filtered image sensor. Thus, even though each pixel may render only a single primary color, such as red, green, or blue, the de-mosaicing algorithm may estimate, for each pixel, the color level of all color components rather than a single color component.

In other embodiments, alternative arrangements for the filters110A-B and/or the arrays106may be implemented. For example, the filter110may be a Cyan-Yellow-Green-Magenta filter or a Red-Green-Blue-Emerald filter, each of which may require similar de-mosaicing. In still other embodiments, the arrangements for the filters110A-B and/or the arrays106may not require de-mosaicing. For example, some embodiments may include a Foveon X3 sensor or the like, which layers red, green, and blue sensors vertically rather than using a mosaic. Other embodiments may utilize three separate CCDs, one for each color, with each one having a separate color filter.

If de-mosaicing or other algorithms are executed by an embodiment, they may be stored in a memory120and executed by a central processing unit (CPU), graphics processor or other suitable processor125. (The term “CPU” is intended to encompass all suitable processors.) In some embodiments, the memory120and/or CPU125may be implemented with the image capture device105. For example, if the image capture device105is fabricated using semiconductor manufacturing, then the memory120and/or CPU125may be implemented as part of the same integrated circuit. As will be described in detail below, one or more color-balancing algorithms also may be stored in the memory120.

Implementing the filters110A-B as part of the same circuitry as the array106and the other components within the image capture device105, in general, may make the electronic device100cheaper to build, which may be a design consideration in consumer electronic devices. While some embodiments utilize these more cost effective color filter construction, the ability to filter each of the different colors may vary between electronic devices. Thus, in the embodiments where the filters110A-B are configured to provide RGB filtering, one or more of the red, green, or blue colors may not be as intense, post-filtering in the raw image. As a result, even though two electronic devices (for example, cellular telephones or web cameras) may be the same make and model, they may produce different images, color-wise, of the same object. For example, in many commercial electronic devices, the amount of light passing through the red filter elements will depend on the response of the IR filter110A, which typically blocks light above 650 nanometers while passing light below 650 nanometers. The manufacturing tolerance on the IR filter110A is typically +/−10 nm, which may allow appreciable variation in light transmission through the red filter elements, given the typical pass band of the red filters.

For the ease of discussion the remainder of this disclosure will focus on the response of the filters110A-B with regard to variatons in the IR filter110A. However, it should be noted that this disclosure applies equally to the response of the filters110A-B to any wavelength of light.

FIG. 2Aillustrates an exemplary system200that may used to test and calibrate the color response of the image capture device105and/or the IR filter110A to wavelengths of IR light. In some embodiments, the system200may be capable of testing and calibrating the electronic device100, for example, in a manufacturing environment as part of the final electronic testing of the electronic device100prior to sale. This may allow the IR filter110A (which may be integrated within the image capture device105in some embodiments) to be tested and calibrated without disassembling the electronic device100. In other embodiments, the system200may be used after the electronic device100has been sold, (for example, at a repair shop), to re-test and/or re-calibrate if the electronic device100is suspected of malfunctioning.

Referring to the system200, each of the electronic devices100may be exposed to a target test structure205. The target test structure205may include a light source210of a controlled wavelength. For example, a low temperature incandescent bulb may be used in some embodiments. Also, or alternatively, the target test structure205may include a predetermined calibration pattern215with one or more openings220that allow light from the light source210to emanate toward the image capture device105as shown. In some embodiments, the light may shine through the one or more openings220, while in other embodiments, the light may reflect off the one or more openings220.

Each of the openings220may be configured to emanate a desired wavelength of light. During operation of the system200, the electronic devices100may be exposed to the light emanating from the calibration pattern215such that the color response of the image capture device105and/or filters110A-B to IR wavelength of light may be characterized as explained below. This characterization data may be stored in the memory120. Software or firmware executing on the CPU125may then utilize this characterization data to correct for the color filter's response to IR light as described below.

The calibration pattern215may be implemented in a variety of ways. In some embodiments, a GRETAG MACBETH® color chart may be used. Other embodiments include the exemplary calibration pattern250shown inFIG. 2B.

Referring toFIG. 2B, the calibration pattern250may include one or more reference points255. While the color of the reference points may vary in different implementations, in the exemplary calibration pattern250shown inFIG. 2B, the one or more reference points255are black and white in color. The white and black reference points255may be used by the image capture device105as the upper and lower limits respectively of possible colors visible to the electronic device100. The calibration pattern250also may include a large grey or neutral region263that facilitates the auto-expose and auto-white balance features of the image capture device105during calibration.

Furthermore, the calibration pattern250may include one or more colored zones270,275, and280. These color zones270,275, and280may be configured to emanate predetermined wavelengths of light in order to test the response of the image capture device105. A first color zone270may be configured to emit a wavelength from approximately 620 nanometers to 640 nanometers. A second color zone275may be configured to emit a wavelength from approximately 640 nanometers to 660. Likewise, a third color zone280may be configured to emit a wavelength from approximately 660 nanometers to 680 nanometers. As one example, an ideal transmission characteristic for the IR filter110A in response to exposure to the calibration pattern250may include 100% transmission for 400-640 nanometers, 50% transmission at 650 nanometers, and 0% transmission from 660 nanometers to infinity.

In the embodiment shown inFIG. 2Bthree such color zones are shown. However, any number of color zones in various orientations are possible. For example,FIGS. 2C and 2Dillustrate alternative calibration patterns285and290having different orientations for the of the color zones.

The transmittance of the IR filter110A to each of the color zones270,275, and280is represented inFIG. 3A. Referring toFIG. 3A, the normalized intensity transmittance for each of the color zones270,275, and280is represented as the abscissa axis. The ordinate axis represents the wavelength λ of the light associated with each of the color zones270,275, and280. As can be appreciated by inspection ofFIG. 3A, the light emanating from each of the color zones270,275, and280may be centered about the exemplary wavelengths (640, 650, and 660 nanometers respectively). The actual transmittance transfer function305of the color filter110, which may represent the wavelengths actually “seen” by the image capture device100, is also shown.

In the present example, the manufacturing tolerance of the IR cut-off wavelength for the IR filter110A may be 650±10 nanometers as indicated by the double-sided arrows around the 650 nanometer wavelength inFIG. 3A. This variance in manufacturing tolerance may cause the response of the filters110A-B to vary between electronic devices100. In other words, the amount of red “seen” emanating from the color zone275(which emits light from 640 to 660 nanometers) by the image capture device100may depend on the properties of the IR filter110A.

In some embodiments, the variance between different IR filters110A within the electronic devices100may be categorized into different “bins” within the total variance. Each bin may represent a range of wavelengths that receive similar adjustment (as is described below). The approximately 20 nanometers of variance around the desired 650 nanometer cut-off wavelength shown inFIG. 3Amay be categorized among an equal number of bins. For example, a first bin may be associated with the wavelengths in the 640 to 644 nanometer range, a second bin may be associated with the wavelengths in the 644 to 648 nanometer range, and so on until the 20 nanometer wavelength variance is divided among multiple bins each spanning 4 nanometers. As each IR filter110A is tested within the system200, the result may fall somewhere in the 20 nanometer variance. For example, if the IR filter110A shown inFIG. 2has a cut-off wavelength of 642 nanometers then it will be associated with the first bin having a range of 640-644 nanometers.

With the IR filters110A binned in this manner, one or more algorithms may be implemented to adjust the color response characteristics to match a baseline IR filter, where IR filter110A falling within the same bin may be adjusted similarly. As one example, the embodiment may calculate, via the CPU125, differences between the response characteristics of the electronic device's filter110A and an ideal IR filter to the calibration pattern. Such differences may be stored in the memory120as a correction constant or set of constants and used by the CPU120to adjust image/color data received from the array106.

FIG. 3Bdepicts an exemplary baseline IR filter's characteristic310. In some embodiments, the exemplary baseline IR filter's characteristic may be based on selecting an IR filter110A from among a plurality of IR filters to be used in manufacturing the electronic devices100. A manufacturer of the electronic device100may purchase a group image capture devices105and/or IR filters110A from a certain vendor. Samples from within this group of IR filters110A may be tested, either in response to the calibration pattern250or in an alternative systems. From these samples, a baseline filter may be selected that has a cut-off wavelength closest to the desired behavior. For example, the IR filter110A from the sample that has a wavelength closest to 650 nanometers may be selected as the baseline filter.

As shown inFIG. 3B, the IR filter's characteristic310may almost completely transmit light below about 640 nanometers and begin to taper off above that point by emitting about half as much light at 650 nanometers, and then transmitting almost no light at or above 660 nanometers. In some embodiments, the data associated with the baseline filter's response may be stored in the memory120at the time the electronic device100is manufactured.

By comparing the IR filter's characteristic310with the characteristics of the IR filter110A associated with the established bins, adjustment factors for the IR filter110A may be determined. For example, in some embodiments one or more look-up tables may be constructed so that for a particular bin pixel intensity measurements in the raw image may be scaled by values in the look-up tables. Thus, if the IR filter110A has a cutoff wavelength of 642 nanometers and therefore falls within a first bin (because they have a wavelength range of 640-644 nanometers), then the measured pixel intensities in the raw image coming may be scaled up according to the values in the look-up table by the CPU125. Utilizing a look-up table in this manner may reduce the calculation requirements of the CPU125. In other embodiments, instead of using look-up tables the amount of adjustment for each of the pixel intensities may be calculated according to mathematical algorithms.

In some embodiments, the ratios of the response of the IR filter110A to each of the color zones270,275, and/or280may be made. By using ratios of the response to each of the color zones270,275, and/or280, variations (e.g., due to light source aging, temperature variations, etc.) may be compensated for. For example, as the light source210ages the intensity of the light emanating from any one of the color zones270,275, and/or280may fade. Despite any one of the color zones270,275, and/or280fading as the light source210ages, if the ratio of the response to the color zones270,275, and/or280is used instead of just one of the values, then aging or other variations may cancel each other out. Mathematically, this concept may be expressed as:

Intensity=↓Green↓Red.
Thus, the intensity of the red primary color alone over time may be decreasing if monitored alone as a representation of image intensity, but the ratio of the green primary color to the red primary color would track this out if it were used as a measure of image intensity.

In some embodiments, the empirical calibration data and/or response of the IR filter110A to the target test structure205may be tracked by the manufacturer of the electronic device100. The manufacturer may keep track of which bin the IR filter110A falls in for each electronic device manufactured. In this manner, the manufacturer may later decide to update the look-up tables or mathematical algorithms used to calculate color adjustment values by updating the values stored in the memory120. For example, this may occur during a firmware update.

This information may assist the manufacturer in the event that a malfunction is discovered with the electronic devices100that may be associated with a batch of filters110A-B, such as filters from a particular manufacturer.

FIG. 4is an exemplary flowchart of a method that may be implemented by the electronic device100, or associated with software and/or hardware, to calibrate the image capture device105. In operation405, data associated with the baseline IR filter to the target test structure205, may be stored in the memory120. Note that multiple sets of calibration data, each associated with different baseline filter responses (for example, mimicking filters associated with different colors) may be stored in the memory120.

The electronic device100is exposed to the target test structure205in operation410. In some embodiments, the electronic device100is exposed to the same target structure that the high quality IR filter was exposed to.

During the exposure of operation410, a ratiometric comparison of wavelengths of light emanating from the one or more openings220may be made by the CPU125. As described above, this ratiometric comparison may allow variations—e.g., due to aging of the target test structure205—to be negated or minimized. The results from the exposure that occurred in operation410may be stored in the memory in operation412.

In operation415, the stored ratiometric comparison may be compared to data from the baseline filter to determine the spectral properties of the IR filter110A. With the comparison between the IR properties of the IR filter110A and the spectral properties of the baseline filter made, one or more correction methods may be implemented as shown in operation420. The one or more correction methods may be executed by the CPU125, for example, by executing firmware or software stored in the memory120when the electronic device100was built.

The actual adjustments made by the exemplary methods in operation420may vary based upon the function being performed by the image capture device105. For example white balancing the raw image may include calculating the maximum and minimum operating ranges based upon the black and white reference points255. If 8-bit color is used, the black point may be associated with a binary value of 0 while the white point may be associated with a binary value of 255. Accordingly, measuring the intensity of each of the red, green, and blue channels, may yield the following relationships:

Gainred=255200⁢⁢Gaingreen=255255⁢⁢Gainblue=255128.
These may be used as the expected gains and coded into the firmware for color balancing operations. The cut-off wavelength of the IR filter110A may vary, for example the IR filter110A may have a higher cutoff wavelength as depicted by the right hand side of the double sided arrow inFIG. 3A. In the event that the IR filter110A has a higher IR cutoff wavelength, then the expected intensity value of the red channel may be higher than expected and skew the color balancing operations. Accordingly, the Gainredmay be adjusted based upon the color filter's measured response to the target test structure205, such as when the image capture device105is performing a white balance.

In some embodiments, the methods used to correct the color filter110may be modified by connecting the image capture device100to a data feed from the manufacturer. For example, if the electronic device100is a multifunctional cellular telephone (such as the iPhone manufactured by Apple Inc. of Cupertino, Calif.), then connecting the cellular telephone to the manufacturer's web site through the Internet (e.g., wired or wireless) may periodically update the data and/or methods used to correct the color filter110that are stored in the firmware.