A method, system and device for defect extraction under a uniform texture background

By performing two matching and difference processing on the defect area under a uniform texture background, the problem of defect edge expansion in traditional methods is solved, and the accuracy and accuracy of defect detection are achieved.

CN115587983BActive Publication Date: 2025-07-11BEIJING LUSTER LIGHTTECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211256069.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-13
Publication Date
2025-07-11
Estimated Expiration
2042-10-13

AI Technical Summary

Technical Problem

Under the background of uniform texture, after the traditional filtering method removes the texture, the defect edges are likely to become larger, resulting in the detected defect area being larger than the actual defect area.

Method used

By performing the first match of the first to be matched area, the preliminary position of the background image area is determined, and then performing a second match of the second to be matched area, combining the grayscale or shape matching method, the offset is calculated and the matching area is moved, and a quadratic difference image is generated to remove the non-defective area and accurately determine the defect edge.

Benefits of technology

Improve the accuracy of defect detection, ensure clearer defect edges, and reduce false detection and missed detection in defect areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115587983B_ABST
    Figure CN115587983B_ABST
Patent Text Reader

Abstract

This application relates to the field of defect detection technology. Specifically, it relates to a method, system and device for defect extraction under a uniform texture background, which can solve the problem of inaccurate detected defect areas to a certain extent. The method includes: obtaining a primary area containing defects in a first image, where the primary area is a first area to be matched; expanding the boundary of the first area to be matched to determine a first search area; obtaining a primary matching area according to the features of the first area to be matched and the first search area; determining a second area to be matched and a second search area; determining a secondary matching area according to the features of the second search area and the second area to be matched; calculating the offset between the second area to be matched and the secondary matching area, and moving the primary matching area according to the offset, and the area where the primary matching area is located after moving is the position of the background image area; obtaining a secondary difference image, and removing non-defect areas in the secondary difference image to obtain target defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of defect detection, and in particular to a defect extraction method, system and device under a uniform texture background. Background Art

[0002] With the continuous improvement of people's living standards, the quality requirements for display screens are gradually increasing. At the same time, display screen defect detection is also facing higher requirements. Display screen defect detection is an important process in industrial production. Common display screen defects can be roughly divided into three types according to their shapes: dots, lines, and color spots. Among them, dot defects are the most common defects in display screens.

[0003] Display screens are usually composed of multiple fixedly arranged liquid crystal units, and there is a gap between adjacent liquid crystal units. Therefore, when a high-resolution camera is used to capture images, the display area will show a uniform texture phenomenon of light and dark intersections. Therefore, when detecting defects on display screens, it is necessary to remove the texture to reduce the impact of the texture on the identification of defective areas. The traditional point defect detection method under uniform texture is usually to remove the texture by filtering, and then process the defective image to determine the defect.

[0004] However, in the process of detecting defects, the above method may easily cause the defect edge to become larger due to filtering, so that the detected defect area is larger than the actual defect area. Summary of the invention

[0005] In order to solve the problem of inaccurate detected defect areas, the present application provides a defect extraction method, system, device and storage medium under a uniform texture background.

[0006] The embodiment of the present application is implemented as follows:

[0007] A first aspect of an embodiment of the present application provides a defect extraction method under a uniform texture background, comprising the following steps:

[0008] Acquire a primary region containing defects in the first image, where the primary region is a first region to be matched;

[0009] Expanding the boundary of the first area to be matched to obtain a first search area; performing a first match based on the features of the first area to be matched and the first search area to identify a primary matching area, wherein the primary matching area is used to determine a preliminary position of a background image area in the first image;

[0010] Based on the first matching region, a second region to be matched is selected; based on the first region to be matched, a second search region is selected, and the offset of the center of the second region to be matched relative to the center of the first matching region is the same as the offset of the center of the second search region relative to the center of the first region to be matched; according to the features of the second search region and the second region to be matched, a second matching is performed to identify a second matching region;

[0011] Calculate the offset between the second region to be matched and the second matching region, and move the first matching region according to the offset. The region where the first matching region is located after moving is the position of the background image region;

[0012] Subtract the second image containing the first region to be matched from the third image containing the background image region to determine a second difference image, and remove the non-defect regions in the second difference image to obtain the target defect.

[0013] In some embodiments, the first region to be matched is the defect region after directly extracting the defect or the region after expanding the defect region boundary.

[0014] In some embodiments, the first search region is an extended region obtained by extending the first region to be matched upward and downward by at least the height of the first region to be matched once each, and extending the first region to be matched leftward and rightward by at least the width of the first region to be matched once each.

[0015] In some embodiments, the width of the second search region is greater than the width of the second region to be matched, the height of the second search region is greater than the height of the second region to be matched, and both the width and height of the second region to be matched are greater than or equal to 1 period, and both the width and height of the second search region are greater than or equal to 3 periods.

[0016] In some embodiments, both the first matching and the second matching adopt a gray-scale matching method or a shape matching method.

[0017] The second aspect of the embodiments of the present application provides a defect extraction system under a uniform texture background, including: a primary defect extraction module, a secondary defect extraction module, and a defect screening module. The secondary defect extraction module includes a primary matching sub-module, a secondary matching sub-module, a background region acquisition sub-module, and a secondary processing sub-module;

[0018] The primary defect extraction module is configured to obtain a primary region containing defects in the first image, and the primary region is the first region to be matched;

[0019] A primary matching sub-module, configured to perform boundary expansion on the first region to be matched to obtain a first search region; perform a first match according to the features of the first region to be matched and the first search region to identify a primary matching region, where the primary matching region is used to determine a preliminary position of a background image region in the first image;

[0020] A secondary matching sub-module, configured to select a second region to be matched based on the primary matching region; select a second search region based on the first region to be matched, where an offset of the center of the second region to be matched relative to the center of the primary matching region is the same as an offset of the center of the second search region relative to the center of the first region to be matched; perform a second match according to the features of the second search region and the second region to be matched to identify a secondary matching region;

[0021] A background region obtaining sub-module, configured to calculate an offset between the second region to be matched and the secondary matching region, and move the primary matching region according to the offset, where a region where the primary matching region is located after moving is the position of the background image region;

[0022] A secondary processing sub-module, configured to subtract a second image including the first region to be matched from a third image including the background image region to determine a secondary difference image;

[0023] A defect screening module, configured to remove non-defect regions in the secondary difference image to obtain target defects.

[0024] In some embodiments, the first region to be matched is a defect region after directly extracting a defect or a region after expanding the boundary of the defect region.

[0025] In some embodiments, the first search region is an extended region obtained by extending the first region to be matched upward and downward by at least the height of the first region to be matched once each, and extending the first region to be matched leftward and rightward by at least the width of the first region to be matched once each.

[0026] In some embodiments, the width of the second search region is greater than the width of the second region to be matched, the height of the second search region is greater than the height of the second region to be matched, and both the width and height of the second region to be matched are greater than or equal to 1 period, and both the width and height of the second search region are greater than or equal to 3 periods.

[0027] A third aspect of the embodiments of the present application provides a defect extraction device under a uniform texture background, including:

[0028] A memory and a processor, where the memory is used to store a defect extraction program under a uniform texture background, and the processor runs the defect extraction program under the uniform texture background so that the defect extraction system under the uniform texture background executes the defect extraction method under the uniform texture background as described in the first aspect.

[0029] Advantages of this application: By performing the first matching on the first region to be matched, the preliminary position of the background image region can be quickly determined. Then, by performing the second matching on the second region to be matched, it helps to accurately determine the position of the background image region. After that, by calculating the second-difference image, the edges of the defects are sharpened, and thus the detection results of the defects are accurate, which helps to improve the accuracy of the results detected by traditional methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.

[0031] Figure 1 It shows a schematic flowchart of a defect extraction method under a uniform texture background provided by some embodiments of the present application;

[0032] Figure 2 It shows a flowchart of obtaining the first region to be matched in a defect extraction method under a uniform texture background provided by some embodiments of the present application;

[0033] Figure 3 It shows a schematic diagram of the processing result in the process of obtaining the first region to be matched in a defect extraction method under a uniform texture background provided by some embodiments of the present application;

[0034] Figure 4 It shows a schematic diagram of the first region to be matched in a defect extraction method under a uniform texture background provided by some other embodiments of the present application;

[0035] Figure 5 It shows a schematic diagram of the first search region in a defect extraction method under a uniform texture background provided by an embodiment of the present application;

[0036] Figure 6 It shows a schematic diagram of the processing result in the determination process of the first matching region and the second matching region in a defect extraction method under a uniform texture background provided by an embodiment of the present application;

[0037] Figure 7Shows a schematic structural diagram of a defect extraction system provided by an embodiment of the present application under a uniform texture background;

[0038] Figure 8 Shows a schematic structural diagram of a defect extraction device provided by an embodiment of the present application under a uniform texture background. Detailed implementation manners

[0039] To make the objectives, implementation manners, and advantages of the present application clearer, the following will clearly and completely describe the exemplary implementation manners of the present application with reference to the accompanying drawings in the exemplary embodiments of the present application. Obviously, the described exemplary embodiments are only a part of the embodiments of the present application, rather than all of the embodiments.

[0040] It should be noted that the brief description of the terms in the present application is only for the convenience of understanding the subsequent described implementation manners, rather than intending to limit the implementation manners of the present application. Unless otherwise specified, these terms should be understood in their ordinary and general meanings.

[0041] The terms "first", "second", "third", etc. in the description, claims, and the above drawings of the present application are used to distinguish similar or homogeneous objects or entities, and do not necessarily mean to limit a specific order or sequence, unless otherwise noted. It should be understood that such terms can be interchanged under appropriate circumstances.

[0042] The terms "including" and "having" and any of their variations are intended to cover but not exclusively include. For example, a product or device including a series of components does not necessarily have to be limited to all the clearly listed components, but may include other components that are not clearly listed or are inherent to these products or devices.

[0043] As Figure 1 shown, the defect extraction method under a uniform texture background includes the following steps:

[0044] In step 100, obtain the primary region containing defects in the first image, and the primary region is the first region to be matched.

[0045] Among them, as combined Figure 2 and Figure 3 shown, step 100 specifically includes the following steps:

[0046] Step 110, obtain the first image, and the first image contains defects. The first image can be obtained through various means, such as being captured by a CCD or CMOS camera, or being the result of other image preprocessing, etc.

[0047] Step 120, preprocess the first image to filter out texture interference and obtain a preprocessed image.

[0048] In some embodiments, by performing small-scale smoothing on the first image, texture interference in the first image can be filtered out to obtain a preprocessed image, and the smoothing method of the preprocessed image includes but is not limited to Gaussian smoothing.

[0049] Step 130, perform secondary processing on the preprocessed image to construct a background image.

[0050] In some embodiments, by performing large-scale smoothing on the preprocessed image, a background image is constructed. The smoothing methods include but are not limited to mean filtering, and morphological operations, frequency domain filtering, etc. can also be used.

[0051] In addition, in some embodiments, a non-linear range filter can be used to filter out the texture of the first image. Each pixel is processed one by one, that is, all pixel grayscales within the MaskX and MaskY ranges are arranged in ascending or descending order. The first (MaskX * MaskY) / D grayscales are removed, and the last (MaskX * MaskY) / E grayscales are removed. The remaining pixel grayscales are averaged (the value ranges of D and E are both 1 / 4 to 1 / 2). The processed image is the first image.

[0052] Step 140, after subtracting the gray value of the corresponding position of the preprocessed image from the gray value of the corresponding position of the background image, a difference image is obtained. Threshold segmentation is performed on the difference image to determine a primary region, that is, a first region to be matched. The first region to be matched can be Figure 3 the black box region in. It should be noted that when there are no defects in the first image, the first image is a uniform gray image with a gray value of 128.

[0053] In step 200, boundary expansion is performed on the first region to be matched to obtain a first search region; according to the characteristics of the first region to be matched and the first search region, a first match is performed to identify a first matching region, and the first matching region is used to determine the preliminary position of the background image region in the first image.

[0054] It can be understood that the first region to be matched can be a defect region directly extracted after the above step 140, or a region after expanding the boundary of the defect region, and the expanded region is located around the periphery of the first region to be matched. At this time, the possibility of incomplete defect extraction in the first region to be matched can be reduced.

[0055] Among them, when the period is the interval of pixel repetition, in some embodiments, the boundary of the defect region directly extracted after the above step 140 can be expanded by the width of 2 periods in the direction away from the center of the first region to be matched. At this time, the obtained first region to be matched is as Figure 4The large black frame area shown. It can be understood that when the extended width is greater than 2 cycles, it is likely to cause a large amount of later calculations and affect work efficiency; when the extended width is less than 2 cycles, it is likely to cause incomplete defect extraction in the first area to be matched.

[0056] Take the primary area as the first area to be matched. Based on the extension of the boundary of the first area to be matched, obtain the first search area. The first search area is generally the area around the perimeter of the first area to be matched. Among them, the first search area is an extended area obtained by extending the first area to be matched upward and downward by at least the height of the first area to be matched once each, and extending the first area to be matched leftward and rightward by at least the width of the first area to be matched once each. For example, in some embodiments, the first search area is an extended area obtained by extending the first area to be matched upward and downward by the height of the first area to be matched, and extending the first area to be matched leftward and rightward by the width of the first area to be matched, that is, as Figure 5 shown. At this time, the first search area is composed of 8 areas of the same size as the first area to be matched, and the determination method of the first search area is simple and convenient.

[0057] Combined with Figure 6 shown, perform the first match on the first area to be matched and the search area, that is, compare at least one feature of the first area to be matched and the search area according to the actual application situation, and search for the area with the highest search score as the first match area. Among them, it can be understood that the method of the first match can adopt gray-scale matching or shape matching.

[0058] In step 300, based on the first match area, select the second area to be matched; based on the first area to be matched, select the second search area. The offset of the center of the second area to be matched relative to the center of the first match area is the same as the offset of the center of the second search area relative to the center of the first area to be matched; according to the features of the second search area and the second area to be matched, perform the second match to identify the second match area.

[0059] Among them, the offset generally refers to the difference between different coordinates. The second area to be matched is near the first match area, and the second search area is near the first area to be matched.

[0060] It should be noted that the width and height of the second search area are both greater than the width and height of the second area to be matched, and the width and height of the second area to be matched are both greater than or equal to 1 cycle, and the width and height of the second search area are both greater than or equal to 3 cycles.

[0061] Such as Figure 6As shown, in some embodiments, after the position of the first matching region is determined, add 1.5 times the period to the abscissa of the upper left corner of the first matching region to obtain the abscissa of the center of the second region to be matched. Subtract 0.5 times the period from the ordinate of the upper left corner of the first matching region to obtain the ordinate of the center of the second region to be matched. Set both the width and height of the second region to be matched to 1 period. The resulting region is the second region to be matched, which can be denoted as the positioning kernel region.

[0062] Based on the second region to be matched, add 1.5 times the period to the abscissa of the upper left corner of the first region to be matched to obtain the abscissa of the center of the second search region. Subtract 0.5 times the period from the ordinate of the upper left corner of the first region to be matched to obtain the ordinate of the center of the second search region. Set both the width and height of the search region to 3 periods. The resulting region is the second search region, which can be denoted as the positioning kernel search region, and the search step is 1 pixel.

[0063] Perform a second matching on the second region to be matched and the second search region, that is, compare at least one feature of the second region to be matched and the second search region according to the actual application situation, and search for the region with the highest score as the second matching region. It can be understood that the method of the second matching can adopt gray-scale matching or shape matching.

[0064] In summary, the first matching uses a large step size to determine the preliminary position, and the second matching uses a small local region and a small step size to match to determine the accurate position of the background region. It should be noted that the period in this application is counted as the interval of pixel repetition.

[0065] In step 400, since the first matching region and the second matching region are in the same coordinate system, the offset between the positioning kernel matching region and the positioning kernel region is the same as the offset between the first matching region and the first region to be matched. Therefore, calculate the offset between the second region to be matched and the second matching region, and move the first matching region according to the offset. The region where the first matching region is located after moving is the position of the background image region.

[0066] In step 500, intercept the second image containing the first region to be matched and the third image containing the background region, subtract the gray level of the corresponding position of the second image containing the first region to be matched from the gray level of the corresponding position of the third image containing the background image region to determine the second difference image, and remove the non-defect regions in the second difference image to obtain the target defect.

[0067] In some embodiments, the second-difference image can be subjected to second threshold segmentation, and operations such as blob analysis can be performed on the results of the second threshold segmentation, so as to remove the non-defect regions in the second-difference image and obtain the defect results. Moreover, the output defect results are regions, and the storage mode of the regions can be in any form. For example, the defect results can be a point set or an image.

[0068] An embodiment of the present application provides a defect extraction method under a uniform texture background. By performing a first match and a second match on the first region to be matched, the edges of the defects can be sharpened, which helps to improve the accuracy of the results detected by traditional methods; by setting the first region to be matched as the region after expanding the defect region boundary, it is possible to help reduce the possibility of incomplete defect extraction; further, the first region to be matched extends upward and downward by the height of the first region to be matched, and extends leftward and rightward by the width of the first region to be matched, so that the determination process of the first search region is efficient and convenient.

[0069] The second aspect of the present application provides a defect extraction system under a uniform texture background, as Figure 7 shown. The defect extraction system under a uniform texture background includes: a primary defect extraction module, a secondary defect extraction module, and a defect screening module.

[0070] The primary defect extraction module is used to obtain the primary region containing defects in the first image, and the primary region is the first region to be matched;

[0071] The primary matching sub-module is used to expand the boundary of the first region to be matched to obtain the first search region; according to the characteristics of the first region to be matched and the first search region, perform the first match to identify the primary matching region, and the primary matching region is used to determine the preliminary position of the background image region in the first image;

[0072] The secondary matching sub-module is used to select the second region to be matched based on the primary matching region; select the second search region based on the first region to be matched, and the offset of the center of the second region to be matched relative to the center of the primary matching region is the same as the offset of the center of the second search region relative to the center of the first region to be matched; according to the characteristics of the second search region and the second region to be matched, perform the second match to identify the secondary matching region;

[0073] The background region acquisition sub-module is used to calculate the offset between the second region to be matched and the secondary matching region, and move the primary matching region according to the offset. The region where the primary matching region is located after moving is the position of the background image region;

[0074] The secondary processing sub-module is used to subtract the second image containing the first region to be matched from the third image containing the background image region to determine the second-difference image;

[0075] A defect screening module, configured to remove non-defect regions in the second-difference image to obtain target defects.

[0076] In some embodiments, the first region to be matched is the defect region after directly extracting the defect or the region after expanding the boundary of the defect region.

[0077] In some embodiments, the first search region is an extended region obtained by extending the height of the first region to be matched at least once upward and downward and extending the width of the first region to be matched at least once leftward and rightward.

[0078] In some embodiments, the width of the second search region is greater than the width of the second region to be matched, the height of the second search region is greater than the height of the second region to be matched, and both the width and height of the second region to be matched are greater than or equal to 1 period and both the width and height of the second search region are greater than or equal to 3 periods.

[0079] In some embodiments, both the first matching and the second matching adopt a gray-scale matching method or a shape matching method.

[0080] The defect extraction system under a uniform texture background provided by the embodiments of the present application has a similar implementation principle and technical effect to those of the above method embodiments, and will not be elaborated herein.

[0081] A third aspect of the embodiments of the present application provides a defect extraction device under a uniform texture background, as Figure 8 shown. The defect extraction device under a uniform texture background includes a processor, a memory, a communication interface, and a communication bus. The processor, the memory, and the communication interface complete communication with each other through the communication bus; the memory is used to store a defect extraction program under a uniform texture background, and the processor runs the defect extraction program under a uniform texture background so that the defect extraction system under a uniform texture background executes the defect extraction method under a uniform texture background in the first aspect above.

[0082] The defect extraction device under a uniform texture background provided by the embodiments of the present application has a similar implementation principle and technical effect to those of the above method embodiments, and will not be elaborated herein.

[0083] A computer-readable storage medium provided in a fourth aspect of the embodiments of the present application has a defect extraction program under a uniform texture background stored thereon. When the defect extraction program under a uniform texture background is executed by a processor, the following steps are implemented:

[0084] Obtain a primary region containing defects in the first image, and the primary region is the first region to be matched;

[0085] Expand the boundary of the first region to be matched to obtain a first search region; perform a first match based on the characteristics of the first region to be matched and the first search region to identify a first matching region, and the first matching region is used to determine the preliminary position of the background image region in the first image;

[0086] Based on the first matching region, select a second region to be matched; based on the first region to be matched, select a second search region, and the offset of the center of the second region to be matched relative to the center of the first matching region is the same as the offset of the center of the second search region relative to the center of the first region to be matched; perform a second match based on the characteristics of the second search region and the second region to be matched to identify a second matching region;

[0087] Calculate the offset between the second region to be matched and the second matching region, and move the first matching region according to the offset. The region where the first matching region is located after moving is the position of the background image region;

[0088] Subtract the second image containing the first region to be matched from the third image containing the background image region to determine a second difference image, and remove the non-defect regions in the second difference image to obtain the target defect.

[0089] In some embodiments, the first region to be matched is the defect region after directly extracting the defect or the region after expanding the boundary of the defect region.

[0090] In some embodiments, the first search region is an extended region obtained by extending the first region to be matched upward and downward by at least the height of the first region to be matched once each, and extending leftward and rightward by at least the width of the first region to be matched once each.

[0091] In some embodiments, the width of the second search region is greater than the width of the second region to be matched, the height of the second search region is greater than the height of the second region to be matched, and both the width and height of the second region to be matched are greater than or equal to 1 period, and both the width and height of the second search region are greater than or equal to 3 periods.

[0092] In some embodiments, both the first match and the second match adopt a gray-scale matching method or a shape matching method.

[0093] The computer-readable storage medium provided in this embodiment has the same implementation principle and technical effects as the above method embodiment, and will not be elaborated here.

[0094] The beneficial effects in the embodiments of the present application are as follows: By performing the first matching on the first region to be matched, the preliminary position of the background image region can be quickly determined. Then, by performing the second matching on the second region to be matched, it helps to accurately determine the position of the background image region, can make the edges of the defect clear, and further helps to improve the accuracy of the detection results by traditional methods. By setting the first region to be matched as the region after expanding the boundary of the defect region, it can help reduce the possibility of incomplete defect extraction. Further, by extending the first region to be matched upward and downward by the height of the first region to be matched once each, and extending it leftward and rightward by the width of the first region to be matched once each, the determination process of the first search region is efficient and convenient.

[0095] For the sake of convenience in explanation, the above description has been made in conjunction with specific embodiments. However, the above discussion in some embodiments is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. According to the above teachings, various modifications and variations can be obtained. The selection and description of the above embodiments are for better explaining the principles and actual applications, so that those skilled in the art can better use the embodiments and various different modified embodiments suitable for specific usage considerations.

[0096] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0097] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0098] The above embodiments only represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for defect extraction under a uniform texture background, characterized in that, The method includes: Obtaining a primary region containing defects in a first image, where the primary region is a first region to be matched; Performing boundary expansion on the first region to be matched to obtain a first search region; performing a first match based on the features of the first region to be matched and the first search region to identify a primary match region, where the primary match region is used to determine the preliminary position of the background image region in the first image; Based on the primary match region, selecting a second region to be matched; based on the first region to be matched, selecting a second search region, where the offset of the center of the second region to be matched relative to the center of the primary match region is the same as the offset of the center of the second search region relative to the center of the first region to be matched; performing a second match based on the features of the second search region and the second region to be matched to identify a secondary match region; Calculating the offset between the second region to be matched and the secondary match region, and moving the primary match region according to the offset, where the region where the primary match region is located after moving is the position of the background image region; Subtracting a second image containing the first region to be matched from a third image containing the background image region to determine a secondary difference image, and removing non-defect regions in the secondary difference image to obtain a target defect.

2. The defect extraction method under a uniform texture background according to claim 1, wherein The first region to be matched is a defect region after directly extracting defects or a region after expanding the boundary of the defect region.

3. The defect extraction method under a uniform texture background according to claim 1, wherein The first search region is an extended region obtained by extending the first region to be matched upward and downward by at least the height of the first region to be matched once each, and extending the first region to be matched leftward and rightward by at least the width of the first region to be matched once each.

4. The defect extraction method under a uniform texture background according to claim 3, characterized in that, The width of the second search region is greater than the width of the second region to be matched, the height of the second search region is greater than the height of the second region to be matched, and both the width and height of the second region to be matched are greater than or equal to 1 period, and both the width and height of the second search region are greater than or equal to 3 periods.

5. The defect extraction method under a uniform texture background according to any one of claims 1-4, characterized in that, Both the first match and the second match adopt a gray-scale matching method or a shape matching method.

6. A defect extraction system under a uniform texture background, characterized in that The system includes: a primary defect extraction module, a secondary defect extraction module, and a defect screening module, where the secondary defect extraction module includes a primary match sub-module, a secondary match sub-module, a background region acquisition sub-module, and a secondary processing sub-module; The primary defect extraction module is used to obtain a primary region containing defects in a first image, where the primary region is a first region to be matched; The primary match sub-module is used to perform boundary expansion on the first region to be matched to obtain a first search region; performing a first match based on the features of the first region to be matched and the first search region to identify a primary match region, where the primary match region is used to determine the preliminary position of the background image region in the first image; The secondary matching sub-module is configured to select a second region to be matched based on the primary matching region, and select a second search region based on the first region to be matched. The offset of the center of the second region to be matched relative to the center of the primary matching region is the same as the offset of the center of the second search region relative to the center of the first region to be matched. Perform a second matching according to the features of the second search region and the second region to be matched to identify the secondary matching region; The background region acquisition sub-module is configured to calculate the offset between the second region to be matched and the secondary matching region, and move the primary matching region according to the offset. The region where the primary matching region is located after movement is the position of the background image region; The secondary processing sub-module is configured to subtract the second image including the first region to be matched from the third image including the background image region to determine the secondary difference image; The defect screening module is configured to remove non-defect regions in the secondary difference image to obtain the target defect.

7. The defect extraction system under a uniform texture background according to claim 6, wherein, The first region to be matched is the defect region after directly extracting the defect or the region after expanding the boundary of the defect region.

8. The defect extraction system under a uniform texture background according to claim 6, characterized in that The first search region is the extended region obtained by extending the height of the first region to be matched at least once upward and downward and extending the width of the first region to be matched at least once leftward and rightward.

9. The defect extraction system under a uniform texture background according to claim 7, characterized in that The width of the second search region is greater than the width of the second region to be matched, the height of the second search region is greater than the height of the second region to be matched, and both the width and height of the second region to be matched are greater than or equal to 1 period, and both the width and height of the second search region are greater than or equal to 3 periods.

10. A defect extraction device under a uniform texture background, characterized in that, The device includes a memory and a processor. The memory is used to store a defect extraction program under a uniform texture background. The processor runs the defect extraction program under a uniform texture background so that the defect extraction system under a uniform texture background executes the defect extraction method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Wafer surface defect detection method based on Gabor features and random dimension reduction

    CN108171688A

  • Processing defect detection method and system for complex texture background of mobile phone shell

    CN114092474A