Camera blemish defects detection
A digital image captured by a digital camera module is scaled to a smaller size, and separately horizontal direction filtered and vertical direction filtered using one-dimensional spatial filters. The horizontal direction filtered image and the vertical direction filtered image are combined, wherein edge regions and corner regions of the combined filtered image are created differently than its middle region. The combined filtered image is then thresholded selected pixels of the thresholded image are marked as a blemish region. Other embodiments are also described and claimed.
Latest Apple Patents:
- Control resource set information in physical broadcast channel
- Multimedia broadcast and multicast service (MBMS) transmission and reception in connected state during wireless communications
- Methods and apparatus for inter-UE coordinated resource allocation in wireless communication
- Control resource set selection for channel state information reference signal-based radio link monitoring
- Physical downlink control channel (PDCCH) blind decoding in fifth generation (5G) new radio (NR) systems
This application claims the benefit of the earlier filing date of provisional application No. 61/606,844, filed Mar. 5, 2012, entitled “Camera Blemish Defects Detection”.
FIELDAn embodiment of the invention is related to techniques for detecting blemish defects in solid state cameras, by image processing of a digital image produced by the solid state camera. Other embodiments are also described.
BACKGROUNDA blemish defect in a camera may be manifested by one or more blurred spots as seen when a resulting digital image produced by the camera is displayed. The blurred spots are due to pixels of the digital image that are different from surrounding ones, even though the camera has taken a picture of a calibration-type flat field target that is completely uniform. Blemish defects are typically caused by scratches, staining, or foreign objects (such as dust particles) and may be present on an optical surface within the optical imaging path of the camera. Blemishes may be contrasted with other defects such as vignettes. The latter are usually minor defects that are present in almost every manufactured specimen, and may be alleviated by post-capture image processing that can correct for vignetting and lens shading defects. Blemishes, on the other hand, may be severe enough so as to result in a particular specimen being flagged as a failed unit, during manufacture or production line testing. Image processing-based blemish detection algorithms are available that can be used to screen out units that have or exhibit blemish defects. A goal of such algorithms is to flag only those units that have blemish defects; efforts to improve the accuracy of such algorithms are ongoing, so as to reduce the likelihood of false positives.
SUMMARYA digital image captured by a digital camera module is scaled to a smaller size, and separately horizontal direction filtered and vertical direction filtered using one-dimensional spatial filters. The horizontal direction filtered image and the vertical direction filtered image are combined, wherein edge regions and corner regions of the combined filtered image are created differently than its middle region. The combined filtered image is then thresholded and selected pixels of the thresholded image are marked as a blemish region.
The above summary does not include an exhaustive list of all aspects of the present invention. It is contemplated that the invention includes all systems and methods that can be practiced from all suitable combinations of the various aspects summarized above, as well as those disclosed in the Detailed Description below and particularly pointed out in the claims filed with the application. Such combinations have particular advantages not specifically recited in the above summary.
The embodiments of the invention are illustrated by way of example and not by way of limitation in the figures of the accompanying drawings in which like references indicate similar elements. It should be noted that references to “an” or “one” embodiment of the invention in this disclosure are not necessarily to the same embodiment, and they mean at least one.
Several embodiments of the invention with reference to the appended drawings are now explained. Whenever the shapes, relative positions and other aspects of the parts described in the embodiments are not clearly defined, the scope of the invention is not limited only to the parts shown, which are meant merely for the purpose of illustration. Also, while numerous details are set forth, it is understood that some embodiments of the invention may be practiced without these details. In other instances, well-known circuits, structures, and techniques have not been shown in detail so as not to obscure the understanding of this description.
An embodiment of the invention is a process for testing a digital camera module, a consumer electronic device that has a digital camera module integrated therein, or any other component or device having a digital camera, e.g. professional digital video and still cameras. For the sake of convenience, such a component or device is generally referred to here as a “camera module” or device under test (DUT). The process detects anomalous pixel regions within a digital image that has been captured by a solid state imaging sensor of the camera module. It may be expected that one or more embodiments of the invention described here are capable of distinguishing between blemishes and “normal” lens shading or vignetting. The latter is ubiquitous in almost all high volume manufactured specimens of a camera module, and can be easily corrected using post-capture image processing software. The blemish detection process described here may be performed upon a DUT, without the need for a prior lens shading correction or vignetting correction to be completed on the DUT. Moreover, it is believed that the process may be more sensitive to faint blemish defects than other prior techniques. This yields a test technique that may be better able to distinguish normal specimens from bad specimens, thereby improving the yield of a production line by reducing the incidence of false positives.
Referring to
Referring to
Next, two filtering operations are performed separately, on the same color plane. First, a horizontal direction filtering is performed to result in a horizontal filtered image 7, where a horizontally oriented one-dimensional spatial filter, referred to here as kernel h, is applied to each pixel of the scaled image 5, row-by-row. This may be given by the following equation (for N coefficients):
filtered pixel=pixel*W1+pixel*W2+ . . . pixel*WN Eq. [1]
This is shown in more detail in
In addition to the horizontal direction filtering, a vertical direction filtering operation is also performed on the scaled image 5, to produce a vertical filtered image 9. In one embodiment, the same kernel h that was used for horizontal filtering may be rotated by 90°, to yield a 1-D spatial vertical filter. This is also depicted in
Once the horizontal filtered image 7 and the vertical filtered image 9 have been generated (either based directly on the scaled image 5, or alternatively based on the intermediate images 6, 8), the two filtered images 7, 9 are then combined, to create a combined filtered image 11 (which may retain the same size or resolution of each of the images 7, 9). Referring still to
As to the corner regions (TLc, TRc, BLc and BRc), the pixels in each of these regions may be set equal to their counterpart pixels in the counterpart corner region that has lesser energy (as between the filtered images 7, 9). Thus, for instance, the pixels of the top left corner in the combined image 11, namely TLc, should be set equal to their counterpart pixels of either TLh or TLv depending on which of the latter two has lesser energy or lesser total pixel intensity. This is indicated by the following equations:
Mc=average(Mh,Mv)
TLc=min(TLh,TLv)
TRc=min(TRh,TRv)
BLc=min(BLh,BLv)
BRc=min(BRh,BRv)
ELc=ELvETc=ETh
ERc=ERvEBc=EBh Eq. [2]
To determine which of the two corner regions is the lesser, energy of each corner region may be computed by, for example, summing the all of the pixel values in the corner region. Whichever corner region has the lower sum becomes the corresponding corner region of the combined image 11.
For the vertical edge regions ELc, ERc, the pixels in each of these should be set equal to their counterpart edge regions in the vertical filtered image 9. As to the horizontal edge regions ETc and EBc, the pixels in each of these should be set equal to their counterpart edge regions in the horizontal filtered image 7.
The different treatment of the corner and edge regions, relative to the middle region, may be due to the need for introducing the two extrapolated vertical padding regions to the scaled image 5 (or to the intermediate image 6), when applying the horizontal 1-D spatial filters. The different treatment of the corner and edge regions may also be due to the application of vertical 1-D spatial filtering (which may cause the need to introduce the two extrapolated horizontal padding regions). The four padding regions are shown in
Regarding the corner regions of the combined image 11, these may be slightly enlarged, relative to the corner regions of the horizontal and filtered images 7, 9. In particular, the expected corner region within the horizontal or vertical filtered image 7, 9 is a square having a side that is about one-half the width of the one-dimensional spatial filter. Thus, for instance if the filter kernel h is nine elements wide, and is used for both vertical direction and horizontal direction filtering, then the expected corners TLh and TLv may each be a square of 5×5 pixels. However, better results may be obtained by defining the counterpart corner TLc (in the combine image 11) to be slightly larger, e.g. a square of 8×8 pixels. This is depicted in
Referring back to
As explained above, an embodiment of the invention may be a machine-readable medium (such as microelectronic memory) having stored thereon instructions, which program one or more data processing components (generically referred to here as a “processor”) to perform the DUT configuration and digital image processing operations described above including configuring the exposure setting of a camera module (device under test, DUT) and signaling the DUT to capture an image of a calibration target, and digital image processing such as noise reduction, scaling, filtering, image combining and thresholding of the captured image. In other embodiments, some of these operations might be performed by specific hardware components of a test system, for testing camera modules. The test system may have hardwired logic (e.g., dedicated digital filter blocks, control and timing logic) for certain operations or components. The test system's operations might alternatively be performed by any combination of programmed data processing components and fixed hardwired circuit components.
In one embodiment, a system for testing a camera module may have the following components. Referring now to
While certain embodiments have been described and shown in the accompanying drawings, it is to be understood that such embodiments are merely illustrative of and not restrictive on the broad invention, and that the invention is not limited to the specific constructions and arrangements shown and described, since various other modifications may occur to those of ordinary skill in the art. For example, while the blemish detection technique has been illustrated by being applied to one or more of the constituent color planes of a Bayer pattern raw image, the blemish detection techniques described here may also work on an original image that is a full color raw image (e.g., having RGB pixels directly produced by a full color imaging sensor that does not have a color filter array or mosaic), a Y-channel image (e.g., derived from a YUV color space image), or a de-mosaiced or full color interpolated version of a color filter mosaic raw image. The latter may also have had some post-processing performed upon it, such as white balance and gamma correction, prior to the application of the blemish detection algorithm. The description is thus to be regarded as illustrative instead of limiting.
Claims
1. A method for testing a digital camera module, comprising:
- scaling a digital image captured by the digital camera module to a smaller size;
- horizontal direction filtering the scaled image by applying, row by row, a horizontally oriented one-dimensional spatial filter to each pixel of the scaled image;
- vertical direction filtering the scaled image by applying, column by column, a vertically oriented one-dimensional spatial filter to each pixel of the scaled image;
- combining the horizontal direction filtered image and the vertical direction filtered image, wherein edge regions and corner regions of the combined filtered image are created differently than its middle region;
- thresholding the combined filtered image; and
- marking a selected plurality of pixels of the thresholded image as a blemish region.
2. The method of claim 1 further comprising recording the maximum pixel intensity in the blemish region and a sum of all pixels in the blemish region, in association with coordinates of the blemish region.
3. The method of claim 1 further comprising signaling the digital camera module to capture a digital image of a calibration target.
4. The method of claim 1 wherein the digital image is a color plane of a color filter mosaic raw image.
5. The method of claim 1 further comprising performing noise reduction filtering upon the scaled image prior to the vertical direction filtering and the horizontal direction filtering.
6. A system for testing a camera module, comprising:
- a scaler unit to receive a digital image captured by a camera module and spatially scale the digital image to a lower resolution;
- a horizontal direction filter through which one instance of the scaled digital image is to pass;
- a vertical direction filter through which the scaled digital image is to pass;
- a combiner to combine an output image of the horizontal direction filter with an output image of the vertical direction filter, into a combined image having about the same resolution as each of the output images; and
- a discriminator unit to classify selected ones of the pixels in the combined image as a blemish region.
7. The system of claim 6 further comprising an exposure control unit that is to be coupled to the camera module, to signal the module to capture the digital image.
8. The system of claim 6 wherein the scaler, horizontal filter, vertical filter, combiner and discriminator are part of a camera module test equipment deployed in a manufacturing testing environment and to which the camera module is coupled as a device under test.
9. The system of claim 7 wherein the scaler, exposure control unit, horizontal filter, vertical filter, combiner and discriminator are part of a camera module test equipment deployed in a manufacturing testing environment and to which the camera module is coupled as a device under test.
10. The system of claim 6 wherein the digital image is a color plane of a color filter mosaic raw image.
11. The system of claim 6 further comprising a noise reduction filter through which each instance of the scaled digital image is to pass before the horizontal and vertical direction filters.
12. A method for testing a digital camera device under test (camera DUT), comprising:
- scaling the digital image to a smaller size;
- spatially filtering the scaled image by applying a one-dimensional horizontal filter each pixel of the scaled image row by row;
- spatially filtering the scaled image by applying a one-dimensional vertical filter to each pixel of the scaled image column by column;
- combining the horizontal spatially filtered image and the vertical spatially filtered images, wherein edge regions and corner regions of the combined filtered image are created differently than its middle region; and
- thresholding the combined filtered image to reveal a plurality of pixels of the thresholded image as a blemish region.
13. The method of claim 12 further comprising signaling the digital camera DUT to capture said digital image of a calibration target.
4639775 | January 27, 1987 | Cohen et al. |
7535501 | May 19, 2009 | Loushin et al. |
7965319 | June 21, 2011 | Ozaki |
20030190087 | October 9, 2003 | Kobilansky |
20060067569 | March 30, 2006 | Haga |
20080050007 | February 28, 2008 | Oaki |
20090303357 | December 10, 2009 | Tajima et al. |
20110026823 | February 3, 2011 | Wu et al. |
20120013747 | January 19, 2012 | Lyu et al. |
- “Using Blemish Detect”, Imatest—Using Blemish Detect, Internet download: http://www.imatest.com/docs/blemish/, Jan. 9, 2012, (10 pages).
- LEPISTö, et al., “Blemish Detection in Camera Production Testing Using Fast Difference Filtering”, ( pp. 020501-1 through 020501-3).
Type: Grant
Filed: Sep 27, 2012
Date of Patent: Aug 5, 2014
Patent Publication Number: 20130229531
Assignee: Apple Inc. (Cupertino, CA)
Inventors: Hongqin Zhang (San Jose, CA), Shizhe Shen (San Jose, CA), Iain A. McAllister (Campbell, CA)
Primary Examiner: Lin Ye
Assistant Examiner: John H Morehead, III
Application Number: 13/629,441
International Classification: H04N 9/64 (20060101); H04N 17/00 (20060101);