IP Library › Granted Patent US 12,626,501
Granted Patent B2
US 12,626,501 · App. 18/223,570 · Granted May 12, 2026

Method for detecting defect in image and device for detecting defect in image

Inventors: Li-Che Lin (Kaohsiung, TW); Yen-Yi Lin (New Taipei, TW); Cheng-Feng Wang (Kaohsiung, TW)
Assignee: HON HAI PRECISION INDUSTRY CO., LTD.
G06V10/993G06V10/50G06V10/751G06V10/758
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,626,501
App. No.
18/223,570
Granted
May 12, 2026
Kind
B2
Abstract

A method for detecting defect in image is provided. The method obtains a number of original images, determines a first reference image from the original images, and performs a histogram matching on the original images excluding the first reference image according to the first reference image, to obtain a plurality of matched images. The method further generates a synthesized image according to pixel intensities of the matched images and pixel intensities of the first reference image; and uses the synthesized image as a second reference image to perform an image comparison with a test image, to generate a result of defect detection. A related device and a related non-transitory storage medium are also provided.

Claims (95)

1 . A method of detecting defect in image comprising:

obtaining a plurality of original images;

selecting one of the plurality of original images as a first reference image, and serving the plurality of original images without the first reference image as the other images;

matching a histogram of each of the other images with a histogram of the first reference image according to the first reference image, to obtain a plurality of matched images;

overlapping the plurality of matched images and the first reference image to generate a plurality of overlapping images, each of the plurality of overlapping images comprising a plurality of pixel points;

generating a synthesized image according to pixel intensities of the plurality of overlapping image; and

using the synthesized image as a second reference image to perform an image comparison with a test image, to generate a result of defect detection;

wherein the generating the synthesized image according to pixel intensities of the plurality of overlapping images comprises:

for each of the plurality of pixel points in an overlapping image of the plurality of overlapping images, determining a median pixel intensity of a plurality of pixel intensities at a same pixel point of the plurality of overlapping images; and

generating the synthesized image according to the median pixel intensity corresponding to each of the plurality of pixel points;

wherein the histogram of each of the plurality of matched images is adjusted based on a degree of similarity between the histogram of each of the other images and the histogram of the first reference image.

2 . The method according to claim 1 , wherein:

before the determining the first reference image from the plurality of original images, the method further comprises:

obtaining pixel distribution information of each of the plurality of original images, where the pixel distribution information comprising a distribution of pixel points and a plurality of pixel intensities corresponding to the pixel points;

the determining the first reference image from the plurality of original images comprises:

dividing averagely the plurality of image intensities of each of the plurality of original images into a plurality of ranges of intensity;

counting a quantity of pixel points fell in each of the plurality of ranges of intensity;

determining a plurality of pixel distribution maps corresponding to the original images according to the plurality of ranges of intensity of the original images and the quantity of the pixel points fell in each of the plurality of ranges of intensity; each of the plurality of pixel distribution maps corresponding to one of the plurality of original images;

determining the first reference image to be an image corresponding to one of the plurality of pixel distribution maps which is a most standard normal distribution among the plurality of pixel distribution maps.

3 . The method according to claim 1 , wherein:

the overlapping the plurality of matched images and the first reference image to generate the plurality of overlapping images comprises:

aligning each of the plurality of matched images with the first reference image; and

generating the plurality of overlapping images, which are overlapped areas among the aligned plurality of matched images and first reference image.

4 . The method according to claim 1 , wherein:

before using the synthesized image as the second reference image to perform the image comparison with the test image, to generate the result of defect detection, the method further comprises:

performing a gaussian blur processing on the test image;

the using the synthesized image as the second reference image to perform the image comparison with the test image, to generate the result of defect detection comprises:

using the synthesized image as the second reference image to perform the image comparison with the test image after the Gaussian blur processing is performed, to generate the result of the defect detection.

5 . The method according to claim 1 , wherein:

the using the synthesized image as the second reference image to perform the image comparison with the test image, to generate the result of defect detection comprises:

generating the result of the defect detection according to a result of a luminance comparison, a result of a contrast comparison, and a result of a structure comparison between the synthesized image and the test image.

6 . The method according to claim 1 , wherein:

the using the synthesized image as the second reference image to perform the image comparison with the test image, to generate the result of defect detection comprises:

using the synthesized image as the second reference image;

partitioning the second reference image and the test image to generate a plurality of image blocks;

performing the image comparison between each of the plurality of image blocks of the test image and a corresponding of the plurality of image blocks of the second reference image;

determining one of the plurality of image blocks of the test image to be a defect block and remark the defect in the defect block if a result of the image comparison between the one of the plurality of image blocks of the test image and one corresponding of the plurality of image blocks of the second reference image is greater than a preset threshold.

7 . A device configured for detecting defects in an image, the device comprising:

a storage device;

at least one processor; and

the storage device storing one or more programs, which when executed by the at least one processor, cause the at least one processor to:

obtain a plurality of original images;

select one of the plurality of original images as a first reference image, and serve the plurality of original images without the first reference image as the other images;

match a histogram of each of the other images with a histogram of the first reference image according to the first reference image, to obtain a plurality of matched images;

overlap the plurality of matched images and the first reference image to generate a plurality of overlapping images, each of the plurality of overlapping images comprising a plurality of pixel points;

generate a synthesized image according to pixel intensities of the plurality of overlapping image; and

use the synthesized image as a second reference image to perform an image comparison with a test image, to generate a result of defect detection;

wherein further causing the at least one processor to:

for each of the plurality of pixel points in an overlapping image of the plurality of overlapping images, determine a median pixel intensity of a plurality of pixel intensities at a same pixel point of the plurality of overlapping images; and

generate the synthesized image according to the median pixel intensity corresponding to each of the plurality of pixel points;

wherein the histogram of each of the plurality of matched images is adjusted based on a degree of similarity between the histogram of each of the other images and the histogram of the first reference image.

8 . The device according to claim 7 , further causing the at least one processor to:

obtain pixel distribution information of each of the plurality of original images, where the pixel distribution information comprising a distribution of pixel points and a plurality of pixel intensities corresponding to the pixel points;

divide averagely the plurality of image intensities of each of the plurality of original images into a plurality of ranges of intensity;

count a quantity of pixel points fell in each of the plurality of ranges of intensity;

determine a plurality of pixel distribution maps corresponding to the original images according to the plurality of ranges of intensity of the original images and the quantity of the pixel points fell in each of the plurality of ranges of intensity; each of the plurality of pixel distribution maps corresponding to one of the plurality of original images; and

determine the first reference image to be an image corresponding to one of the plurality of pixel distribution maps which is a most standard normal distribution among the plurality of pixel distribution maps.

9 . The device according to claim 8 , further causing the at least one processor to:

align each of the plurality of matched images with the first reference image; and

generate the plurality of overlapping images which are overlapped areas among the aligned plurality of matched images and first reference image.

10 . The device according to claim 7 , further causing the at least one processor to:

perform a gaussian blur processing on the test image; and

use the synthesized image as the second reference image to perform the image comparison with the test image after the Gaussian blur processing is performed, to generate the result of the defect detection.

11 . The device according to claim 7 , further causing the at least one processor to:

generate the result of the defect detection according to a result of a luminance comparison, a result of a contrast comparison, and a result of a structure comparison between the synthesized image and the test image.

12 . The device according to claim 7 , further causing the at least one processor to:

use the synthesized image as the second reference image;

partition the second reference image and the test image to generate a plurality of image blocks;

perform the image comparison between each of the plurality of image blocks of the test image and a corresponding of the plurality of image blocks of the second reference image;

determine one of the plurality of image blocks of the test image to be a defect block and remark the defect in the defect block if a result of the image comparison between the one of the plurality of image blocks of the test image and one corresponding of the plurality of image blocks of the second reference image is greater than a preset threshold.

13 . A non-transitory storage medium storing a set of commands, when the commands being executed by at least one processor of a device for detecting defect in image, causing the at least one processor to:

obtain a plurality of original images;

select one of the plurality of original images as a first reference image, and serve the plurality of original images without the first reference image as the other images;

match a histogram of each of the other images with a histogram of the first reference image according to the first reference image, to obtain a plurality of matched images;

overlap the plurality of matched images and the first reference image to generate a plurality of overlapping images, each of the plurality of overlapping images comprising a plurality of pixel points;

generate a synthesized image according to pixel intensities of the plurality of overlapping image; and

use the synthesized image as a second reference image to perform an image comparison with a test image, to generate a result of defect detection;

wherein further causing the at least one processor to:

for each of the plurality of pixel points in an overlapping image of the plurality of overlapping images, determine a median pixel intensity of a plurality of pixel intensities at a same pixel point of the plurality of overlapping images; and

generate the synthesized image according to the median pixel intensity corresponding to each of the plurality of pixel points;

wherein the histogram of each of the plurality of matched images is adjusted based on a degree of similarity between the histogram of each of the other images and the histogram of the first reference image.

14 . The non-transitory storage medium according to claim 13 , further causing the at least one processor to:

obtain pixel distribution information of each of the plurality of original images, where the pixel distribution information comprising a distribution of pixel points and a plurality of pixel intensities corresponding to the pixel points;

divide averagely the plurality of image intensities of each of the plurality of original images into a plurality of ranges of intensity;

count a quantity of pixel points fell in each of the plurality of ranges of intensity;

determine a plurality of pixel distribution maps corresponding to the original images according to the plurality of ranges of intensity of the original images and the quantity of the pixel points fell in each of the plurality of ranges of intensity; each of the plurality of pixel distribution maps corresponding to one of the plurality of original images; and

determine the first reference image to be an image corresponding to one of the plurality of pixel distribution maps which is a most standard normal distribution among the plurality of pixel distribution maps.

15 . The non-transitory storage medium according to claim 13 , further causing the at least one processor to:

align each of the plurality of matched images with the first reference image; and

generate the plurality of overlapping images which are overlapped areas among the aligned plurality of matched images and first reference image.

16 . The non-transitory storage medium according to claim 13 , further causing the at least one processor to:

perform a gaussian blur processing on the test image; and

use the synthesized image as the second reference image to perform the image comparison with the test image after the Gaussian blur processing is performed, to generate the result of the defect detection.

17 . The non-transitory storage medium according to claim 13 , further causing the at least one processor to:

generate the result of the defect detection according to a result of a luminance comparison, a result of a contrast comparison, and a result of a structure comparison between the synthesized image and the test image.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 19, 2023
From: LIN, LI-CHE; LIN, YEN-YI; WANG, CHENG-FENG
To: HON HAI PRECISION INDUSTRY CO., LTD.
Reel/Frame 064307/0063 →
Priority Claims (1)
CN 202210864322.5 · Jul 21, 2022 · national
Continuity (1)
Related Publication 20240029423A1 · Jan 25, 2024
References Cited (31)
US 5850466A · Schott · 1998 [cited by examiner]
US 6539106B1 · Gallarda · 2003 [cited by examiner]
US 6714689B1 · Yano · 2004 [cited by examiner]
US 7970201B2 · Ben-Yishay · 2011 [cited by examiner]
US 8326079B2 · Vans · 2012 [cited by examiner]
US 20040066962A1 · Sasa · 2004 [cited by examiner]
US 20080013837A1 · Porter · 2008 [cited by examiner]
US 20110090372A1 · Doida · 2011 [cited by examiner]
US 20110102578A1 · Kaminaga · 2011 [cited by examiner]
US 20110228295A1 · Doida · 2011 [cited by examiner]
US 20110255774A1 · Ben-Yishay · 2011 [cited by examiner]
US 20110274371A1 · Hsieh · 2011 [cited by examiner]
US 20120026316A1 · Nagahama · 2012 [cited by examiner]
US 20120229618A1 · Urano · 2012 [cited by examiner]
US 20130148882A1 · Lee · 2013 [cited by examiner]
US 20130222645A1 · Bilcu · 2013 [cited by examiner]
US 20140300911A1 · Shiffman · 2014 [cited by examiner]
US 20150221073A1 · Matsuyama · 2015 [cited by examiner]
US 20150221076A1 · Gao · 2015 [cited by examiner]
US 20160189369A1 · Jung · 2016 [cited by examiner]
US 20170140516A1 · Maher · 2017 [cited by examiner]
US 20170169552A1 · Brauer · 2017 [cited by examiner]
US 20170186144A1 · Chien · 2017 [cited by examiner]
US 20180131815A1 · Spivakovsky · 2018 [cited by examiner]
US 20180218492A1 · Zhang · 2018 [cited by examiner]
US 20180266968A1 · Hirai · 2018 [cited by examiner]
US 20220405905A1 · Doi · 2022 [cited by examiner]
US 20230098730A1 · Gu · 2023 [cited by examiner]
US 20240029423A1 · Lin · 2024 [cited by examiner]
US 20250216835A1 · Seguias-Bandry · 2025 [cited by examiner]
CN 101464418B · 2013 [cited by applicant]