CN114298977A - Complex background image defect detection method based on frequency domain template matching - Google Patents
Complex background image defect detection method based on frequency domain template matching Download PDFInfo
- Publication number
- CN114298977A CN114298977A CN202111491300.0A CN202111491300A CN114298977A CN 114298977 A CN114298977 A CN 114298977A CN 202111491300 A CN202111491300 A CN 202111491300A CN 114298977 A CN114298977 A CN 114298977A
- Authority
- CN
- China
- Prior art keywords
- image
- frequency domain
- template
- sample image
- region
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Image Analysis (AREA)
- Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
Abstract
The invention relates to the technical field of defect detection application in computer vision, in particular to a complex background image defect detection method based on frequency domain template matching; the method comprises the following steps: step A, converting a template image and a sample image into a frequency domain for matching, respectively converting the frequency domain image of the matched template image and the frequency domain image of the sample image into a polar coordinate system for screening abnormal frequency components, and performing polar coordinate system inverse transformation and Fourier inverse transformation on the abnormal frequency components in the sample image to obtain a candidate region 1; b, performing frequency domain saliency detection on the frequency domain image of the sample image to obtain a saliency region, and removing background frequency components in the saliency region to obtain a candidate region 2; step C, taking the intersection of the candidate region 1 and the candidate region 2 to perform inverse Fourier transform to obtain a defect region; the adaptability and robustness of the template matching method are improved, and the use requirements on the template and the sample image are reduced.
Description
Technical Field
The invention relates to the technical field of defect detection application in computer vision, in particular to a complex background image defect detection method based on frequency domain template matching.
Background
In recent years, Liquid Crystal Displays (LCDs) have rapidly replaced conventional Cathode Ray Tubes (CRTs) with their advantages of lightness, thinness, high definition, and no radiation, and have become the mainstream screens for Display functions of almost all electronic products such as smart phones, flat panels, notebook computers, and televisions. Etching technology, which is a technology for selectively etching or peeling a surface of a semiconductor substrate or a surface-covering film in accordance with a mask pattern or design requirements, is applied not only to basic manufacturing processes of semiconductor devices and integrated circuits but also to processing of thin film circuits, printed circuits, and other fine patterns. With the development of liquid crystal displays towards large size, high resolution, light weight and thinness, the internal circuit of the liquid crystal display is complicated and complicated, which mainly shows that the circuit has no periodicity and coexists with components, characters, marks and the like, and meanwhile, the circuit structure is finer, the circuit distribution is very dense, the contrast of each film component is poorer, and the gray difference is not obvious enough when the film layer is abnormal. In addition, a lens with higher magnification is needed in the process of detecting defects of an etched line, so that pixels of image scanning of the whole circuit area reach hundred million levels, the minimum defect is only 2-3 pixels, the types of the defects are dozens of types, such as dust defects, stain defects, fiber defects, scratch defects and the like, and meanwhile, in order to take production beats into consideration, the requirement on processing time is high, so that the defect detection of the etched line is very challenging.
At present, in the detection process of industrial actual production, a detection method based on template matching is usually adopted for products of the same type, a prefabricated template is used as a basis, and defects are located through comparison of sample and template information. From the aspect of frequency domain, Tsai and the like only reserve frequency components related to local spatial anomaly by comparing the overall Fourier spectrum of the template and the detection image, and then apply inverse Fourier transform to reconstruct the test image to detect defects. Although the method is relatively simple, has a certain detection effect on the complex line image and meets the detection requirements of industrial actual production, the method has poor adaptability and high requirements on the similarity degree of the template and the sample image.
Disclosure of Invention
Aiming at the problems mentioned in the background art, the invention aims to provide a method and a system for detecting defects of a complex background image based on frequency domain template matching, so as to solve the problems mentioned in the background art.
The technical purpose of the invention is realized by the following technical scheme:
a complex background image defect detection method based on frequency domain template matching comprises the following steps:
a, obtaining a template image and a sample image of an etched line through an image obtaining module; converting the template image and the sample image into a frequency domain for matching, respectively converting the frequency domain image of the matched template image and the frequency domain image of the sample image into a polar coordinate system for screening abnormal frequency components, and performing polar coordinate system inverse transformation and Fourier inverse transformation on the abnormal frequency components in the sample image to obtain a candidate region 1;
b, performing frequency domain saliency detection on the frequency domain image of the sample image to obtain a saliency region, and removing background frequency components in the saliency region to obtain a candidate region 2;
and C, taking the intersection of the candidate region 1 and the candidate region 2 to perform inverse Fourier transform to obtain a defect region.
Preferably, the method for screening abnormal frequency components in the step A comprises the following steps:
wherein, the left side of the inequality is not 0 at the same time;
wherein, the left side of the inequality is not 0 at the same time;
deleting the frequency components, and further screening the retained frequency components for abnormal parts with obvious size difference, wherein the screening conditions are as follows:
wherein the content of the first and second substances,andrespectively representing the power of a two-dimensional digital template with the size of M multiplied by N and a point corresponding to a central point (M/2, N/2) with the distance of r direction of theta in a polar coordinate system in a sample image,andrespectively represent on the template imageThe power corresponding to the front and back two points of the point in the direction theta,andrespectively on the sample imageThe power corresponding to the front point and the rear point of the point in the direction theta, and C is a control parameter.
Preferably, the step B includes: using the global contrast as a saliency value for each pixel of the sample image, the following is calculated:
wherein, IiHas a value range of[0,255]The gray value of the corresponding pixel;
after the saliency value of each pixel is obtained, determining a proper threshold value to extract the saliency area, wherein the threshold value is selected as follows:
T=μ+K*δ
where μ represents the mean of all significant values, δ represents the standard deviation of all significant values, and K is the control parameter.
Preferably, the step B includes: a circular guard region may be provided near the center of the frequency domain, in which frequency components other than the zero frequency component are preserved.
In summary, the invention mainly has the following beneficial effects:
compared with the prior art, the invention has the beneficial effects that: compared with the common template matching method, the method improves the adaptability and robustness of the template matching method, reduces the using requirements on the template and the sample image, and simultaneously achieves good detection effect on the line defects of the complex image.
Drawings
FIG. 1 is a flow chart of a method of the present invention;
FIG. 2 is a template image and a sample image provided in an embodiment of the present invention;
fig. 3 is an image of the candidate region 1 obtained by frequency domain template matching in fig. 2 according to an embodiment of the present invention;
fig. 4 is a candidate area 2 image obtained by frequency domain saliency detection of the sample image of fig. 2 provided in an embodiment of the present invention;
fig. 5 is a defect image obtained by intersecting the candidate region 1 and the candidate region 2 in the embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
A complex background image defect detection method based on frequency domain template matching mainly comprises two major links of frequency domain template matching and frequency domain significance detection, and the whole method flow chart is shown in figure 1:
the whole method comprises the following steps:
step 1: and acquiring a template image and a sample image in sequence.
Step 2: the image is two-dimensionally discrete fourier transformed to the frequency domain.
And step 3: and performing rotation calibration on the frequency domain image of the sample image.
And 4, step 4: the frequency domain map of the template and sample images is converted to a polar coordinate system.
And 5: and judging abnormal frequency components in each column of templates and sample sub-images under the polar coordinate system according to a selection criterion.
Step 6: and reserving abnormal frequency components of the sample image and performing inverse transformation of a polar coordinate system to obtain a candidate region 1.
And 7: and calculating a significance value of each pixel in the frequency domain image of the sample image, and extracting a significance region according to a threshold value.
And 8: the background frequency components within the salient region are removed to obtain a candidate region 2.
And step 10, taking the intersection area of the candidate areas 1 and 2 to perform inverse Fourier transform to obtain a defect area.
In this embodiment, although the effects of translation and illumination can be overcome in the frequency domain, there may still be a rotational effect, so the rotational calibration is performed in step 3 to reduce the error in the subsequent template matching. Compared with the common template matching method in which feature points are searched to obtain a rotation matrix, the frequency domain template matching method is simpler and more accurate in extracting feature areas and calculating the rotation matrix only by fixing a threshold value. Further, since the direction of each complex plane wave in the frequency domain is expressed as a normal vector direction of a vector formed by connecting the frequency domain coordinates corresponding to the complex plane wave with the center point of the frequency domain, that is, each direction in the frequency domain is expressed as 360 directions formed by passing the center point of the frequency domain, the sub-images of the template and the sample are converted to a polar coordinate system to be compared in columns in step 4.
The following describes a specific embodiment of the present invention with reference to specific examples.
Fig. 2 is a specific template and sample image, and it can be found from the observed image that there is a certain resolution and gray scale difference between the template and sample image in fig. 2 on the line due to the influence of the photographing environment in the actual industrial production process.
Fig. 3 is a candidate region 1 obtained by performing frequency domain template matching on the sample image in fig. 2. Firstly, performing two-dimensional discrete Fourier transform on a template and a sample image in the frequency domain, and performing rotation calibration on the image in the frequency domain of the sample image; then converting the frequency domain graphs of the two into a polar coordinate system and judging abnormal frequency components in each row of templates and sample images under the polar coordinate system according to the screening criterion provided by the invention; and finally, performing polar coordinate system inverse transformation and Fourier inverse transformation on abnormal frequency components on the sample image to obtain a candidate region 1. Observing the image can find that although the defect below the sample image is accurately detected, the false detection condition still exists above the image, and further screening is needed.
Fig. 4 is a candidate region 2 obtained by performing frequency domain saliency detection on the sample image in fig. 2. Firstly, calculating a significant value of each pixel in a frequency domain image of a sample image and extracting a significant region according to a threshold value; then setting a frequency domain center protection area so as to better ensure the complete detection of the defects; and finally, removing background frequency components in the obtained salient region and carrying out inverse Fourier transform to obtain a candidate region 2. Observing the image can find that the image defects are still detected completely, but a large amount of false detection exists above the image.
Fig. 5 is an intersection defect image of fig. 3 and 4. The image is observed, and the defect area is accurately detected after the intersection of the images of the candidate area 1 and the candidate area 2 is taken.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (4)
1. A complex background image defect detection method based on frequency domain template matching is characterized in that: the method comprises the following steps:
a, obtaining a template image and a sample image of an etched line through an image obtaining module; converting the template image and the sample image into a frequency domain for matching, respectively converting the frequency domain image of the matched template image and the frequency domain image of the sample image into a polar coordinate system for screening abnormal frequency components, and performing polar coordinate system inverse transformation and Fourier inverse transformation on the abnormal frequency components in the sample image to obtain a candidate region 1;
b, performing frequency domain saliency detection on the frequency domain image of the sample image to obtain a saliency region, and removing background frequency components in the saliency region to obtain a candidate region 2;
and C, taking the intersection of the candidate region 1 and the candidate region 2 to perform inverse Fourier transform to obtain a defect region.
2. The method for detecting the defect of the complex background image based on the frequency domain template matching as claimed in claim 1, wherein: the method for screening abnormal frequency components in the step A comprises the following steps:
wherein, the left side of the inequality is not 0 at the same time;
wherein, the left side of the inequality is not 0 at the same time;
deleting the frequency components, and further screening the retained frequency components for abnormal parts with obvious size difference, wherein the screening conditions are as follows:
wherein the content of the first and second substances,andrespectively representing the power of a two-dimensional digital template with the size of M multiplied by N and a point corresponding to a central point (M/2, N/2) with the distance of r direction of theta in a polar coordinate system in a sample image,andrespectively represent on the template imageThe power corresponding to the front and back two points of the point in the direction theta,andrespectively on the sample imageThe power corresponding to the front point and the rear point of the point in the direction theta, and C is a control parameter.
3. The method for detecting the defect of the complex background image based on the frequency domain template matching as claimed in claim 1, wherein: the step B comprises the following steps: using the global contrast as a saliency value for each pixel of the sample image, the following is calculated:
wherein, IiHas a value range of [0,255 ]]The gray value of the corresponding pixel;
after the saliency value of each pixel is obtained, determining a proper threshold value to extract the saliency area, wherein the threshold value is selected as follows:
T=μ+K*δ
where μ represents the mean of all significant values, δ represents the standard deviation of all significant values, and K is the control parameter.
4. The method for detecting the defect of the complex background image based on the frequency domain template matching as claimed in claim 1, wherein: the step B comprises the following steps: a circular guard region may be provided near the center of the frequency domain, in which frequency components other than the zero frequency component are preserved.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111491300.0A CN114298977A (en) | 2021-12-08 | 2021-12-08 | Complex background image defect detection method based on frequency domain template matching |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111491300.0A CN114298977A (en) | 2021-12-08 | 2021-12-08 | Complex background image defect detection method based on frequency domain template matching |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114298977A true CN114298977A (en) | 2022-04-08 |
Family
ID=80965828
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111491300.0A Pending CN114298977A (en) | 2021-12-08 | 2021-12-08 | Complex background image defect detection method based on frequency domain template matching |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114298977A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116386074A (en) * | 2023-06-07 | 2023-07-04 | 青岛雅筑景观设计有限公司 | Intelligent processing and management system for garden engineering design data |
-
2021
- 2021-12-08 CN CN202111491300.0A patent/CN114298977A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116386074A (en) * | 2023-06-07 | 2023-07-04 | 青岛雅筑景观设计有限公司 | Intelligent processing and management system for garden engineering design data |
CN116386074B (en) * | 2023-06-07 | 2023-08-15 | 青岛雅筑景观设计有限公司 | Intelligent processing and management system for garden engineering design data |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10839508B2 (en) | Integrated circuit image alignment and stitching | |
JP2005529388A (en) | Pattern inspection method | |
CN113781424B (en) | Surface defect detection method, device and equipment | |
CN113223066B (en) | Multi-source remote sensing image matching method and device based on characteristic point fine tuning | |
CN111507055B (en) | Registering method and registering system for circuit design layout and electron microscope scanning image, circuit design layout and imaging error calculating method thereof | |
Ma et al. | An automatic detection method of Mura defects for liquid crystal display | |
CN114298977A (en) | Complex background image defect detection method based on frequency domain template matching | |
CN117115130A (en) | Wafer edge defect detection method and device | |
CN116071272A (en) | Image correction method and device, electronic equipment and storage medium thereof | |
CN113112396B (en) | Method for detecting conductive particles | |
CN113487569B (en) | Complex background image defect detection method and system based on combination of frequency domain and space domain | |
KR20220060080A (en) | Method of inspecting defect of display substrate | |
CN116503324A (en) | Black glue module appearance detection method and system based on machine vision | |
JP2001266126A (en) | Method and device for detecting defect and method of manufacturing for mask | |
JP4629086B2 (en) | Image defect inspection method and image defect inspection apparatus | |
JP2007192688A (en) | Flaw inspection method | |
Liu et al. | Inspection of IC wafer Defects Based on Image Registration | |
CN110874837B (en) | Defect automatic detection method based on local feature distribution | |
JP2017058190A (en) | Reference data creation method for creating reference image and pattern test equipment | |
US6888958B1 (en) | Method and apparatus for inspecting patterns | |
Zhong et al. | Detection of oxidation region of flexible integrated circuit substrate based on topology mapping | |
CN110838135A (en) | PCB bare board image registration method | |
CN113327232B (en) | Relay contact set contact surface alignment method, apparatus and computer storage medium | |
Zhongtang et al. | High Precision Autocollimation Measurement Technology Based on Image Recognition | |
CN116188502B (en) | Method for dividing infrared image of photovoltaic panel, storage medium and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |