Patent ID: 12260534

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

The purpose of the disclosed method to detect camera blemishes is to be able to identify problem areas in images from digital cameras that appear as blemishes, smears, non-uniformities, or shadows in a test image taken by a digital camera. These blemishes are not smudges or other debris over camera lens, but are defects with the camera itself including the lens or the image sensor. The method to detect camera blemishes is designed to ignore smudges or other small defects that can be removed by cleaning the lens.

The method requires taking a digital image of a uniform white test area. The luminance of the test area is set to an appropriate level for detecting blemishes.

Although not required, preferably a camera under test is mounted in an automated test apparatus. Optionally, testing can be performed manually or semi-automatically.FIG.1is a block diagram of a test apparatus used to detect blemishes of a digital camera10under test.FIG.1shows that the digital camera10under test is driven by test electronics20to operate the camera10and receive and analyze a test image taken by the camera10. The test electronics20can include a processor, memory, circuitry, and wiring to interface with the camera and a user. The camera10is driven by the test electronics20to capture a digital test image of a uniformly lit white test area30. As shown inFIG.1, the white test area30can be a diffuser panel that is backlit by a light source40. Optionally, the white test area30can be a reflective sheet that is front lit and reflects uniformly.

The disclosed test method is described with respect to the flowchart provided inFIG.2Aand continued inFIG.2B.

In step S1, the test electronics20controls the digital camera10to take a test image of the white test area30and the digital data representing the test image is transmitted to the test electronics20.FIG.3is a representative test image taken of the uniformly lit white test area30that includes a camera blemish shown has a non-uniform area within the overlaid dotted circle. The test electronics reduces the native resolution of the test image data by reformatting the test image data into blocks of pixels where each pixel includes a red, a green, and a blue sub-pixel. Other dimensions of a data matrix are possible, but a size of 16×16 has been found to provide suitable blemish detection while minimizing false results caused by noise or dust particles and speeds processing. The data matrix is created by combining the pixels of the test image data into, for example, 16×16 data blocks. The luminance value L of each data block is calculated by averaging the red, green, and blue color values of all of the pixels within each data block and converting the average color values into the luminance value L. The representative luminance value L of each data block is calculated using a conversion formula. For example, the luminance L can equal (0.2126*R)+(0.7152*G)+(0.0722*B), where R, G, and B are the average red, green, and blue color values for the digital image pixels within the corresponding data block. The new lower resolution data matrix can now contain 256 data blocks (DB1 to DB256) or regions to analyze. Averaging the luminance values of each 16×16 pixel block normalizes the test data and helps to sort out false failures caused by small specks of dust. The brightness of light reflected by small specks of dust or other contamination with the test area can be different than the light in nearby areas causing the brightness of the dust to stand out.

In step S2, the luminance value L of each data block is compared to luminance values L of surrounding data blocks. In the comparison, the luminance values L of three consecutive data blocks some distance away from the test data block being analyzed are averaged as Lavg. Those average luminance values Lavgare compared to the luminance value of the test data block, Ltest.

For example, when a data block that represents the upper left-most pixels of the test image data is being analyzed (i.e., DB1), its luminance value as Ltestcan be compared to the average luminance value Lavgof data blocks that have a gap from DB1 in a horizontal right direction or vertical down direction. The gap between the test data block being analyzed and the data blocks averaged can be predetermined based on the location of the data blocks in the matrix and how well the respective distances and locations of the data blocks reveal blemish defects. The gap can be ten data blocks or some other number. The surrounding data blocks used to compare to the test data block can be located in the horizontal, vertical, diagonal directions, or combinations thereof.

For example, the luminance of a test data block that is not near the edge of the data matrix can be compared to average luminance values of six pixels blocks on either side of the test data block. The first three pixel blocks can be in the same column as each other and located after the gap such that one of the pixel blocks is in the same row of the data matrix to the right of the test data block, one pixel block is in the row above, and one pixel block is in the row below. The luminance of these three pixels can be averaged. The second three pixel blocks can be in the same column as each other and located after the gap such that one of the pixel blocks is in the same row of the data matrix to the left of the test data block, one pixel block is in the row above, and one pixel block is in the row below. The luminance of these three pixels can be averaged.

Test data blocks located near the edge of the data matrix can be compared to average luminance values of pixels blocks to only one side of the test data block.

In step S3, a determination is made if the difference between the Ltestand the Lavgis over a predetermined threshold. If the threshold is met, the test data block being analyzed is added to a group of potentially bad data blocks in step S4. If the threshold is not met, the test data block is determined not to contain a blemish. The threshold difference is determined empirically by experimentation of test samples with known blemishes.

FIG.4is an image showing identified potentially bad data blocks400and410, marked as darker areas, overlaid on the test image shown inFIG.3.FIG.4shows clusters of potentially bad data blocks400in an area with the blemish encircled inFIG.3. The potentially bad data block410is in a location away from the blemish.

In step S5, a function named ‘clear noise’ is applied to identify bad data blocks and eliminate potentially bad data blocks that have dust and other image noise that are not considered to be bad data block or blemishes. Regions around each of the potentially bad data blocks are analyzed using the ‘clear noise’ function. In order for a potentially bad data block to be considered a bad data block, it must be within a cluster of a number of other potentially bad data blocks over a predetermined number of ‘Max Defects’. For example, a group of 20×20 data blocks (400 total) around a potentially bad data block can be analyzed to determine how many other potentially bad data blocks are within the group.

If the total number of potentially bad data blocks within the group meet a threshold number (Max Defects), for example 25, then the potentially bad data block is determined to be a bad data block (i.e., a blemish) and identified as such in step S6, and the camera fails the test. If the total number of potentially bad data blocks within the group does not meet Max Defects, then the potentially bad data block is determined not to be a bad data block.

FIG.5is an image showing identified bad data blocks500, marked as darker areas, overlaid on the test image shown inFIG.3. The potentially bad data block410ofFIG.4was determined not to be a bad data block.FIG.5shows five bad data blocks500in the area where clusters of potentially bad data blocks400were shown inFIG.4. The camera fails the test because bad data blocks500have been identified.

If no potentially bad data blocks are determined to be a blemish in S6, a check is performed of the total overall image as a whole in step S7. If no blemishes are detected due to the lack of proximity of potentially bad data blocks to each other of the previously detected possible bad data blocks, but the total count of potentially bad data blocks is over a predefined number, the camera under test fails. This is in the event that too much debris or other errors occurred taking the image for a proper analysis to be performed.

In step S8, the results are reported to an inspector or test technician and recorded in a database. If any blemishes are detected during analysis, the camera is reported as a failure. Otherwise, the camera is reported to pass the blemish test.

The above-described embodiments of the present invention can be implemented in any of numerous ways. For example, the embodiments may be implemented using hardware, software or a combination thereof. When implemented in software, the software code can be executed on any suitable processor or collection of processors, whether provided in a single computer or distributed among multiple computers. Such processors may be implemented as integrated circuits, with one or more processors in an integrated circuit component. Though, a processor may be implemented using circuitry in any suitable format.

Additionally, or alternatively, the above-described embodiments can be implemented as a non-transitory computer readable storage medium embodied thereon a program executable by a processor for performing a method of various embodiments.

It should be understood that the foregoing description is only illustrative of the present invention. Various alternatives and modifications can be devised by those skilled in the art without departing from the present invention. Accordingly, the present invention is intended to embrace all such alternatives, modifications, and variances that fall within the scope of the appended claims.