This disclosure relates to providing a two-dimensional color image starting from a color pattern image.
An electronic imaging system depends on an electronic image sensor to create an electronic representation of a visual image. Examples of such electronic image sensors include charge coupled device (CCD) image sensors and active pixel sensor (APS) devices (APS devices are often referred to as CMOS sensors because of the ability to fabricate them in a Complementary Metal Oxide Semiconductor process). Typically, these image sensors include a number of light sensitive pixels, often arranged in a regular pattern of rows and columns. For capturing color images, a pattern of filters called a color filter array (CFA), is typically fabricated on the pattern of pixels, with different filter materials being used to make individual pixels sensitive to only a portion of the visible light spectrum. The most common two-dimensional CFA pattern is the Bayer CFA pattern U.S. Pat. No. 3,971,065. When a CFA is employed, some way of combining spatially separated pixels that sample different spectral bands (different colors or possibly different wavelength bands outside the visible region) is required. This process is called demosaicing or CFA interpolation.
While the terminology used here started with color filter arrays, it is possible for a single channel image to have a color pattern like a CFA pattern, even though there is not a one to one correspondence between the pixels in the image and individual filtered photoreceptors on an image sensor. These images have spatially separated pixels that sample different spectral bands (different colors or possibly different wavelength bands extending outside the visible region). These images are referred to as color pattern images and include images captured with a color filter array as a subset of color pattern images.
A color pattern is defined by the combination of a minimal repeating unit and set of effective spectral sensitivities. Processing an image with an RGB Bayer color pattern to produce a smaller image with an RGB Bayer color pattern is known in the prior art, such as in U.S. Pat. No. 6,366,318. This processing changes the size of a color pattern image, but does not produce an image with a different color pattern.
For any of these color pattern images, if one or more of the wavelength bands extend outside the visible region, the resulting fully populated image may be a pseudo color image.
In this discussion, the full size of a color pattern image is defined as the pixel dimension of the single channel color pattern image, regardless of the color pattern. The result of color pattern interpolation is to produce an image with multiple color channels populated for each pixel. Often, the image output from color pattern interpolation has the same dimensions as the starting single channel color pattern image. Interpolation of a single channel color pattern image can also produce a smaller or larger output image, but in all cases, multiple color channels are populated for each pixel. It is common for the output image to be smaller than the input image, for example in preparing a low-resolution preview image from a large color pattern image.
A poor color pattern interpolation will produce color and spatial artifacts that are not consistent with the original scene. The Bayer pattern has a long history so there are a large number of techniques available for converting a Bayer color pattern image into a full color image. Because these techniques have been developed over an extended period of time they are fairly efficient and robust, providing good color pattern interpolation.
In development of image sensors with novel CFA patterns, there is a need for the development of complementary processing algorithms. At the same time, there is an existing base of well-understood algorithms and hardware optimized for existing color pattern patterns such as the Bayer CFA. There is a need to process images with novel color patterns using existing algorithms and hardware.
It is therefore an object of the present invention to provide an improved way of interpolating color pattern images to full color images or pseudo color images so the resulting image better represents the original subject.
The object is achieved by a method of processing a digital image having a predetermined color pattern, comprising:
This and other aspects, objects, features and advantages of the present invention will be more clearly understood and appreciated from a review of the following detailed description of the preferred embodiments and appended claims, and by reference to the accompanying drawings.
Because digital cameras employing imaging devices and related circuitry for signal capture and correction and for exposure control are well known, the present description will be directed in particular to elements forming part of, or cooperating more directly with, method and apparatus in accordance with the present invention. Elements not specifically shown or described herein are selected from those known in the art. Certain aspects of the embodiments to be described are provided in software. Given the system as shown and described according to the invention in the following materials, software not specifically shown, described or suggested herein that is useful for implementation of the invention is conventional and within the ordinary skill in such arts.
Turning now to
This description of a particular camera configuration will be familiar to one skilled in the art, and it will be obvious that many variations and additional features are present. For example, an autofocus system is added, or the lenses are detachable and interchangeable. It will be understood that the present invention is applied to any type of digital camera, where similar functionality is provided by alternative components. For example, the digital camera is a relatively simple point and shoot digital camera, where the shutter 18 is a relatively simple movable blade shutter, or the like, instead of the more complicated focal plane arrangement. The present invention can also be practiced on imaging components included in non-camera devices such as mobile phones and automotive vehicles.
The analog signal from image sensor 20 is processed by an analog signal processor 22 and applied to an analog to digital (A/D) converter 24. A timing generator 26 produces various clocking signals to select rows and pixels and synchronizes the operation of analog signal processor 22 and A/D converter 24. An image sensor stage 28 includes the image sensor 20, the analog signal processor 22, the A/D converter 24, and the timing generator 26. The components of image sensor stage 28 are separately fabricated integrated circuits, or they are fabricated as a single integrated circuit as is commonly done with CMOS image sensors. The resulting stream of digital pixel values from A/D converter 24 is stored in memory 32 associated with a digital signal processor (DSP) 36.
Digital signal processor 36 is one of three processors or controllers in this embodiment, in addition to a system controller 50 and exposure controller 40. Although this partitioning of camera functional control among multiple controllers and processors is typical, these controllers or processors are combined in various ways without affecting the functional operation of the camera and the application of the present invention. These controllers or processors can include one or more digital signal processor devices, microcontrollers, programmable logic devices, or other digital logic circuits. Although a combination of such controllers or processors has been described, it should be apparent that one controller or processor is designated to perform all of the needed functions. All of these variations can perform the same function and fall within the scope of this invention, and the term “processing stage” will be used as needed to encompass all of this functionality within one phrase, for example, as in processing stage 38 in
In the illustrated embodiment, DSP 36 manipulates the digital image data in its memory 32 according to a software program permanently stored in program memory 54 and copied to memory 32 for execution during image capture. DSP 36 executes the software necessary for practicing image processing shown in
System controller 50 controls the overall operation of the camera based on a software program stored in program memory 54, which can include Flash EEPROM or other nonvolatile memory. This memory can also be used to store image sensor calibration data, user setting selections and other data which must be preserved when the camera is turned off. System controller 50 controls the sequence of image capture by directing exposure controller 40 to operate the lens 12, ND filter 13, iris 14, and shutter 18 as previously described, directing the timing generator 26 to operate the image sensor 20 and associated elements, and directing DSP 36 to process the captured image data. After an image is captured and processed, the final image file stored in memory 32 is transferred to a host computer via interface 57, stored on a removable memory card 64 or other storage device, and displayed for the user on an image display 88.
A bus 52 includes a pathway for address, data and control signals, and connects system controller 50 to DSP 36, program memory 54, system memory 56, host interface 57, memory card interface 60 and other related devices. Host interface 57 provides a high-speed connection to a personal computer (PC) or other host computer for transfer of image data for display, storage, manipulation or printing. This interface is an IEEE1394 or USB2.0 serial interface or any other suitable digital interface. Memory card 64 is typically a Compact Flash (CF) card inserted into a memory card socket 62 and connected to the system controller 50 via memory card interface 60. Other types of storage that are utilized include without limitation PC-Cards, MultiMedia Cards (MMC), or Secure Digital (SD) cards.
Processed images are copied to a display buffer in system memory 56 and continuously read out via video encoder 80 to produce a video signal. This signal is output directly from the camera for display on an external monitor, or processed by a display controller 82 and presented on image display 88. This display is typically an active matrix color liquid crystal display (LCD), although other types of displays are used as well.
The user interface, including all or any combination of a viewfinder display 70, an exposure display 72, a status display 76 and image display 88, and user inputs 74, is controlled by a combination of software programs executed on exposure controller 40 and system controller 50. The user inputs 74 typically includes some combination of buttons, rocker switches, joysticks, rotary dials or touch screens. Exposure controller 40 operates light metering, exposure mode, autofocus and other exposure functions. The system controller 50 manages the graphical user interface (GUI) presented on one or more of the displays, e.g., on image display 88. The GUI typically includes menus for making various option selections and review modes for examining captured images.
Exposure controller 40 accepts user inputs 74 selecting exposure mode, lens aperture, exposure time (shutter speed), and exposure index or ISO speed rating and directs the lens and shutter accordingly for subsequent captures. Brightness sensor 16 is employed to measure the brightness of the scene and provide an exposure meter function for the user to refer to when manually setting the ISO speed rating, aperture and shutter speed. In this case, as the user changes one or more settings, the light meter indicator presented on viewfinder display 70 tells the user to what degree the image will be over or underexposed. In an automatic exposure mode, the user changes one setting and the exposure controller 40 automatically alters another setting to maintain correct exposure, e.g., for a given ISO speed rating when the user reduces the lens aperture the exposure controller 40 automatically increases the exposure time to maintain the same overall exposure.
The ISO speed rating is an important attribute of a digital still camera. The exposure time, the lens aperture, the lens transmittance, the level and spectral distribution of the scene illumination, and the scene reflectance determine the exposure level of a digital still camera. When an image from a digital still camera is obtained using an insufficient exposure, proper tone reproduction can generally be maintained by increasing the electronic or digital gain, but the image will contain an unacceptable amount of noise. As the exposure is increased, the gain is decreased, and therefore the image noise can normally be reduced to an acceptable level. If the exposure is increased excessively, the resulting signal in bright areas of the image can exceed the maximum signal level capacity of the image sensor or camera signal processing. This can cause image highlights to be clipped to form a uniformly bright area, or to bloom into surrounding areas of the image. It is important to guide the user in setting proper exposures. An ISO speed rating is intended to serve as such a guide. In order to be easily understood by photographers, the ISO speed rating for a digital still camera should directly relate to the ISO speed rating for photographic film cameras. For example, if a digital still camera has an ISO speed rating of ISO 200, then the same exposure time and aperture should be appropriate for an ISO 200 rated film/process system.
The ISO speed ratings are intended to harmonize with film ISO speed ratings. However, there are differences between electronic and film-based imaging systems that preclude exact equivalency. Digital still cameras can include variable gain, and can provide digital processing after the image data has been captured, enabling tone reproduction to be achieved over a range of camera exposures. It is therefore possible for digital still cameras to have a range of speed ratings. This range is defined as the ISO speed latitude. To prevent confusion, a single value is designated as the inherent ISO speed rating, with the ISO speed latitude upper and lower limits indicating the speed range, that is, a range including effective speed ratings that differ from the inherent ISO speed rating. With this in mind, the inherent ISO speed is a numerical value calculated from the exposure provided at the focal plane of a digital still camera to produce specified camera output signal characteristics. The inherent speed is usually the exposure index value that produces peak image quality for a given camera system for normal scenes, where the exposure index is a numerical value that is inversely proportional to the exposure provided to the image sensor.
The foregoing description of a digital camera will be familiar to one skilled in the art. It will be obvious that there are many variations of this embodiment that are possible and is selected to reduce the cost, add features or improve the performance of the camera. The following description will disclose in detail the operation of this camera for capturing images according to the present invention. Although this description is with reference to a digital camera, it will be understood that the present invention applies for use with any type of image capture device having an image sensor with color and panchromatic pixels.
The image sensor 20 shown in
Whenever general reference is made to an image sensor in the following description, it is understood to be representative of the image sensor 20 from
In the context of an image sensor, a pixel (a contraction of “picture element”) refers to a discrete light sensing area and charge shifting or charge measurement circuitry associated with the light sensing area. In the context of a digital color image, the term pixel commonly refers to a particular location in the image having associated color values.
In order to produce a color image, the array of pixels in an image sensor typically has a pattern of color filters placed over them.
The set of color photoresponses selected for use in a sensor usually has three colors, as shown in the Bayer CFA, but it can also include four or more. As used herein, a panchromatic photoresponse refers to a photoresponse having a wider spectral sensitivity than those spectral sensitivities represented in the selected set of color photoresponses. A panchromatic photosensitivity can have high sensitivity across the entire visible spectrum. The term panchromatic pixel will refer to a pixel having a panchromatic photoresponse. Although the panchromatic pixels generally have a wider spectral sensitivity than the set of color photoresponses, each panchromatic pixel can have an associated filter. Such filter is either a neutral density filter or a color filter.
When a pattern of color and panchromatic pixels is on the face of an image sensor, each such pattern has a repeating unit that is a contiguous sub array of pixels that acts as a basic building block. By juxtaposing multiple copies of the repeating unit, the entire sensor pattern is produced. The juxtaposition of the multiple copies of repeating units is done in diagonal directions as well as in the horizontal and vertical directions.
A minimal repeating unit is a repeating unit such that no other repeating unit has fewer pixels. For example, the CFA in
An image captured using an image sensor having a two-dimensional array with the CFA of
The greater panchromatic sensitivity shown in
A preferred embodiment of this invention is shown in
In this embodiment, a color image with a predefined color pattern 500, is processed to a high-resolution color image 590. The predefined color pattern is illustrated in
The first step in processing this image is to interpolate 505 panchromatic pixels in the predefined color pattern to a high-resolution panchromatic image 510. A preferred method for doing this is bilinear interpolation, illustrated by the diagonal lines connecting pairs of circled pixels in
PI0=(P0+P5)/2
PI1=(P2+P5)/2
PI2=(P2+P7)/2
PI3=(P5+P8)/2
The high-resolution panchromatic image can be enhanced 512. This enhancement can include sigma filtering noise reduction, taking care not to infringe on the image detail. The resulting enhanced high-resolution panchromaticimagepanchromatic image 515 is used for enhancement of the color image. In step 517, the enhanced high-resolution panchromaticimagepanchromatic image 515 is sub-sampled so it is the same size as the interpolated low-resolution color image 540, producing a low-resolution panchromaticimagepanchromatic image 520. The low-resolution panchromaticimagepanchromatic image 520 is shown in
The color pixels in each cell of the predefined color pattern 500 are interpolated 525 to produce a low-resolution Bayer color pattern image 530. The interpolation in 525 is illustrated by the diagonal lines connecting circled pixels in
GI0=(G1+G4)/2
RI2=(R3+R6)/2
BI6=(B9+B12)/2
GI8=(G11+G14)/2
The low-resolution Bayer color pattern image 530 is interpolated using an algorithm is selected from known algorithms in processing step 535, producing an interpolated low-resolution color image 540. This interpolated low-resolution color image 540 is illustrated in
In step 575, the enhanced low-resolution color difference image 570 is interpolated, such as with bilinear or bicubic interpolation, to produce a high-resolution color difference image 580, illustrated in
A second preferred embodiment for this invention is shown in
The preferred processing for this pattern begins with the extraction of panchromatic pixels 605 from the starting image, shown here for clarity as a distinct sparse panchromatic image 610 in
The preferred calculations for step 615 are shown below, referring to
PT6=(P5+P7)/2
PT9=(P5+P13)/2
PT11=(P7+P15)/2
PT14=(P13+P15)/2
To find a pan interpolated value for the position held by G10 the pair of pixels with the smallest difference is used to interpolate P10.
gradBackslash=abs(P5−P15)
gradSlash=abs(P7−P13)
gradVert=abs(PT6−PT14)
gradHoriz=abs(PT9−PT11)
These four classifiers are tested and the minimum value is found. The predictor complementing the minimum classifier is used to predict P10.
predBackslash=(P5+P15)/2
predSlash=(P7+P13)/2
predVert=(PT6+PT14)/2
predHoriz=(PT9+PT11)/2
If the absolute value of gradBackslash−gradSlash is below a threshold then P5 can be the average of P5, P7, P13, and P15.
The result of the interpolation step 615 produces the panchromatic image with checkerboard pattern 620, illustrated in
The next step 630 is interpolation of the panchromatic image with checkerboard pattern 620 to a full panchromaticimage 640, illustrated in
Returning to the top of
The preferred calculations for step 650 are shown below, referring to
GT1=(G0+G2)/2
GT9=(G8+G10)/2
GT4=(G0+G8)/2
GT6=(G2+G10)/2
To find a green interpolated value for the position held by P5 the pair of pixels with the smallest difference is used to interpolate G5
gradBackslash=abs(G0−G10)
gradSlash=abs(G8−G2)
gradVert=abs(GT1−GT8)
gradHoriz=abs(GT4−GT6)
These four classifiers are tested and the minimum value is found. The predictor complementing the minimum classifier is used to predict G5.
predBackslash=(G0+G10)/2
predSlash=(G2+G8)/2
predVert=(GT1+GT9)/2
predHoriz=(GT4+GT6)
If the absolute value of gradBackslash−gradSlash is below a threshold then G5 can be the average of G0, G2, G8, and G10. The result of this interpolation step is an RGB Bayer pattern, illustrated in
A third preferred embodiment for this invention is shown in
The preferred processing for this pattern begins with the interpolation of panchromatic pixels 705 from the starting image to create a Bayer pattern RPB image 710, illustrated in
Returning to the top of
A fourth preferred embodiment for this invention is shown in
The processing for this embodiment begins with the interpolation of color pixels 825 from the starting image to create a low resolution Bayer pattern RGB image 830, illustrated in
GI0=(G1+G4)/2
RI2=(R3+R6)/2
BI6=(B12+B9)/2
GI8=(G11+G14)/2
Step 825 can also include panchromatic pixels in the interpolation, as illustrated in
GI0=(G1+G4+P0+P5)/4
RI2=(R3+R6+P2+P7)/4
BI6=(B12+B9+P8+P13)/4
GI8−(G11+G14+P10+P15)/4
In this case, the Bayer color pattern image produced has different effective spectral sensitivities than the original color and panchromatic pixels. By mixing panchromatic and color pixels, the color pixels produced have a spectral sensitivity that is a combination of the original spectral sensitivities. Other processing steps, such as color balance and color correction, can be adjusted accordingly.
After converting the image to a Bayer color pattern 830, a known technique for conventional Bayer pattern interpolation 835 is used to produce a full color RGB image 840, illustrated in
After obtaining the full color RGB image 840, another processing step 850 can be included. In step 850, the full color RGB image 840 is interpolated, such as with bilinear or bicubic interpolation, to produce a high-resolution color image 890, illustrated in
These embodiments have illustrated processing from color patterns that include panchromatic pixels. Color patterns that do not include panchromatic pixels can be used to provide a derived panchromatic image by combining pixels in the initial color pattern. The pixels in the derived panchromatic image must have controlled centers to match the interpolation of other color channels in order to avoid introducing spatial artifacts. For example, assuming you start with a traditional Bayer pattern, then contiguous red green and blue pixels can be combined to provide the equivalent of a panchromatic pixel. In this way, a panchromatic image can be readily derived and used to enhance the color image as described above.
These embodiments have specifically described processing from CFA patterns using R, G, B and P pixels. The same processing paths can also be used with C, M, Y, and P pixels with only minor alterations (such as different color correction and noise reduction parameters). For clarity, these embodiments describe color filter pattern and other images without specific reference to the details of memory management. This invention can be practiced with a variety of memory and buffer management approaches.
The invention has been described in detail with particular reference to certain preferred embodiments thereof, but it will be understood that variations and modifications are effected within the spirit and scope of the invention.
This application is a Reissue of U.S. Pat. No. 8,818,085 (previously U.S. patent application Ser. No. 13/902,368, filed May 24, 2013) which is a Continuation of U.S. application Ser. No. 11/862,230, filed Sep. 27, 2007, the disclosure of which is incorporated herein.
Number | Name | Date | Kind |
---|---|---|---|
3971065 | Bayer | Jul 1976 | A |
5323233 | Yamagami et al. | Jun 1994 | A |
6097835 | Lindgren | Aug 2000 | A |
6366318 | Smith et al. | Apr 2002 | B1 |
6476865 | Gindele et al. | Nov 2002 | B1 |
6714243 | Mathur et al. | Mar 2004 | B1 |
6937774 | Specht et al. | Aug 2005 | B1 |
7477304 | Hu | Jan 2009 | B2 |
7688368 | Kijima et al. | Mar 2010 | B2 |
7750959 | Nomura | Jul 2010 | B2 |
7780089 | Wang | Aug 2010 | B2 |
7876956 | Adams et al. | Jan 2011 | B2 |
7889921 | Morales et al. | Feb 2011 | B2 |
8139130 | Compton et al. | Mar 2012 | B2 |
8224085 | Morales et al. | Jul 2012 | B2 |
8761504 | Hirakawa | Jun 2014 | B2 |
20020044209 | Saito | Apr 2002 | A1 |
20030160881 | Roddy | Aug 2003 | A1 |
20040234163 | Lee | Nov 2004 | A1 |
20060044427 | Hu | Mar 2006 | A1 |
20060139468 | Wada | Jun 2006 | A1 |
20060221218 | Adler | Oct 2006 | A1 |
20070024879 | Hamilton et al. | Feb 2007 | A1 |
20070024934 | Andams et al. | Feb 2007 | A1 |
20070127095 | Sugimori | Jun 2007 | A1 |
20070177236 | Kijima et al. | Aug 2007 | A1 |
20080030603 | Masuno | Feb 2008 | A1 |
20080079748 | Phan | Apr 2008 | A1 |
20080112612 | Adams et al. | May 2008 | A1 |
20080123997 | Adams et al. | May 2008 | A1 |
20080130991 | O'Brien et al. | Jun 2008 | A1 |
20080131028 | Pillman et al. | Jun 2008 | A1 |
20080292182 | Morales et al. | Nov 2008 | A1 |
20090046182 | Adams, Jr. et al. | Feb 2009 | A1 |
20090051984 | O'Brien et al. | Feb 2009 | A1 |
20100302423 | Adams et al. | Dec 2010 | A1 |
Entry |
---|
Final Office Action on U.S. Appl. No. 13/902,368, dated Feb. 20, 2014. |
Final Rejection on U.S. Appl. No. 11/862,230, dated Mar. 9, 2011. |
Non-Final Office Action on U.S. Appl. No. 11/862,230, dated Oct. 15, 2010. |
Non-Final Office Action on U.S. Appl. No. 11/862,230, dated May 9, 2012. |
Non-Final Office Action on U.S. Appl. No. 13/902,368, dated Oct. 9, 2013. |
Notice of Allowance on U.S. Appl. No. 11/862,230, dated Oct. 11, 2012. |
Notice of Allowance on U.S. Appl. No. 13/902,368, dated Apr. 24, 2014. |
Number | Date | Country | |
---|---|---|---|
Parent | 11862230 | Sep 2007 | US |
Child | 13902368 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 13902368 | May 2013 | US |
Child | 15247408 | US |