A method and system for detecting abnormal exposure and development defects
By cutting out the circuit area through template matching and combining it with image contrast enhancement through histogram equalization processing, the problem of high missed detection rate of abnormal exposure and development defects in the existing technology is solved, and more efficient and accurate detection results are achieved.
Patent Information
- Application Number
- CN202211211209.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-09-30
AI Technical Summary
The existing technology has a high missed detection rate for abnormal exposure and development defects, mainly because the characteristics of abnormal exposure and development defects are not obvious, making it difficult for deep learning target detection algorithms to effectively detect them.
Template matching is used to cut out circuit areas, and template matching based on edge contour extraction is suitable for scenes with variable image colors. Combined with image contrast enhancement using histogram equalization, this method effectively detects exposure and development defects.
It effectively reduces the missed detection rate of abnormal exposure and development defects and improves the accuracy and efficiency of detection.
Smart Images

Figure CN115564727B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of defect detection, and in particular to a method and system for detecting abnormal exposure and development defects. Background Art
[0002] The film-forming process is one of the most critical stages in panel manufacturing. It is where the circuit patterns and conductive components on the panel are formed. The entire film-forming process includes cleaning, photoresist coating, exposure, development, etching, and resist stripping. Uneven exposure and development often cause defects during the exposure and development stages. This leads to uneven film thickness, significantly impacting subsequent etching and circuit formation, and ultimately affecting product yield.
[0003] Traditionally, the detection of abnormal exposure and development defects relies on manual inspection, a process characterized by low efficiency and high cost. Currently, many panel manufacturers are introducing intelligent defect detection systems, using computers and artificial intelligence to replace manual inspection. The current mainstream approach utilizes deep learning-based target detection algorithms. These algorithms train a target detection model by learning from historical defect samples, ultimately enabling real-time defect detection for panels produced on the production line. However, deep learning-based target detection algorithms rely on feature extraction and classification learning from images. These algorithms require defects to have distinct features that clearly distinguish them from the background. However, exposure and development defects often lack sufficiently distinct features, resulting in a high rate of missed detections. Summary of the Invention
[0004] In order to solve the problem of high missed detection rate in exposure and development abnormality defect detection in the prior art, an embodiment of the present invention provides a method and system for exposure and development abnormality defect detection.
[0005] In a first aspect, an embodiment of the present invention provides a method for detecting abnormal exposure and development defects, the method comprising the following steps:
[0006] (1) Based on the original panel image, obtain the main line matching template T and the horizontal line matching template D;
[0007] (2) Based on the panel image to be detected, obtain several main line candidate frames I; wherein the width and height of the main line candidate frames I are the same as the width and height of the main line matching template T;
[0008] (3) Based on the main line matching template T, similarity matching is performed on several main line candidate frames I, and some main line candidate frames I are screened out;
[0009] (4) Based on the filtered main line candidate frame I, the panel image to be detected is subjected to image interception processing and image splicing processing to obtain the horizontal line image to be detected;
[0010] (5) Based on the horizontal line image to be detected, obtain several horizontal line candidate frames M, where the width and height of the horizontal line candidate frames M are the same as the width and height of the horizontal line matching template D;
[0011] (6) Perform similarity matching on several horizontal line candidate frames M based on the horizontal line matching template D, and select some horizontal line candidate frames M;
[0012] (7) Based on the screened horizontal line candidate frame M, the horizontal line image to be detected is subjected to image interception processing and image splicing processing to obtain the background image to be detected;
[0013] (8) Performing histogram equalization and grid division on the background image to be detected to obtain several grids;
[0014] (9) Calculate the grayscale mean of several grids, and determine whether there are abnormal exposure and development defects in the panel image to be inspected based on the grayscale mean.
[0015] In the above embodiment, the line area is cut out through template matching, and the template matching based on edge contour extraction can be applied to scenes where the image color is not fixed, and has strong applicability; at the same time, the image contrast enhancement combined with histogram equalization processing effectively realizes the detection of abnormal exposure and development defects, solving the problem of high missed detection rate of abnormal exposure and development defects in the existing method.
[0016] As some optional embodiments of the present application, the main line matching template T includes a main line matching template T1 and a main line matching template T2, and the width of the main line matching template T1 and the main line matching template T2 are both W1 and the height are both H1; the width of the horizontal line matching template D is W2 and the height is both H2.
[0017] As some optional implementations of the present application, the process of obtaining several main line candidate frames I based on the panel image to be detected is as follows:
[0018] (2.1) Perform edge contour extraction on the panel image to be detected and obtain the lower left corner pixel of the panel image to be detected;
[0019] (2.2) The lower left corner pixel of the panel image to be detected is used as the lower corner coordinate, and the lower left corner coordinate is used as the reference point to obtain a main line candidate box I with the same size as the main line matching template T1 and the main line matching template T2;
[0020] (2.3) Shift the main line candidate box I to the right / upward by one pixel in turn to obtain several main line candidate boxes I.
[0021] As some optional implementations of the present application, the process of performing similarity matching on several main line candidate frames I based on the main line matching template T is as follows:
[0022] (3.1) Calculate the similarity R1 between several main line candidate boxes I and the main line matching template T1 and the main line matching template T2 in sequence;
[0023] (3.2) If the similarity R1 is greater than the matching threshold G1, the corresponding main line candidate box I matches the main line matching template T1 or the main line matching template T2, where the matching threshold G1 is a preset value.
[0024] As some optional implementations of the present application, the process of obtaining several horizontal line candidate frames M based on the horizontal line image to be detected is as follows:
[0025] (5.1) Perform edge contour extraction on the horizontal line image to be detected, and obtain the lower left corner pixel point of the horizontal line image to be detected;
[0026] (5.2) Using the lower left corner pixel of the horizontal line image to be detected as the lower corner coordinate, and using the lower left corner coordinate as the reference point, obtain a horizontal line candidate box M with the same size as the horizontal line matching template D;
[0027] (5.3) Shift the horizontal line candidate boxes M to the right / upward by one pixel in turn to obtain several horizontal line candidate boxes M.
[0028] As some optional implementations of the present application, the process of performing similarity matching on the horizontal line candidate box M based on the horizontal line matching template D is as follows:
[0029] (6.1) Calculate the similarity R2 between several horizontal line candidate boxes M and the horizontal line matching template D in sequence;
[0030] (6.2) If the similarity R2 is greater than the matching threshold G2, the corresponding horizontal line candidate box M matches the horizontal line matching template D, where the matching threshold G2 is a preset value.
[0031] As some optional implementations of the present application, the process of performing histogram equalization processing on the background image to be detected is as follows:
[0032] (8.1) Arrange all grayscale values of the background image to be detected from small to large and calculate the cumulative probability of the grayscale values;
[0033] (8.2) Multiply the cumulative probability of each grayscale value by 255 to obtain the result after histogram equalization:
[0034] ;
[0035] Among them, k means there are k grayscale values, n j represents the cumulative number of the jth grayscale value, and n represents the sum of all grayscale values.
[0036] As some optional implementations of the present application, the process of gridding the background image to be detected is as follows:
[0037] (9.1) Divide the background image after histogram equalization into K*K grids, calculate the grayscale mean in each grid, and record the maximum grayscale mean among all grids as G max , the one with the smallest grayscale mean is recorded as G min , the grayscale mean value with the largest minus the smallest is recorded as G diff ;
[0038] (9.2) When G diff When it is greater than the threshold value G3, it is determined whether there is an exposure and development abnormality defect in the panel image to be detected, wherein the threshold value G3 is a preset value.
[0039] In a second aspect, the present invention provides a system for detecting abnormal exposure and development defects, the system comprising:
[0040] A matching template acquisition unit, wherein the matching template acquisition unit acquires a main line matching template T and a horizontal line matching template D based on the original panel image;
[0041] A main line candidate frame acquisition unit, wherein the main line candidate frame acquisition unit acquires a plurality of main line candidate frames I based on the panel image to be detected; wherein the width and height of the main line candidate frames I are the same as the width and height of the main line matching template T;
[0042] A main line similarity matching unit, which performs similarity matching on a number of main line candidate frames I based on a main line matching template T, and screens out some main line candidate frames I;
[0043] a line image generating unit, wherein the line image generating unit performs image interception processing and image splicing processing on the panel image to be detected based on the screened main line candidate frame I to obtain a horizontal line image to be detected;
[0044] a horizontal line candidate frame acquisition unit, wherein the horizontal line candidate frame acquisition unit acquires a plurality of horizontal line candidate frames M based on the horizontal line image to be detected, wherein the width and height of the horizontal line candidate frames M are the same as the width and height of the horizontal line matching template D;
[0045] a horizontal line similarity matching unit, wherein the horizontal line similarity matching unit performs similarity matching on a plurality of horizontal line candidate frames M based on a horizontal line matching template D, and screens out some horizontal line candidate frames M;
[0046] A background image generating unit, which performs image interception processing and image splicing processing on the horizontal line image to be detected based on the screened horizontal line candidate frame M to obtain a background image to be detected;
[0047] A background image processing unit, configured to perform histogram equalization and grid division processing on the background image to be detected to obtain a plurality of grids;
[0048] The exposure and development abnormality defect determination unit is used to calculate the grayscale average of several grids and determine whether there is an exposure and development abnormality defect in the panel image to be detected based on the grayscale average.
[0049] In a third aspect, the present invention provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for detecting abnormal exposure and development defects.
[0050] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for detecting abnormal exposure and development defects is implemented.
[0051] The beneficial effects of the present invention are as follows: The present invention addresses the problem that the characteristics of abnormal exposure and development defects in the panel industry are not obvious and are difficult to detect by deep learning target detection models. The line area is cut out through template matching, and the template matching based on edge contour extraction can be applicable to scenes where the color of the image is not fixed, and has strong applicability; at the same time, combined with the image contrast enhancement of histogram equalization, the detection of abnormal exposure and development defects is effectively realized, solving the problem of high missed detection rate of abnormal exposure and development defects in existing detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0053] Figure 1 1 is a step diagram of a method for detecting abnormal exposure and development defects according to some embodiments of the present invention.
[0054] Figure 2 is a schematic diagram of the main line matching template according to some embodiments of the present invention.
[0055] Figure 3 is a schematic diagram of a panel image to be detected according to some embodiments of the present invention.
[0056] Figure 4 3 is a schematic diagram of template matching of a main line area of a panel image to be detected according to some embodiments of the present invention.
[0057] Figure 5 is a schematic diagram of a horizontal line image to be detected according to some embodiments of the present invention.
[0058] Figure 6 is a schematic diagram of a background image to be detected according to some embodiments of the present invention.
[0059] Figure 7 3 is a comparison diagram of grayscale values before and after the histogram equalization process according to some embodiments of the present invention.
[0060] Figure 8 3 is a result diagram of the histogram equalization processing and grid division processing according to some embodiments of the present invention. DETAILED DESCRIPTION
[0061] In order to better understand the above technical solution, the technical solution of the present invention is described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations on the technical solution of the present invention. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.
[0062] It should also be understood that, in order to simplify the presentation of the present disclosure and thereby facilitate understanding of at least one embodiment of the invention, the foregoing description of the embodiments of the invention sometimes combines multiple features into a single embodiment, figure, or description thereof. However, this disclosure method does not imply that the subject matter of the invention requires more features than those recited in the claims. In fact, an embodiment may have fewer features than all of the features of a single disclosed embodiment. Example
[0063] The present invention provides a method for detecting abnormal exposure and development defects. Figure 1 , the method comprises the following steps:
[0064] (1) Based on the original panel image, the original panel image is converted from a color image to a grayscale image, and the main line matching template T and the horizontal line matching template D are obtained based on the grayscale image.
[0065] The main line matching template T includes a main line matching template T1 and a main line matching template T2. The width of the main line matching template T1 and the height of the main line matching template T2 are both W1 and H1. The width of the horizontal line matching template D is W2 and the height is H2.
[0066] Since the features of the abnormal exposure and development defect area are not obvious, which is also the reason why the existing target detection often misses detection, it is necessary to amplify the abnormal features of this part and reduce the influence of other backgrounds. First, there are many irregular and unevenly colored backgrounds in the main line area. Therefore, template matching is used to locate the main line coordinate position and cut out the main line area. However, due to the different colors of the panel image, it is easy to fail to match directly using the grayscale image for template matching. Therefore, edge contour extraction is used. The Canny algorithm is used to extract the edge contour in the panel image, and then the main line area is cut out as the main line matching template T. Since the main line has two different shapes, two templates T1 and T2 are formulated. Please refer to Figure 2 At the same time, the principle of obtaining the horizontal line matching template D is the same as that of obtaining the main line matching template T, and will not be repeated here.
[0067] (2) Based on the panel image to be detected, obtain several main line candidate frames I; the width and height of the main line candidate frame I are the same as the width and height of the main line matching template T, see Figure 3 .
[0068] In an embodiment of the present invention, the process of obtaining a plurality of main line candidate frames I based on the panel image to be detected is as follows:
[0069] (2.1) Perform edge contour extraction on the panel image to be detected and obtain the lower left corner pixel of the panel image to be detected;
[0070] (2.2) The lower left corner pixel of the panel image to be detected is used as the lower corner coordinate, and the lower left corner coordinate is used as the reference point to obtain a main line candidate box I with the same size as the main line matching template T1 and the main line matching template T2;
[0071] (2.3) Shift the main line candidate box I to the right / upward by one pixel in turn to obtain several main line candidate boxes I.
[0072] (3) Based on the main line matching template T, similarity matching is performed on several main line candidate frames I, and some main line candidate frames I are screened out.
[0073] In an embodiment of the present invention, the process of performing similarity matching on a plurality of main line candidate frames I based on the main line matching template T is as follows:
[0074] (3.1) Calculate the similarity R1 between several main line candidate boxes I and the main line matching template T1 and the main line matching template T2 in sequence;
[0075] (3.2) If the similarity R1 is greater than the matching threshold G1, the corresponding main line candidate box I matches the main line matching template T1 or the main line matching template T2, where the matching threshold G1 is a preset value.
[0076] In an embodiment of the present invention, for a panel image to be detected, first, the edge contour of the panel image to be detected is extracted in the same way as making the main line matching template T. The lower left corner of the image is used as the matching starting point (0,0), and the coordinates of the first main line candidate box I are [0,0,w,h]. Then, the next main line candidate box I is obtained by sliding one pixel to the right / upward. Assuming that the coordinates of the lower left corner are (x,y), the coordinates of each main line candidate box I are [x,y,x+w,y+h], recorded as I. Then, the similarity R1 between the main line candidate box I and the main line matching template T1 and the main line matching template T2 is calculated. The similarity R1 has a value range of 0 to 1, and the higher the matching degree, the closer R1 is to 1. Finally, by setting the matching threshold G1 and retaining the results where the similarity R1 is greater than the matching threshold G1, the coordinate position of the area where the main line area is located can be located on the panel image to be detected. Please refer to Figure 4 .
[0077] (4) Based on the filtered main line candidate frame I, the panel image to be detected is intercepted and the remaining intercepted images are spliced to obtain the horizontal line image to be detected. Figure 5 .
[0078] (5) Based on the horizontal line image to be detected, several horizontal line candidate frames M are obtained, wherein the width and height of the horizontal line candidate frames M are the same as the width and height of the horizontal line matching template D.
[0079] In an embodiment of the present invention, the process of obtaining a plurality of horizontal line candidate frames M based on the horizontal line image to be detected is as follows:
[0080] (5.1) Perform edge contour extraction on the horizontal line image to be detected, and obtain the lower left corner pixel point of the horizontal line image to be detected;
[0081] (5.2) Using the lower left corner pixel of the horizontal line image to be detected as the lower corner coordinate, and using the lower left corner coordinate as the reference point, obtain a horizontal line candidate box M with the same size as the horizontal line matching template D;
[0082] (5.3) Shift the horizontal line candidate boxes M to the right / upward by one pixel in turn to obtain several horizontal line candidate boxes M.
[0083] (6) Based on the horizontal line matching template D, similarity matching is performed on several horizontal line candidate frames M, and some horizontal line candidate frames M are screened out.
[0084] In an embodiment of the present invention, the process of performing similarity matching on the horizontal line candidate frame M based on the horizontal line matching template D is as follows:
[0085] (6.1) Calculate the similarity R2 between several horizontal line candidate boxes M and the horizontal line matching template D in sequence;
[0086] (6.2) If the similarity R2 is greater than the matching threshold G2, the corresponding horizontal line candidate box M matches the horizontal line matching template D, where the matching threshold G2 is a preset value.
[0087] (7) Based on the filtered horizontal line candidate frame M, the horizontal line image to be detected is intercepted and processed, and the remaining images are intercepted and stitched to obtain the background image to be detected. Figure 6 .
[0088] (8) Perform histogram equalization and grid division on the background image to be detected to obtain several grids, and calculate the grayscale mean of the several grids.
[0089] In an embodiment of the present invention, the process of performing histogram equalization processing on the background image to be detected is as follows:
[0090] (8.1) Arrange all grayscale values of the background image to be detected from small to large and calculate the cumulative probability of the grayscale values;
[0091] (8.2) Multiply the cumulative probability of each grayscale value by 255 to obtain the result after histogram equalization processing. Figure 7 、 Figure 8 :
[0092]
[0093] Among them, k means there are k grayscale values, n j represents the cumulative number of the jth grayscale value, and n represents the sum of all grayscale values.
[0094] (9) Determine whether there are abnormal exposure and development defects in the panel image to be inspected based on the grayscale mean.
[0095] In an embodiment of the present invention, the process of performing grid division processing on the background image to be detected is as follows:
[0096] (9.1) Divide the background image after histogram equalization into K*K grids, calculate the grayscale mean in each grid, and record the maximum grayscale mean among all grids as Gmax , the one with the smallest grayscale mean is recorded as G min , the grayscale mean value with the largest minus the smallest is recorded as G diff ;
[0097] (9.2) When G diff When it is greater than the threshold value G3, it is determined whether there is an exposure and development abnormality defect in the panel image to be detected, wherein the threshold value G3 is a preset value.
[0098] In summary, the embodiments of the present invention address the problem that the characteristics of abnormal exposure and development defects in the panel industry are not obvious and are difficult to detect by deep learning target detection models. The circuit area is cut out through template matching, and the template matching based on edge contour extraction can be applicable to scenarios where the color of the image is not fixed, and has strong applicability. At the same time, combined with the image contrast enhancement of histogram equalization, the detection of abnormal exposure and development defects is effectively realized, solving the problem of high missed detection rate of abnormal exposure and development defects in the existing detection. Example
[0099] The present invention provides a system for detecting abnormal exposure and development defects, the system comprising:
[0100] A matching template acquisition unit, wherein the matching template acquisition unit acquires a main line matching template T and a horizontal line matching template D based on the original panel image;
[0101] A main line candidate frame acquisition unit, wherein the main line candidate frame acquisition unit acquires a plurality of main line candidate frames I based on the panel image to be detected; wherein the width and height of the main line candidate frames I are the same as the width and height of the main line matching template T;
[0102] A main line similarity matching unit, which performs similarity matching on a number of main line candidate frames I based on a main line matching template T, and screens out some main line candidate frames I;
[0103] a line image generating unit, wherein the line image generating unit performs image interception processing and image splicing processing on the panel image to be detected based on the screened main line candidate frame I to obtain a horizontal line image to be detected;
[0104] a horizontal line candidate frame acquisition unit, wherein the horizontal line candidate frame acquisition unit acquires a plurality of horizontal line candidate frames M based on the horizontal line image to be detected, wherein the width and height of the horizontal line candidate frames M are the same as the width and height of the horizontal line matching template D;
[0105] a horizontal line similarity matching unit, wherein the horizontal line similarity matching unit performs similarity matching on a plurality of horizontal line candidate frames M based on a horizontal line matching template D, and screens out some horizontal line candidate frames M;
[0106] A background image generating unit, which performs image interception processing and image splicing processing on the horizontal line image to be detected based on the screened horizontal line candidate frame M to obtain a background image to be detected;
[0107] A background image processing unit, configured to perform histogram equalization and grid division processing on the background image to be detected to obtain a plurality of grids;
[0108] The exposure and development abnormality defect determination unit is used to calculate the grayscale average of several grids and determine whether there is an exposure and development abnormality defect in the panel image to be detected based on the grayscale average. Example
[0109] The present invention provides a computer device, which includes a memory and a processor. The memory stores a computer program, and when the processor runs the computer program, the method for detecting abnormal exposure and development defects described in Example 1 is executed.
[0110] The computer device provided in this embodiment can implement the method described in Example 1, and will not be described again here to avoid repetition. Example
[0111] The present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for detecting abnormal exposure and development defects described in Example 1 is implemented.
[0112] The computer-readable storage medium provided in this embodiment can implement the method described in Example 1, and will not be described again here to avoid repetition.
[0113] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0114] The memory can be used to store the computer programs and / or modules. The processor implements the various functions of the exposure and development abnormality defect detection system of the present invention by running or executing the data stored in the memory. The memory may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function or an image playback function). Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as a hard disk, internal memory, a plug-in hard disk, a smart memory card, a secure digital card, a flash memory card, at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0115] If the exposure and development abnormality defect detection system is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be stored in a computer-readable storage medium through a computer program. When the computer program is executed by the processor, it can implement the steps of the above-mentioned method embodiments. Among them, the computer program includes computer program code, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory, random access memory, point carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.
[0116] While the basic concepts of the present invention have been described, it will be apparent to those skilled in the art that the detailed disclosure provided above is merely illustrative and does not constitute a limitation of this specification. Although not explicitly stated herein, various modifications, improvements, and revisions to this specification may be made by those skilled in the art. Such modifications, improvements, and revisions are suggested in this specification and remain within the spirit and scope of the exemplary embodiments of this specification.
[0117] This specification also uses specific terms to describe the embodiments of this specification. For example, "one embodiment," "an embodiment," and / or "some embodiments" refer to a feature, structure, or characteristic associated with at least one embodiment of this specification. Therefore, it should be emphasized and noted that references to "one embodiment," "an embodiment," or "an alternative embodiment" two or more times in different locations in this specification do not necessarily refer to the same embodiment. Furthermore, certain features, structures, or characteristics of one or more embodiments of this specification may be appropriately combined.
[0118] In addition, it will be understood by those skilled in the art that various aspects of this specification may be illustrated and described by a number of patentable categories or situations, including any new and useful process, machine, product or combination of substances, or any new and useful improvements thereto. Accordingly, various aspects of this specification may be performed entirely by hardware, entirely by software (including firmware, resident software, microcode, etc.), or by a combination of hardware and software. The above hardware or software may be referred to as "data blocks", "modules", "engines", "units", "components" or "systems". In addition, various aspects of this specification may be represented as a computer product located in one or more computer-readable media, which includes computer-readable program code.
[0119] A computer storage medium may include a propagated data signal embodying the computer program code, for example, in baseband or as part of a carrier wave. The propagated signal may be in a variety of forms, including electromagnetic, optical, or any suitable combination thereof. A computer storage medium may be any computer-readable medium other than a computer-readable storage medium that can be connected to an instruction execution system, apparatus, or device to communicate, propagate, or transfer the program for use. The program code on the computer storage medium may be transmitted via any suitable medium, including radio, cable, fiber optic cable, RF, or similar media, or any combination of these.
Claims
1. A method for detecting abnormal exposure and development defects, characterized in that: The method comprises the following steps: (1) Based on the original panel image, obtain the main line matching template T and the horizontal line matching template D; (2) Based on the panel image to be detected, obtain several main line candidate frames I; wherein the width and height of the main line candidate frames I are the same as the width and height of the main line matching template T; (3) Based on the main line matching template T, similarity matching is performed on several main line candidate frames I, and some main line candidate frames I are screened out; (4) Based on the filtered main line candidate frame I, the panel image to be detected is subjected to image interception processing, and the remaining intercepted image is subjected to image splicing processing to obtain the horizontal line image to be detected; (5) Based on the horizontal line image to be detected, obtain several horizontal line candidate frames M, where the width and height of the horizontal line candidate frames M are the same as the width and height of the horizontal line matching template D; (6) Perform similarity matching on several horizontal line candidate frames M based on the horizontal line matching template D, and select some horizontal line candidate frames M; (7) Based on the filtered horizontal line candidate frame M, the horizontal line image to be detected is subjected to image interception processing, and the remaining intercepted image is subjected to image splicing processing to obtain the background image to be detected; (8) Performing histogram equalization and grid division on the background image to be detected to obtain several grids; (9) Calculate the grayscale mean of several grids, and determine whether there are abnormal exposure and development defects in the panel image to be inspected based on the grayscale mean.
2. The method for detecting abnormal exposure and development defects according to claim 1, wherein: The main line matching template T includes a main line matching template T1 and a main line matching template T2. The width of the main line matching template T1 and the height of the main line matching template T2 are both W1 and H1. The width of the horizontal line matching template D is W2 and the height is H2.
3. The method for detecting abnormal exposure and development defects according to claim 2, wherein: Based on the panel image to be detected, the process of obtaining several main line candidate frames I is as follows: (2.1) Perform edge contour extraction on the panel image to be detected and obtain the lower left corner pixel of the panel image to be detected; (2.2) Take the lower left corner pixel of the panel image to be detected as the lower corner coordinate, and use the lower left corner coordinate as the reference point to obtain a main line candidate box I with a width of W1 and a height of H1; (2.3) Shift the main line candidate box I to the right / upward by one pixel in turn to obtain several main line candidate boxes I.
4. The method for detecting abnormal exposure and development defects according to claim 3, wherein: The process of similarity matching of several main line candidate frames I based on the main line matching template T is as follows: (3.1) Calculate the similarity R1 between several main line candidate boxes I and the main line matching template T1 and the main line matching template T2 in sequence; (3.2) If the similarity R1 is greater than the matching threshold G1, the corresponding main line candidate box I matches the main line matching template T1 or the main line matching template T2. The matching threshold G1 is a preset value.
5. The method for detecting abnormal exposure and development defects according to claim 2, wherein: The process of obtaining several horizontal line candidate frames M based on the horizontal line image to be detected is as follows: (5.1) Perform edge contour extraction on the horizontal line image to be detected, and obtain the lower left corner pixel point of the horizontal line image to be detected; (5.2) Take the lower left corner pixel of the horizontal line image to be detected as the lower corner coordinate, and use the lower left corner coordinate as the reference point to obtain a horizontal line candidate box M with a width of W2 and a height of H2; (5.3) Shift the horizontal line candidate boxes M to the right / upward by one pixel in turn to obtain several horizontal line candidate boxes M.
6. The method for detecting abnormal exposure and development defects according to claim 5, wherein: The process of similarity matching of the horizontal line candidate box M based on the horizontal line matching template D is as follows: (6.1) Calculate the similarity R2 between several horizontal line candidate boxes M and the horizontal line matching template D in sequence; (6.2) If the similarity R2 is greater than the matching threshold G2, the corresponding horizontal line candidate box M matches the horizontal line matching template D, where the matching threshold G2 is a preset value.
7. The method for detecting abnormal exposure and development defects according to claim 1, wherein: The process of performing histogram equalization on the background image to be detected is as follows: (8.1) Arrange all grayscale values of the background image to be detected from small to large, and calculate the cumulative probability of each grayscale value; (8.2) Multiply the cumulative probability of each grayscale value by 255 to obtain the result G after histogram equalization processing K : ; Among them, k means there are k grayscale values, n j represents the cumulative number of the jth grayscale value, and n represents the sum of all grayscale values.
8. The method for detecting abnormal exposure and development defects according to claim 7, wherein: The process of gridding the background image to be detected is as follows: (9.1) Divide the background image after histogram equalization into K*K grids, calculate the grayscale mean in each grid, and record the maximum grayscale mean among all grids as G max , the one with the smallest grayscale mean is recorded as G min , the grayscale mean value with the largest minus the smallest is recorded as G diff ; (9.2) When G diff When it is greater than the threshold value G3, it is determined whether there is an exposure and development abnormality defect in the panel image to be detected, wherein the threshold value G3 is a preset value.
9. A system for detecting abnormal exposure and development defects, characterized in that: The system comprises: A matching template acquisition unit, wherein the matching template acquisition unit acquires a main line matching template T and a horizontal line matching template D based on the original panel image; A main line candidate frame acquisition unit, wherein the main line candidate frame acquisition unit acquires a plurality of main line candidate frames I based on the panel image to be detected; wherein the width and height of the main line candidate frames I are the same as the width and height of the main line matching template T; A main line similarity matching unit, which performs similarity matching on a number of main line candidate frames I based on a main line matching template T, and screens out some main line candidate frames I; a line image generating unit, wherein the line image generating unit performs image interception processing on the panel image to be detected based on the screened part of the main line candidate frame I, and performs image splicing processing on the intercepted remaining image to obtain a horizontal line image to be detected; a horizontal line candidate frame acquisition unit, wherein the horizontal line candidate frame acquisition unit acquires a plurality of horizontal line candidate frames M based on the horizontal line image to be detected, wherein the width and height of the horizontal line candidate frames M are the same as the width and height of the horizontal line matching template D; a horizontal line similarity matching unit, wherein the horizontal line similarity matching unit performs similarity matching on a plurality of horizontal line candidate frames M based on a horizontal line matching template D, and screens out some horizontal line candidate frames M; A background image generating unit, which performs image interception processing and image splicing processing on the horizontal line image to be detected based on the screened horizontal line candidate frame M to obtain a background image to be detected; A background image processing unit, wherein the background image generating unit performs image interception processing on the horizontal line image to be detected based on the screened part of the horizontal line candidate frame M, and performs image splicing processing on the intercepted remaining image to obtain the background image to be detected; The exposure and development abnormality defect determination unit is used to calculate the grayscale average of several grids and determine whether there is an exposure and development abnormality defect in the panel image to be detected based on the grayscale average.
10. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for detecting abnormal exposure and development defects as described in any one of claims 1 to 8 is implemented.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for detecting abnormal exposure and development defects according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Defect positioning method, system and equipment based on template matching and medium
CN115063618A
Flexible package printing quality defect detection method
CN115078365A