CN113487569A - Complex background image defect detection method and system based on combination of frequency domain and spatial domain - Google Patents
Complex background image defect detection method and system based on combination of frequency domain and spatial domain Download PDFInfo
- Publication number
- CN113487569A CN113487569A CN202110761521.9A CN202110761521A CN113487569A CN 113487569 A CN113487569 A CN 113487569A CN 202110761521 A CN202110761521 A CN 202110761521A CN 113487569 A CN113487569 A CN 113487569A
- Authority
- CN
- China
- Prior art keywords
- image
- region
- frequency domain
- sample image
- template
- 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.)
- Granted
Links
- 230000007547 defect Effects 0.000 title claims abstract description 102
- 238000001514 detection method Methods 0.000 title claims abstract description 72
- 238000012216 screening Methods 0.000 claims abstract description 32
- 238000000034 method Methods 0.000 claims abstract description 29
- 230000002159 abnormal effect Effects 0.000 claims abstract description 24
- 230000009466 transformation Effects 0.000 claims abstract description 16
- 230000001174 ascending effect Effects 0.000 claims description 4
- 238000003709 image segmentation Methods 0.000 claims description 4
- 230000000717 retained effect Effects 0.000 claims description 2
- 230000000630 rising effect Effects 0.000 claims description 2
- 239000000126 substance Substances 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract description 8
- 230000008569 process Effects 0.000 description 6
- 238000009826 distribution Methods 0.000 description 4
- 238000002474 experimental method Methods 0.000 description 4
- 239000004973 liquid crystal related substance Substances 0.000 description 4
- 238000004519 manufacturing process Methods 0.000 description 4
- 239000011159 matrix material Substances 0.000 description 4
- 238000009792 diffusion process Methods 0.000 description 3
- 238000005530 etching Methods 0.000 description 3
- 239000010408 film Substances 0.000 description 3
- 238000005286 illumination Methods 0.000 description 3
- 230000011218 segmentation Effects 0.000 description 3
- 238000013519 translation Methods 0.000 description 3
- 239000000428 dust Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000000737 periodic effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000000354 decomposition reaction Methods 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 230000008030 elimination Effects 0.000 description 1
- 238000003379 elimination reaction Methods 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000012880 independent component analysis Methods 0.000 description 1
- LFEUVBZXUFMACD-UHFFFAOYSA-H lead(2+);trioxido(oxo)-$l^{5}-arsane Chemical compound [Pb+2].[Pb+2].[Pb+2].[O-][As]([O-])([O-])=O.[O-][As]([O-])([O-])=O LFEUVBZXUFMACD-UHFFFAOYSA-H 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000008447 perception Effects 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 238000001228 spectrum Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 239000010409 thin film Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/0002—Inspection of images, e.g. flaw detection
- G06T7/0004—Industrial image inspection
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4038—Image mosaicing, e.g. composing plane images from plane sub-images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/136—Segmentation; Edge detection involving thresholding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/30—Determination of transform parameters for the alignment of images, i.e. image registration
- G06T7/37—Determination of transform parameters for the alignment of images, i.e. image registration using transform domain methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20021—Dividing image into blocks, subimages or windows
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20048—Transform domain processing
- G06T2207/20056—Discrete and fast Fourier transform, [DFT, FFT]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30121—CRT, LCD or plasma display
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30108—Industrial image inspection
- G06T2207/30148—Semiconductor; IC; Wafer
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Quality & Reliability (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a complex background image defect detection method and a system based on combination of a frequency domain and a space domain, wherein the method comprises the following steps: converting the template image and the sample image into a frequency domain, matching and 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; 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; taking the intersection of the candidate region 1 and the candidate region 2 to perform inverse Fourier transform to obtain an alternative defect region; and finally screening the candidate defect region according to the entropy of the spatial domain characteristic image. The invention improves the adaptability and robustness of the template matching method, reduces the use requirements on the template and the sample image, and simultaneously achieves good detection effect on the line defects of the complex image.
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 and system based on combination of a frequency domain and a space domain.
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, the method for detecting the defect of the complex background image of the etched line of the liquid crystal display can be divided into two types according to the signal representation form of the image, namely a detection method based on a space domain and a detection method based on a frequency domain.
The detection method based on the airspace mainly segments the defects and the background according to the characteristics of pixel distribution, color, brightness and the like of an image, for example, an anisotropic diffusion model based on a diffusion mechanism, which is proposed by Chao and the like, adaptively sharpens an image area by flexibly changing a diffusion coefficient, and segments the defects after enhancing the contrast; hojunger et al adopt a convolution neural network-based method to extract features of fine defects in etched lines under a complex background and finally complete recognition and positioning; the Chinese patent application with publication number CN111415339A discloses a method for detecting image defects of an industrial product with complex textures, wherein a defect detection result is obtained through a mean value perception Hash algorithm; chinese patent application publication No. CN112581447A discloses a method for detecting a flexible printed circuit board (FPC) based on global defects and local defects, which completes the detection of defects by combining with gray statistics, topological features, edge features and correlation coefficients. The method is relatively intuitive, but false detection is easy to generate on the detection result of the complex line image due to the similarity of spatial domain features.
The frequency domain-based detection method converts the image into a frequency domain space, and completes the detection of the defect according to the characteristics of the frequency. A convolution filter based on constrained independent component analysis is designed as Tsai and the like, so that the convolution filter can generate the most representative filtering signal under the condition of no defect, meanwhile, control parameters in the constraint are used for setting a threshold value, so that a defect area and a non-defect area in an image have different impulse responses, and then a defect extraction algorithm based on one-dimensional discrete fourier transform and wavelet decomposition and a periodic texture elimination algorithm based on two-dimensional discrete fourier transform and hough transform are respectively proposed. Aiger and Talbot propose a phase-only fourier transform for detecting local defects of a repeating structural textured surface. The method overcomes the limitation in a space domain to a certain extent, wherein a good detection effect is obtained for the periodic complex line image by reserving a high-frequency component, but the aperiodic complex line image still cannot be accurately detected.
In addition, 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 airspace characteristics, the Houbeiping and the like obtain matching point pairs among the elements according to the method of fusing the SURF characteristics and the color information, and accurate pairing among the circuit board chips is realized. Suxiahong et al propose to use the mode of combining the difference image method and the matching of local image template, solve the detection problem of micron-scale defects on TFT-LCD glass substrate. From the frequency domain characteristics, Tsai and the like only reserve frequency components related to local spatial anomaly by comparing the overall Fourier spectrum of the template and the detected image, and then apply inverse Fourier transform to reconstruct the detected 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
In order to solve the technical problems, the invention provides a complex background image defect detection method and a complex background image defect detection system based on combination of a frequency domain and a spatial domain.
In order to realize the technical problem, the invention adopts the following technical scheme:
on one hand, the invention provides a complex background image defect detection method based on frequency domain and spatial domain combination, which is characterized by comprising the following steps:
A. 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;
C. taking the intersection of the candidate region 1 and the candidate region 2 to perform inverse Fourier transform to obtain an alternative defect region;
D. and finally screening the candidate defect region according to the entropy of the spatial domain characteristic image.
On the other hand, the invention provides a complex background image defect detection system based on the combination of a frequency domain and a space domain, which is characterized by comprising the following steps:
the candidate region 1 screening module is used for converting the template image and the sample image into a frequency domain for matching, respectively converting the successfully matched template image and the successfully matched 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;
the candidate region 2 screening module is used for carrying out frequency domain significance detection on the frequency domain image of the sample image to obtain a significance region, and removing background frequency components in the significance region to obtain a candidate region 2;
the candidate defect region screening module is used for taking the intersection of the candidate region 1 and the candidate region 2 to perform inverse Fourier transform to obtain a candidate defect region;
and the defect region screening module is used for finally screening the candidate defect region according to the entropy of the airspace characteristic image to obtain a final defect region.
Compared with the prior art, the invention has the beneficial effects that: the method combines the characteristics of the complex background image in the frequency domain and the space domain, and performs template matching in the frequency domain and the space domain respectively to obtain the abnormal part in the sample image so as to detect the defect.
Drawings
FIG. 1 is a flow chart of the 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 an intersection image of candidate region 1 and candidate region 2 in an embodiment of the present invention.
Fig. 6 is a final defect region detection image obtained by performing spatial domain template matching on candidate defect regions in the intersection image in the embodiment of the present invention.
Fig. 7 shows the detection results of other different images.
Fig. 8 shows the defect detection result of a large-image complex line.
FIG. 9 shows the result of detecting the defect of a complex circuit in a large image after image segmentation and multithread operation.
Fig. 10 shows the detection result after the defect is segmented during the segmentation of the image.
Detailed Description
Example 1
The embodiment provides a complex background image defect detection method based on combination of a frequency domain and a spatial domain, as shown in fig. 1, the method mainly comprises three links of frequency domain template matching, frequency domain significance detection and spatial domain template matching, and specifically comprises the following steps:
step 1: a template image and a sample image are acquired as shown in fig. 2.
And 2, in order to avoid the influence of translation and illumination, performing two-dimensional discrete Fourier transform on the template image and the sample image to a frequency domain.
And 3, performing rotation calibration on the frequency domain graph of the sample image.
And 4, converting the frequency domain graphs of the template image and the sample image into a polar coordinate system.
And 5, judging abnormal frequency components in the template image and the sample image under the polar coordinate system according to the screening criterion.
The abnormal frequency component screening criteria are as follows:
1) the power of the template and the sample is in the rising trend in the direction theta
2) The power of the template and the sample in the direction theta is in the trend of ascending first and then descending
3) The power of the template and the sample is in the trend of descending first and then ascending in the direction theta
4) The power of the template and the sample is in a descending trend in the direction theta
After deleting the frequency components, 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 two points before and after the point in the direction theta. C is a control parameter, the smaller C value can retain defects as much as possible and introduce more noise and pattern residues, and after a large number of experiments, the C value is recommended to be 2.
And 6, reserving abnormal frequency components of the sample image, and performing polar coordinate system inverse transformation and Fourier inverse transformation on the abnormal frequency components on the sample image to obtain a candidate region 1, as shown in FIG. 3. Observing fig. 3, it can be seen that although the defect at the lower right of the sample image is accurately detected, there are still a lot of false detection conditions at the left side of the image, and further screening is required.
And 7, calculating the significance value of each pixel in the frequency domain image of the sample image, and extracting a significance region according to a threshold value.
Using the global contrast as a saliency value for each pixel, the following is calculated:
wherein, IiHas a value range of [0,255 ]]I.e. the grey value of the corresponding pixel.
After obtaining the saliency value of each pixel, determining an appropriate threshold to extract the saliency area is required, and the threshold is selected as follows:
T=μ+K*δ
wherein μ represents the average of all significant values, δ represents the standard deviation of all significant values, K is a control parameter, smaller K values retain more significant regions, removed backgrounds are more, and K values are suggested to be 0 through a large number of experiments.
Although the background interference of the image can be removed to a certain extent by the saliency detection, due to the complexity of the distribution of the frequency components of the defects in the complex image, the defects are also likely to be removed together in the detection process, so that a circular protection region with the radius of R needs to be arranged near the center of the frequency domain, and other frequency components except for the zero frequency component (the center point of the frequency domain) in the protection region are all reserved, so that the complete detection of the defects can be better ensured. After a number of experiments, the value of R is suggested to be 1.
And 8, removing background frequency components in the salient region and performing inverse Fourier transform to obtain a candidate region 2, as shown in FIG. 4. In the step, a frequency domain central protection area can be set firstly, so that the defect complete detection is better ensured. Observing fig. 4, it can be seen that the image defects are still detected completely, but there is a large amount of false detection above the image.
And 9, taking the intersection area of the candidate areas 1 and 2 to perform inverse Fourier transform to obtain a candidate defect area, as shown in FIG. 5. By observing fig. 5, it can be found that after the intersection of the images of the candidate region 1 and the candidate region 2 is taken, the previous false detection regions are greatly reduced, and only a small number of false detection situations exist.
Step 10, firstly, carrying out rotation calibration on the sample image in the airspace by using a rotation matrix obtained in the frequency domain template matching process, expanding the alternative regions obtained in the figure 5, then respectively calculating the corresponding image entropy values of each expanded alternative defect region on the template image and the calibrated sample image, and reserving the final defect region according to the difference between the corresponding entropy values.
The image entropy is used as the bit average of the image gray level set, can avoid the influence of illumination and simultaneously reflect the average information amount in the image and the aggregation characteristics of the image gray level distribution, and is calculated as follows:
wherein, PiRepresenting the probability that a pixel with a grey value i appears in the image.
In order to avoid the influence of translation between the template and the sample, firstly expanding the region obtained in the step C, then respectively calculating corresponding entropy values of the expanded region on the template and the sample, and finally, regarding the region with the corresponding entropy value difference larger than a threshold value H as a defect region to be reserved. Through a number of experiments, the H value is suggested to be 0.5.
After this step, the defective area in the sample image has been accurately detected, as shown in fig. 6.
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 spatial domain template matching, the method for obtaining the rotation matrix by searching the characteristic points is simpler and more accurate, and the characteristic region can be extracted and the rotation matrix can be calculated in the frequency domain only by fixing the 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 5.
FIG. 7 is a diagram showing the results of other different image tests using the defect detection method of the present invention. In the figure, (a) is a template image, (b) is a sample image, (c) is a frequency domain template matching detection result, (d) is a frequency domain significance detection result, (e) is an alternative area after intersection of the frequency domain template matching and the significance detection result, (f) is a final defect detection area after space domain template matching, and (g) is a detection effect on the final sample image. The image result shows that even if a certain difference exists between the template and the sample image, the method can still effectively detect the dust, dirt and scratch defects in various complex etching lines.
Example 2
For defect detection of a large image complex line, the embodiment provides a complex background image defect detection method based on combination of a frequency domain and a space domain, and adopts image segmentation multithreading operation to improve detection effect and operation efficiency, and specifically comprises the following steps:
step 1: the template image and the sample image are sequentially acquired as shown in fig. 8, where (a) is the template image and (b) is the sample image.
And 2, segmenting the template image and the sample image into corresponding sub-images, as shown in FIG. 9.
And 3, performing two-dimensional discrete Fourier transform on each pair of sub-images to a frequency domain.
And 4, performing rotation calibration on the frequency domain graph of the sample sub-image.
And 5, converting the frequency domain graphs of the template and the sample sub-images into a polar coordinate system.
And 6, judging abnormal frequency components in each array of templates and sample sub-images under the polar coordinate system according to the screening criterion.
Step 7, reserving abnormal frequency components of the sample image, and performing polar coordinate system inverse transformation and Fourier inverse transformation on the abnormal frequency components on the sample image to obtain a candidate region 1;
and 8, calculating the significance value of each pixel in the frequency domain image of the sample sub-image, and extracting a significance region according to a threshold value.
Step 9, removing background frequency components in the salient region and performing inverse Fourier transform to obtain a candidate region 2;
step 10, taking the intersection area of the candidate areas 1 and 2 to perform inverse Fourier transform to obtain an alternative defect area;
and 11, firstly, carrying out rotation calibration on the sample subimage on the airspace by using a rotation matrix obtained in the frequency domain template matching process, expanding the obtained alternative areas, then respectively calculating the corresponding image entropy of each expanded alternative defect area on the template image and the calibrated sample image, and reserving the final defect area according to the difference between the corresponding entropy values.
And 12, after each pair of sub-images is processed according to the steps, splicing the detection results of all the sub-images into a final detection result.
The right side of (b) in fig. 8 shows the positive detection, false detection and missing detection of the defect when the sample image to be detected is too large. Observing the image can find that when the sample image to be detected is too large, the difference between the template and the sample in the frequency domain becomes small, and at this time, the previously proposed correlation selection standard cannot completely and effectively retain the frequency components related to the defect, thereby causing the situations of defect false detection and defect omission as shown in the figure.
Fig. 9 is a result of detecting by dividing the template and the sample image into eight sub-images by an image division multithread calculation method, and compared with the detection result of fig. 8, the corresponding defects are all correctly detected and the false detection area is greatly reduced.
Fig. 10 shows the detection result after the defect is segmented during the segmentation of the image, where (a) is the sample image, (b) is the template image, and (c) is the effect after the segmentation into 4 sub-images. The observation of the image can find that even if the defects are also divided in the image dividing process, the defects of each divided block can still be accurately detected in the corresponding divided sub-image, so that the mode of image division has no influence on the detection of the defects.
Example 3
The embodiment provides a complex background image defect detection system based on the combination of a frequency domain and a spatial domain, which comprises:
the candidate region 1 screening module is used for converting the template image and the sample image into a frequency domain for matching, respectively converting the successfully matched template image and the successfully matched 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;
the candidate region 2 screening module is used for carrying out frequency domain significance detection on the frequency domain image of the sample image to obtain a significance region, and removing background frequency components in the significance region to obtain a candidate region 2;
the candidate defect region screening module is used for taking the intersection of the candidate region 1 and the candidate region 2 to perform inverse Fourier transform to obtain a candidate defect region;
and the defect region screening module is used for finally screening the candidate defect region according to the entropy of the airspace characteristic image to obtain a final defect region.
For the defect detection of a large image complex line, the complex background image defect detection system based on the combination of the frequency domain and the spatial domain further comprises:
and the image segmentation and splicing module is used for segmenting the corresponding subimages of the template image and the sample image, detecting each pair of subimages and then splicing the subimages into a complete image.
Claims (9)
1. A complex background image defect detection method based on combination of a frequency domain and a space domain is characterized by comprising the following steps:
A. converting the template image and the sample image into a frequency domain for matching, respectively converting the successfully matched template image and the successfully matched 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;
C. taking the intersection of the candidate region 1 and the candidate region 2 to perform inverse Fourier transform to obtain an alternative defect region;
D. and finally screening the candidate defect region according to the entropy of the spatial domain characteristic image.
2. The method according to claim 1, wherein the step A comprises: abnormal frequency components are screened according to the following criteria:
1) the power of the template image and the sample image is in the rising trend in the direction theta
2) The power of the template image and the power of the sample image in the direction theta are in the trend of ascending first and then descending
3) The power of the template image and the power of the sample image in the direction theta are in the trend of descending first and then ascending
4) The power of the template image and the power of the sample image in the direction theta are in a descending trend
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 according to claim 1, wherein the step B comprises: 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 according to claim 1, wherein the step B comprises: and arranging a circular protection area near the center of the frequency domain, wherein other frequency components except the zero frequency component in the circular protection area are reserved.
5. The method according to claim 1, wherein the step D comprises: and performing spatial domain template matching on the candidate defect region, firstly expanding the candidate region, respectively calculating corresponding image entropy values of the expanded candidate defect region on a template image and a sample image, and reserving the region with the corresponding image entropy value difference larger than a set threshold value as a final defect region.
6. The method for detecting the defect of the complex background image based on the combination of the frequency domain and the spatial domain as claimed in claim 1, wherein the image entropy is calculated as follows:
wherein, PiRepresenting the probability that a pixel with a grey value i appears in the image.
7. The method of claim 1, wherein the complex background image defect detection method based on the combination of the frequency domain and the spatial domain is performed by dividing the template image and the sample image into corresponding sub-images by adopting image division multithread operation.
8. A complex background image defect detection system based on combination of a frequency domain and a space domain is characterized by comprising:
the candidate region 1 screening module is used for converting the template image and the sample image into a frequency domain for matching, respectively converting the successfully matched template image and the successfully matched 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;
the candidate region 2 screening module is used for carrying out frequency domain significance detection on the frequency domain image of the sample image to obtain a significance region, and removing background frequency components in the significance region to obtain a candidate region 2;
the candidate defect region screening module is used for taking the intersection of the candidate region 1 and the candidate region 2 to perform inverse Fourier transform to obtain a candidate defect region;
and the defect region screening module is used for finally screening the candidate defect region according to the entropy of the airspace characteristic image to obtain a final defect region.
9. The system according to claim 8, further comprising:
and the image segmentation and splicing module is used for segmenting the corresponding subimages of the template image and the sample image, detecting each pair of subimages and then splicing the subimages into a complete image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110761521.9A CN113487569B (en) | 2021-07-06 | 2021-07-06 | Complex background image defect detection method and system based on combination of frequency domain and space domain |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110761521.9A CN113487569B (en) | 2021-07-06 | 2021-07-06 | Complex background image defect detection method and system based on combination of frequency domain and space domain |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113487569A true CN113487569A (en) | 2021-10-08 |
CN113487569B CN113487569B (en) | 2024-03-26 |
Family
ID=77940437
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110761521.9A Active CN113487569B (en) | 2021-07-06 | 2021-07-06 | Complex background image defect detection method and system based on combination of frequency domain and space domain |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113487569B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114486916A (en) * | 2022-01-26 | 2022-05-13 | 上海电机学院 | Mobile phone glass cover plate defect detection method based on machine vision |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104217430A (en) * | 2014-08-26 | 2014-12-17 | 浙江大学 | Image significance detection method based on L1 regularization |
CN106599891A (en) * | 2016-10-18 | 2017-04-26 | 华中科技大学 | Remote sensing image region-of-interest rapid extraction method based on scale phase spectrum saliency |
CN111260621A (en) * | 2020-01-14 | 2020-06-09 | 湖南大学 | Method for positioning and identifying surface defects of printed circuit board |
-
2021
- 2021-07-06 CN CN202110761521.9A patent/CN113487569B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104217430A (en) * | 2014-08-26 | 2014-12-17 | 浙江大学 | Image significance detection method based on L1 regularization |
CN106599891A (en) * | 2016-10-18 | 2017-04-26 | 华中科技大学 | Remote sensing image region-of-interest rapid extraction method based on scale phase spectrum saliency |
CN111260621A (en) * | 2020-01-14 | 2020-06-09 | 湖南大学 | Method for positioning and identifying surface defects of printed circuit board |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114486916A (en) * | 2022-01-26 | 2022-05-13 | 上海电机学院 | Mobile phone glass cover plate defect detection method based on machine vision |
Also Published As
Publication number | Publication date |
---|---|
CN113487569B (en) | 2024-03-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108460757B (en) | Mobile phone TFT-LCD screen Mura defect online automatic detection method | |
US7925073B2 (en) | Multiple optical input inspection system | |
KR20090066212A (en) | Defect detection method and defect detection apparatus | |
US7039236B2 (en) | Image processor and pattern recognition apparatus using the image processor | |
CN115035122B (en) | Artificial intelligence-based integrated circuit wafer surface defect detection method | |
CN113781424B (en) | Surface defect detection method, device and equipment | |
CN115205223B (en) | Visual inspection method and device for transparent object, computer equipment and medium | |
JP5806786B1 (en) | Image recognition device | |
Ma | Defect detection and recognition of bare PCB based on computer vision | |
CN117152165B (en) | Photosensitive chip defect detection method and device, storage medium and electronic equipment | |
Ma et al. | An automatic detection method of Mura defects for liquid crystal display | |
CN114255212A (en) | FPC surface defect detection method and system based on CNN | |
CN110648330A (en) | Defect detection method for camera glass | |
CN115311282A (en) | Wafer defect detection method based on image enhancement | |
CN111476750A (en) | Method, device and system for carrying out stain detection on imaging module and storage medium | |
CN117115130A (en) | Wafer edge defect detection method and device | |
CN113487569B (en) | Complex background image defect detection method and system based on combination of frequency domain and space domain | |
CN116468726A (en) | Online foreign matter line detection method and system | |
CN109829912B (en) | Defect detection method of TFT array substrate | |
CN113112396B (en) | Method for detecting conductive particles | |
CN110349129B (en) | Appearance defect detection method for high-density flexible IC substrate | |
CN116934762A (en) | System and method for detecting surface defects of lithium battery pole piece | |
CN114298977A (en) | Complex background image defect detection method based on frequency domain template matching | |
CN115131355B (en) | Intelligent method for detecting waterproof cloth abnormity by using electronic equipment data | |
CN116503324A (en) | Black glue module appearance detection method and system based on machine vision |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |