CN115661157A - Panel circle defect detection method, device, medium, equipment and program product - Google Patents

Panel circle defect detection method, device, medium, equipment and program product Download PDF

Info

Publication number
CN115661157A
CN115661157A CN202211691304.8A CN202211691304A CN115661157A CN 115661157 A CN115661157 A CN 115661157A CN 202211691304 A CN202211691304 A CN 202211691304A CN 115661157 A CN115661157 A CN 115661157A
Authority
CN
China
Prior art keywords
defect
image
contour
circle
outline
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211691304.8A
Other languages
Chinese (zh)
Other versions
CN115661157B (en
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Shuzhilian Technology Co Ltd
Original Assignee
Chengdu Shuzhilian Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Shuzhilian Technology Co Ltd filed Critical Chengdu Shuzhilian Technology Co Ltd
Priority to CN202211691304.8A priority Critical patent/CN115661157B/en
Publication of CN115661157A publication Critical patent/CN115661157A/en
Application granted granted Critical
Publication of CN115661157B publication Critical patent/CN115661157B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the application discloses a panel circle defect detection method, a device, a medium, equipment and a program product, which relate to the technical field of artificial intelligence and comprise the following steps: cutting according to the position information of the defect on the image to be detected to obtain a cut image; extracting the outline of the defect on the cut image to obtain a defect outline image; and fitting the defect contour image by adopting an ellipse fitting operator to obtain the standard degree of the contour of the defect relative to the perfect circle. This application is through tailorring the image, avoid irrelevant regional influence, let the defect enlarged, the shape of defect, the profile is more definite, make the form identification to the defect can be more accurate, let the detection ability of defect promote, promote detection effect, and then adopt ellipse fitting operator to fit, obtain the standard degree of the relative perfect circle of profile of defect after the fitting, quantify the degree of the circle of defect, can be accurate, whether high efficiency is known the defect and can be divided into the circle class according to the standard degree, promote the detection quality to the circle class defect.

Description

Panel circle defect detection method, device, medium, equipment and program product
Technical Field
The application relates to the technical field of artificial intelligence, in particular to a panel circle defect detection method, a device, a medium, equipment and a program product.
Background
Various defects are generated due to factors such as process fluctuation, machine station difference and the like in the manufacturing process of the industrial panel, and a detection department can detect the defects by adopting manpower or a detection model so as to analyze the generation reasons of the defects. Because each department works relatively independently, for some defects with specific forms, such as some round defects in the manufacturing process of the array panel, if the detection department can accurately detect the types, the process analysis department can quickly judge which procedure has problems or which equipment has problems in the manufacturing process according to the defects, so that the efficiency of process optimization analysis is improved. However, the existing manual detection method obviously cannot meet the requirement of high-precision batch manufacturing, and the detection model of the artificial intelligence mainstream is originally similar to the circular defects and the elliptical defects in the specific defect types, especially the circular defects, and in addition, the defects generally exist in a very small manner, so that the existing detection method has poor detection effect, low detection capability and low detection quality under the condition of high defect confusion.
Disclosure of Invention
The present application mainly aims to provide a panel circular defect detection method, device, medium, device and program product, and aims to solve the problem of low detection quality of circular defects on an industrial panel in the prior art.
In order to achieve the above purpose, the embodiments of the present application adopt the following technical solutions:
in a first aspect, an embodiment of the present application provides a method for detecting a circular defect of a panel, including the following steps:
cutting according to the position information of the defect on the image to be detected to obtain a cut image;
extracting the outline of the defect on the cut image to obtain a defect outline image;
and fitting the defect contour image by adopting an ellipse fitting operator to obtain the standard degree of the contour of the defect relative to the perfect circle.
The image to be detected is cut, the detected object is localized, detection in other unrelated areas is avoided, defects on the cut image occupy most of areas, the phase-change defects are amplified, the shape and the contour of the defects are more definite, the shape identification of the defects can be more accurate, the detection capability of the defects is improved, the contour condition of the defects can be efficiently extracted from the cut image, the detection effect is improved, and then an ellipse fitting operator is adopted for fitting.
In a possible implementation manner of the first aspect, the panel circle-like defect detecting method performs cropping according to position information of a defect on an image to be detected, and after obtaining the cropped image, further includes:
carrying out binarization processing on the cutting image to obtain a binarization cutting image;
extracting the outline of the defect on the cutting image to obtain a defect outline image, comprising the following steps:
and extracting the outline of the defect on the binary cutting image to obtain a defect outline image.
The binarization processing of the image, namely setting the gray value of the pixel point on the image to be 0 or 255, namely presenting the whole image with an obvious visual effect only including black and white, reducing the data dimension after converting the cut image into the binarization image, and eliminating the interference caused by noise in the image, so that the contour structure of an effective area can be highlighted, and the subsequent extraction of the defects is facilitated.
In a possible implementation manner of the first aspect, after performing binarization processing on the clipped image to obtain a binarized clipped image, the method for detecting a panel circle defect further includes:
carrying out image denoising on the binary cutting image to obtain a denoised image;
extracting the outline of the defect on the binary cutting image to obtain a defect outline image, wherein the defect outline image comprises the following steps:
and extracting the outline of the defect on the de-noised image to obtain a defect outline image.
In the digitization and transmission processes of digital images, the digital images are often affected by noise interference of imaging equipment and external environment, and are called noisy images or noisy images, image denoising is a process of reducing noise in the digital images, and although a part of interference can be removed through binarization operation, the main purpose of the image denoising is to reduce data dimension and facilitate image processing, so that image denoising processing is required in the embodiment to further reduce noise interference on the images.
In a possible implementation manner of the first aspect, performing image denoising on the binarized cropped image to obtain a denoised image includes:
carrying out corrosion operation on the binary cutting image to enable the corrosion of the black area to be enlarged, and obtaining a corrosion image;
and performing expansion operation on the erosion image to expand and enlarge the white area to obtain a de-noised image.
The image is subjected to morphological operation opening operation, namely, the image is corroded on the basis of the binary image, so that white points in a black area are removed, and then the image is expanded, so that black points in a white area are removed, and the denoising aim is achieved.
In a possible implementation manner of the first aspect, extracting a defect contour on the cropped image to obtain a defect contour image includes:
acquiring defect area information according to the coverage area of the defect on the cut image;
extracting edge outline information of the defect according to the defect area information;
and acquiring a defect contour image according to the edge contour information of the defect.
In order to extract the outline of the defect, the area covered by the defect is extracted on the cutting image, and then the defect is marked by adopting a coloring rendering method in order to highlight the defect, so that the interference of a non-defect area on the image is avoided.
In one possible implementation manner of the first aspect, fitting the defect contour image with an ellipse fitting operator to obtain a standard degree of the contour of the defect relative to a perfect circle includes:
fitting the defect contour image by adopting an ellipse fitting operator to obtain a fitting ellipse of the contour of the defect;
and obtaining the standard degree of the outline of the defect relative to the perfect circle according to the width information and the height information of the fitting ellipse.
In the case where the major axis and the minor axis of the ellipse are equal, a special ellipse is formed, that is, a perfect circle, that is, the relative ratio of width to height in this embodiment, appears as if the perfect circle is stretched in the width direction or the height direction. The width is recorded as w, the height is recorded as h, and a quantitative result is obtained by adopting the formula ratio =1-abs (w-h)/min _ value, so that clear indexes are facilitated.
In a possible implementation manner of the first aspect, after fitting the defect contour image with an ellipse fitting operator to obtain a standard degree of the contour of the defect relative to a perfect circle, the panel circle-like defect detection method further includes:
obtaining a judgment result according to the judgment value and the standard degree of the outline of the defect relative to the perfect circle; wherein, the judgment result comprises a circle and a non-circle.
The judgment value is a numerical value which is set in advance, the value is between 0 and 1, namely a standard is set, the degree of the judged standard exceeds the numerical value, namely, slight differences of the shape defects can be ignored and are considered to be circular, and the fuzzy classification concept of whether the shape defects are circular or not is converted into visual data information, so that the target defects can be obtained through accurate and efficient classification.
In a possible implementation manner of the first aspect, after obtaining the determination result according to the determination value and a standard degree of the outline of the defect with respect to the perfect circle, the method for detecting a circular defect of a panel further includes:
inputting the defect outline image corresponding to the non-circle judgment result into a defect detection model to obtain a detection result; the defect detection model is obtained based on a plurality of target images and non-target images through training, the target images are images with circular defects, and the non-target images are obtained through training images with non-circular defects.
In order to avoid the false detection condition as much as possible, the image which is preliminarily regarded as the non-circle in the previous step is input into the defect detection model for secondary classification judgment, and the training data of the defect detection model is derived from the image with the circle and the non-circle defects, so that the model learns the defect information of the circle and the non-circle, the model is utilized to perform screening classification again, the situations of false detection, missed detection and the like are avoided, and the accuracy of defect classification is improved.
In a possible implementation manner of the first aspect, before inputting the defect contour image corresponding to the non-circle as the determination result into the defect detection model and obtaining the detection result, the method for detecting a circular defect of a panel further includes:
obtaining a plurality of target images and a plurality of non-target images;
adding an attention mechanism in the existing neural network so that the neural network can capture the weight information of each channel, and training to obtain a classification neural network;
and training to obtain a defect detection model based on the classification neural network, the target image and the non-target image.
The method has the advantages that the model is trained in advance so as to be used repeatedly, the defect classification and identification efficiency is improved, in order to enable the neural network used for training the model to better capture the weight information of each channel, an SE (selective element) is added in the network, namely an attention mechanism, the model becomes more complex when the input information is too much, the neural network has the capability of focusing attention on a part of input or characteristics by introducing attention, the amount of processed information can be reduced, and therefore required computing resources are reduced.
In a possible implementation manner of the first aspect, after obtaining a plurality of target images and a plurality of non-target images, the panel circle-like defect detection method further includes:
scaling the size of the target image and the non-target image to obtain the target image and the non-target image with the same size;
training to obtain a defect detection model based on the classification neural network, the target image and the non-target image, wherein the training comprises the following steps:
and training to obtain a defect detection model based on the classification neural network and the target image and the non-target image with the same size.
In order to make the convergence rate of model training faster and the quality of model training higher, sample data for training is subjected to size scaling, so that the effect of model training is not affected by the inconsistency of the image sizes of the samples, the focus of model training is placed on image features, and resources are hardly consumed on the image sizes.
In a second aspect, an embodiment of the present application provides a panel circle defect detection apparatus, including:
the cutting module is used for cutting according to the position information of the defect on the image to be detected to obtain a cut image;
the extraction module is used for extracting the outline of the defect on the cutting image to obtain a defect outline image;
and the fitting module is used for fitting the defect contour image by adopting an ellipse fitting operator to obtain the standard degree of the contour of the defect relative to a perfect circle.
In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is loaded and executed by a processor, the method for detecting a panel circular defect as provided in any one of the above first aspects is implemented.
In a fourth aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein,
the memory is used for storing a computer program;
the processor is used for loading and executing a computer program to enable the electronic device to execute the panel circle defect detection method provided by any one of the first aspect.
In a fifth aspect, the present application provides a computer program product, which includes a computer program and is configured to execute the panel circular defect detecting method provided in any one of the above first aspects when the computer program is executed.
Compared with the prior art, the beneficial effects of this application are:
according to the method, the device, the medium, the equipment and the program product for detecting the circular defects of the panel, the method cuts according to the position information of the defects on the image to be detected to obtain a cut image; extracting the outline of the defect on the cut image to obtain a defect outline image; and fitting the defect contour image by adopting an ellipse fitting operator to obtain the standard degree of the contour of the defect relative to a perfect circle. According to the method, the image to be detected is cut, the detected object is localized, detection in other unrelated areas is avoided, defects on the cut image occupy most of areas, the phase-change defects are enlarged, the shapes and the outlines of the defects are more definite, the shape identification of the defects can be more accurate, the detection capability of the defects is improved, the outline condition of the defects can be efficiently extracted from the cut image, the detection effect is improved, and fitting is performed by adopting an ellipse fitting operator.
Drawings
Fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for detecting a circular defect of a panel according to an embodiment of the present disclosure;
FIG. 3 is a schematic block diagram of a panel circle defect detection apparatus according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a typical to-be-detected image with a non-circular defect in a panel circular defect detection method provided in an embodiment of the present application;
FIG. 5 is a schematic diagram of an exemplary circular defect detection method for a panel according to an embodiment of the present disclosure;
FIG. 6 is a schematic illustration of cropping over the image shown in FIG. 4;
FIG. 7 is a schematic illustration of cropping over the image shown in FIG. 5;
fig. 8 is a schematic diagram illustrating an opening operation performed in the panel circular defect detection method according to the embodiment of the present application;
FIG. 9 is a schematic diagram illustrating a method for detecting a circular defect of a panel according to an embodiment of the present disclosure;
FIG. 10 is a schematic illustration of an exemplary non-target image;
FIG. 11 is a schematic illustration of another exemplary non-target image;
FIG. 12 is a schematic illustration of an exemplary target image;
FIG. 13 is a schematic illustration of another exemplary target image;
the mark in the figure is: 101-processor, 102-communication bus, 103-network interface, 104-user interface, 105-memory.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The main solution of the embodiment of the application is as follows: a method, apparatus, medium, device and program product for detecting circular defects of a panel are provided, the method comprising: cutting according to the position information of the defect on the image to be detected to obtain a cut image; extracting the outline of the defect on the cutting image to obtain a defect outline image; and fitting the defect contour image by adopting an ellipse fitting operator to obtain the standard degree of the contour of the defect relative to the perfect circle.
Various defects are generated due to factors such as process fluctuation, machine table difference and the like in the manufacturing process of the industrial panel, a large amount of manpower is used for carrying out naked eye classification on the defect types, and then a process department analyzes the generation reason of the defects. In the 2.0 era of industry, more and more electronic manufacturers are beginning to use artificial intelligence ADC (automatic defect classification system) to replace manpower for defect localization and classification, and some specific defect categories generated in the manufacturing process of array panels by the current mainstream target detection model of artificial intelligence are not well classified.
For a specific defect type, if the detection department can accurately detect the type, the process analysis department can quickly judge which procedure has a problem or which equipment has a problem in the manufacturing process according to the defect, such as linear a-Si residue, and the main reason is that linear foreign matters drop before I-DE etching or linear foreign matters drop in the I-DE equipment; the dish-shaped a-Si residue is mainly caused by the fact that metal ion foreign matters fall on the surface of the substrate before I-DE etching; the main cause of the circular residue, the shadow, etc. may be the falling of the PI-PR foreign matter, the falling of the PR foreign matter, or the falling of the foreign matter before film formation. When judging the specific defect type, especially the circular defect, the circular defect is similar to the elliptical defect in shape, and the defect is generally very tiny, so that the defect is difficult to be effectively distinguished under the condition of high confusion.
Therefore, the method and the device provide a solution, an image to be detected is cut, a detected object is localized, detection in other irrelevant areas is avoided, defects on the cut image occupy most areas, the phase-change defects are amplified, the shapes and the outlines of the defects are more definite, the shape identification of the defects can be more accurate, the detection capacity of the defects is improved, the outline conditions of the defects can be effectively extracted from the cut image, the detection effect is improved, an ellipse fitting operator is further adopted for fitting, the standard degree of the outlines of the defects relative to a perfect circle is obtained after fitting, the degree of the circle of the defects is quantized, whether the defects can be divided into the circle defects or not can be accurately and efficiently obtained according to the standard degree, and the detection quality of the circle defects is improved.
Referring to fig. 1, fig. 1 is a schematic structural diagram of an electronic device in a hardware operating environment according to an embodiment of the present application, where the electronic device may include: a processor 101, such as a Central Processing Unit (CPU), a communication bus 102, a user interface 104, a network interface 103, and a memory 105. Wherein the communication bus 102 is used for enabling connection communication between these components. The user interface 104 may comprise a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 104 may also comprise a standard wired interface, a wireless interface. The network interface 103 may optionally include a standard wired interface, a WIreless interface (e.g., a WIreless-FIdelity (WI-FI) interface). The Memory 105 may be a storage device independent of the processor 101, and the Memory 105 may be a high-speed Random Access Memory (RAM) Memory, or a Non-Volatile Memory (NVM), such as at least one disk Memory; the processor 101 may be a general-purpose processor including a central processing unit, a network processor, etc., and may also be a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
Those skilled in the art will appreciate that the configuration shown in fig. 1 does not constitute a limitation of the electronic device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 1, the memory 105, which is a storage medium, may include therein an operating system, a data storage module, a network communication module, a user interface module, and an electronic program.
In the electronic device shown in fig. 1, the network interface 103 is mainly used for data communication with a network server; the user interface 104 is mainly used for data interaction with a user; the processor 101 and the memory 105 in the present application may be disposed in an electronic device, and the electronic device calls the panel circular defect detecting apparatus stored in the memory 105 through the processor 101 and executes the panel circular defect detecting method provided in the embodiment of the present application.
Referring to fig. 2, based on the hardware device of the foregoing embodiment, an embodiment of the present application provides a panel circle defect detection method, including the following steps:
s10: and cutting according to the position information of the defect on the image to be detected to obtain a cut image.
In the specific implementation process, the image to be detected is a PCB image with defects, as shown in the attached drawings 4 and 5, the bbox coordinate is obtained through neural network positioning, the position of the defect can be further positioned to find out the defect, and then cutting is carried out after the defect is found out, the purpose of cutting is to extract the area where the defect is located, and the defect image is amplified in a phase-change manner, so that the details of the defect are more clear, and whether the defect is sufficiently round or not can be analyzed subsequently. For convenience of clipping, the clipped outline is usually set to be a rectangular frame, as shown in fig. 6 and fig. 7, the rectangular frame is the smallest rectangle capable of completely covering the area where the defect is located, that is, the side edges of the rectangular frame are tangent to the outline of the defect, but because the outline of the defect is to be extracted, the rectangular frame is partially enlarged on the basis of tangency, and a part of the rectangular frame is left on all four edges as a space for extraction operation. Certainly, under the condition that the precision requirement is not high, the rectangular frame can be automatically drawn to cut the image in a manual cutting mode.
S20: and extracting the outline of the defect on the cutting image to obtain a defect outline image.
In a specific implementation process, the outline of the defect is extracted, that is, the shape of the defect on the image is highlighted, the outline is regarded as a curve formed by continuous points by using an image outline searching function of OpenCV, and points on the outline are extracted as many as possible, as shown in fig. 9, the image is obtained after the outline of the defect is extracted. Specifically, the method comprises the following steps:
s201: acquiring defect area information according to the coverage area of the defect on the cutting image;
s202: extracting edge outline information of the defect according to the defect area information;
s203: and acquiring a defect contour image according to the edge contour information of the defect.
In the specific implementation process, in order to extract the outline of the defect, the area covered by the defect is extracted on the cut image, and after the extraction, in order to highlight the defect, the defect can be marked by adopting a coloring and rendering method, so that the interference of a non-defect area on the image is avoided, the outline of the defect, namely the shape of the defect, can be accurately obtained by extracting the edge outline of the area, and then the edge outline information is returned to the original cut image, so that the accurate and definite defect outline image with the defect outline as shown in fig. 9 is obtained.
S30: and fitting the defect contour image by adopting an ellipse fitting operator to obtain the standard degree of the contour of the defect relative to a perfect circle.
In the specific implementation process, the basic idea of ellipse fitting is as follows: for a set of sample points on a given plane, an ellipse is found that is as close as possible to the sample points. That is, a set of data in an image is fitted by taking an elliptical equation as a model, so that a certain elliptical equation meets the data as much as possible, various parameters of the elliptical equation are solved, and the center of the finally determined optimal ellipse is the target center to be determined by searching. According to the common knowledge, a circle is used as a special ellipse, and the deviation of the finally fitted ellipse parameter relative to the perfect circle parameter can obtain the fitted ellipse, namely the standard degree of the defect outline relative to the perfect circle. Specifically, the method comprises the following steps:
fitting the defect contour image by adopting an ellipse fitting operator to obtain the standard degree of the contour of the defect relative to a perfect circle, wherein the standard degree comprises the following steps:
fitting the defect contour image by adopting an ellipse fitting operator to obtain a fitting ellipse of the contour of the defect;
and obtaining the standard degree of the outline of the defect relative to the perfect circle according to the width information and the height information of the fitted ellipse.
In the implementation process, under the condition that the major axis and the minor axis of the ellipse are equal, a special ellipse is formed, namely a perfect circle, namely the relative proportion of the width and the height in the embodiment is expressed that the perfect circle is stretched in the width direction or the height direction. The width is recorded as w, the height is recorded as h, and a quantitative result is obtained by adopting the formula ratio =1-abs (w-h)/min _ value calculation, which is favorable for determining indexes; wherein ratio represents the standard degree, min _ value = min (w, h) represents the minimum value between w and h, and since the stretching direction is relative, the absolute value of the difference between the width and the height is obtained by using abs algorithm, and since the width and the height of the circle are equal, abs (w-h)/min _ value is zero, 1 represents the standard degree of the perfect circle, and finally the deviation is subtracted by 1 to obtain the final standard degree of the ellipse relative to the circle.
S40: obtaining a judgment result according to the judgment value and the standard degree of the outline of the defect relative to the perfect circle; wherein, the judgment result comprises a circle and a non-circle.
In the practical implementation process, the judgment value is a value set in advance, a standard is set between 0 and 1, the degree of the judged standard exceeds the value, namely, some slight differences of the shape defects can be ignored, the shape defects are considered to be circular, and the fuzzy classification concept of whether the shape defects are circular is converted into visual data information, so that the target defects can be obtained through accurate and efficient classification conveniently.
S50: inputting the defect outline image corresponding to the non-circle judgment result into a defect detection model to obtain a detection result; the defect detection model is obtained based on training of a plurality of target images and non-target images, the target images are images with circular defects, and the non-target images are obtained by training of images with non-circular defects.
In a specific implementation process, in order to avoid false detection as much as possible, the image preliminarily determined as non-circular in the foregoing steps is input into the defect detection model for classification determination again, and since the training data of the defect detection model is derived from the images with the defects of circular and non-circular, the model learns the defect information of circular and non-circular, as shown in fig. 10 and 11, the two typical non-target images, that is, the images with the defects of non-circular, are shown in fig. 12 and 13, and are two typical target images, that is, the images with the defects of circular, so that the model is used for screening and classification again, thereby avoiding the occurrence of false detection, false detection and the like, and improving the accuracy of defect classification.
In the embodiment, the image to be detected is cut, the detected object is localized, detection in other unrelated areas is avoided, the defects on the cut image occupy most of the area, the phase-change defects are amplified, the shape and the contour of the defects are more definite, the shape identification of the defects can be more accurate, the detection capability of the defects is improved, the contour condition of the defects can be efficiently extracted from the cut image, the detection effect is improved, and then an ellipse fitting operator is adopted for fitting.
In an embodiment, after performing cropping according to the position information of the defect on the image to be detected and obtaining the cropped image, the method for detecting the panel circular defect further includes:
and carrying out binarization processing on the cutting image to obtain a binarization cutting image.
In the specific implementation process, the binarization processing of the image is carried out, namely the gray value of a pixel point on the image is set to be 0 or 255, namely the whole image is obviously provided with a black and white visual effect, the cut image is firstly converted into the binarization image, the data dimensionality is reduced, the interference caused by noise in the image is eliminated, the outline structure of an effective area can be highlighted, and the subsequent extraction of defects is facilitated.
Based on the operation of carrying out binarization processing on the cutting image in the previous steps, extracting the outline of the defect on the cutting image to obtain a defect outline image, wherein the method comprises the following steps of:
and extracting the outline of the defect on the binary cutting image to obtain a defect outline image.
In an embodiment, after the binarizing processing is performed on the cropped image to obtain a binarized cropped image, the method for detecting the panel circle defects further includes:
and denoising the image of the binary cutting image to obtain a denoised image.
In the specific implementation process, a digital image is often affected by noise interference between an imaging device and an external environment in the digitization and transmission processes, which is called a noisy image or a noise image, and image denoising is a process for reducing noise in the digital image, and although a binarization operation can remove a part of interference, the main purpose of the image denoising is to reduce data dimension and facilitate image processing, therefore, in this embodiment, image denoising processing is also required to reduce noise interference on the image, for example, the following steps are adopted: mean filtering, median filtering, morphological noise filtering, wavelet denoising and other denoising means.
Based on the denoising operation of the previous step, extracting the outline of the defect on the binary cutting image to obtain a defect outline image, which comprises the following steps:
and extracting the defect outline on the de-noised image to obtain a defect outline image.
In one embodiment, the image denoising of the binary clipping image to obtain a denoised image includes:
carrying out corrosion operation on the binary cutting image to enable the corrosion of the black area to be enlarged, and obtaining a corrosion image;
and performing expansion operation on the erosion image to expand and enlarge the white area to obtain a de-noised image.
In a specific implementation process, a denoising means is provided, as shown in fig. 8, an opening operation of morphological operation is performed on an image, that is, on the basis of a binarized image, the image is first corroded, so that white dots in a black area are removed, and then the image is expanded, so that black dots in a white area are removed, and thus the purpose of denoising is achieved, and the denoising method is simple in algorithm and high in execution efficiency.
In an embodiment, before inputting the defect contour image corresponding to the non-circle as the determination result into the defect detection model and obtaining the detection result, the method for detecting the circular defect of the panel further includes:
obtaining a plurality of target images and a plurality of non-target images;
adding an attention mechanism in the existing neural network so that the neural network can capture the weight information of each channel, and training to obtain a classification neural network;
and training to obtain a defect detection model based on the classification neural network, the target image and the non-target image.
In the specific implementation process, the model is trained in advance so as to be used repeatedly, the efficiency of defect classification and identification is improved, in order to enable the neural network used for training the model to better capture the weight information of each channel, an SE (selective element) is added in the network, namely an attention mechanism.
In one embodiment, after obtaining the target images and the non-target images, the method for detecting the circular defects of the panel further comprises:
and scaling the sizes of the target image and the non-target image to obtain the target image and the non-target image with the same size.
In the specific implementation process, in order to make the convergence speed of model training faster and the quality of model training higher, the sample data for training is subjected to size scaling, so that the effect of model training is not affected by the inconsistent image sizes of the samples, and the focus of model training is put on image features, and resources are hardly consumed on the image sizes.
Based on the operation of scaling the image size and based on the classification neural network, the target image and the non-target image, training and obtaining a defect detection model, comprising the following steps:
and training to obtain a defect detection model based on the classification neural network and the target image and the non-target image with the same size.
Referring to fig. 3, based on the same inventive concept as the previous embodiment, the embodiment of the present application further provides a panel circle defect detecting apparatus, which includes:
the cutting module is used for cutting according to the position information of the defect on the image to be detected to obtain a cut image;
the extraction module is used for extracting the outline of the defect on the cutting image to obtain a defect outline image;
and the fitting module is used for fitting the defect contour image by adopting an ellipse fitting operator to obtain the standard degree of the contour of the defect relative to a perfect circle.
It should be understood by those skilled in the art that the division of each module in the embodiment is only a division of a logic function, and all or part of the division may be integrated onto one or more actual carriers in actual application, and these modules may all be implemented in a form called by a processing unit through software, may also all be implemented in a form of hardware, or implemented in a form of combination of software and hardware, and it should be noted that, each module in the panel circle defect detection apparatus in the embodiment corresponds to each step in the panel circle defect detection method in the foregoing embodiment one by one, and therefore, the specific implementation of the embodiment may refer to the implementation of the panel circle defect detection method, and is not described herein again.
Based on the same inventive concept as that in the foregoing embodiments, embodiments of the present application further provide a computer-readable storage medium, which stores a computer program, and when the computer program is loaded and executed by a processor, the method for detecting a panel circle defect provided in the embodiments of the present application is implemented.
Based on the same inventive concept as the foregoing embodiments, embodiments of the present application further provide an electronic device, comprising a processor and a memory, wherein,
the memory is used for storing a computer program;
the processor is used for loading and executing a computer program to enable the electronic device to execute the panel circle defect detection method provided by the embodiment of the application.
Furthermore, based on the same inventive concept as the foregoing embodiments, embodiments of the present application also provide a computer program product comprising a computer program for executing the panel circle-like defect detection method as provided by the embodiments of the present application when the computer program is executed.
In some embodiments, the computer-readable storage medium may be memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash, magnetic surface memory, optical disk, or CD-ROM; or may be various devices including one or any combination of the above memories. The computer may be a variety of computing devices including intelligent terminals and servers.
In some embodiments, executable instructions may be written in any form of programming language (including compiled or interpreted languages), in the form of programs, software modules, scripts or code, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
By way of example, executable instructions may correspond, but do not necessarily have to correspond, to files in a file system, and may be stored in a portion of a file that holds other programs or data, such as in one or more scripts in a hypertext Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub-programs, or portions of code).
By way of example, executable instructions may be deployed to be executed on one computing device or on multiple computing devices at one site or distributed across multiple sites and interconnected by a communication network.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
Through the description of the foregoing embodiments, it is clear to those skilled in the art that the method of the foregoing embodiments may be implemented by software plus a necessary general hardware platform, and certainly may also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (e.g., a rom/ram, a magnetic disk, an optical disk) and includes instructions for enabling a multimedia terminal (e.g., a mobile phone, a computer, a television receiver, or a network device) to perform the method according to the embodiments of the present application.
In summary, the present application provides a method, an apparatus, a medium, a device and a program product for detecting a circular defect of a panel, which includes: cutting according to the position information of the defect on the image to be detected to obtain a cut image; extracting the outline of the defect on the cut image to obtain a defect outline image; and fitting the defect contour image by adopting an ellipse fitting operator to obtain the standard degree of the contour of the defect relative to a perfect circle. The image to be detected is cut, the detection object is localized, detection in other irrelevant areas is avoided, defects on the cut image occupy most areas, the phase-change defects are enlarged, the shapes and the outlines of the defects are more definite, the shape identification of the defects can be more accurate, the detection capacity of the defects is improved, the outline conditions of the defects can be efficiently extracted from the cut image, the detection effect is improved, fitting is further performed by adopting ellipse operator, the ellipse operator is based on the width and height information of the ellipse, the perfect circle is used as a special ellipse with the width equal to the height, the standard degree of the outline of the defects relative to the perfect circle is obtained after fitting, the degree of the circle of the defects is quantized, whether the defects can be divided into the circle defects or not can be accurately and efficiently obtained according to the standard degree, and the detection quality of the circle defects is improved.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (14)

1. A panel circle defect detection method is characterized by comprising the following steps:
cutting according to the position information of the defect on the image to be detected to obtain a cut image;
extracting the outline of the defect on the cutting image to obtain a defect outline image;
and fitting the defect contour image by adopting an ellipse fitting operator to obtain the standard degree of the contour of the defect relative to a perfect circle.
2. The method for detecting the panel round defect of claim 1, wherein after the cropping is performed according to the position information of the defect on the image to be detected and the cropped image is obtained, the method for detecting the panel round defect further comprises:
carrying out binarization processing on the cutting image to obtain a binarization cutting image;
the extracting the contour of the defect on the cutting image to obtain a defect contour image comprises:
and extracting the outline of the defect on the binary cutting image to obtain a defect outline image.
3. The method for detecting defects of round panels according to claim 2, wherein after the binarization processing is performed on the cropped image to obtain a binarized cropped image, the method for detecting defects of round panels further comprises:
carrying out image denoising on the binary cutting image to obtain a denoised image;
the extracting the contour of the defect on the binary cutting image to obtain a defect contour image comprises the following steps:
and extracting the defect contour on the de-noised image to obtain a defect contour image.
4. The method for detecting circular defects of a panel according to claim 3, wherein the image denoising of the binarized cropped image to obtain a denoised image comprises:
carrying out corrosion operation on the binary cutting image to enable the corrosion of a black area to be enlarged, and obtaining a corrosion image;
and performing expansion operation on the corrosion image to expand and enlarge the white area to obtain a de-noised image.
5. The method for detecting the panel circular defect of claim 1, wherein the extracting the contour of the defect on the cropped image to obtain a defect contour image comprises:
acquiring defect area information according to the coverage area of the defect on the cutting image;
extracting edge contour information of the defect according to the defect area information;
and acquiring a defect outline image according to the edge outline information of the defect.
6. The method for detecting the panel circle defects of claim 1, wherein the fitting the defect contour image by an ellipse fitting operator to obtain a standard degree of the contour of the defect relative to a perfect circle comprises:
fitting the defect contour image by adopting an ellipse fitting operator to obtain a fitting ellipse of the contour of the defect;
and obtaining the standard degree of the outline of the defect relative to a perfect circle according to the width information and the height information of the fitting ellipse.
7. The method for detecting the panel circular defects according to claim 1, wherein after the ellipse fitting operator is adopted to fit the defect contour image to obtain the standard degree of the contour of the defect relative to the perfect circle, the method for detecting the panel circular defects further comprises:
obtaining a judgment result according to the judgment value and the standard degree of the outline of the defect relative to the perfect circle; wherein the judgment result comprises a circle and a non-circle.
8. The method of claim 7, wherein after obtaining the determination result according to the determination value and the standard degree of the contour of the defect with respect to the perfect circle, the method further comprises:
inputting the defect outline image corresponding to the non-circle judgment result into a defect detection model to obtain a detection result; the defect detection model is obtained based on training of a plurality of target images and non-target images, the target images are images with circular defects, and the non-target images with non-circular defects are obtained through training of the non-circular images.
9. The method as claimed in claim 8, wherein the method further comprises, before inputting the defect contour image corresponding to the non-circle judgment result into a defect detection model to obtain a detection result, the method further comprising:
obtaining a plurality of target images and a plurality of non-target images;
adding an attention mechanism in an existing neural network to enable the neural network to capture weight information of each channel, and training to obtain a classified neural network;
and training to obtain the defect detection model based on the classification neural network, the target image and the non-target image.
10. The method as claimed in claim 9, wherein after obtaining the plurality of target images and the plurality of non-target images, the method further comprises:
scaling the target image and the non-target image to obtain the target image and the non-target image with the same size;
the training to obtain the defect detection model based on the classification neural network, the target image and the non-target image comprises:
and training to obtain the defect detection model based on the classification neural network and the target image and the non-target image with the same size.
11. A panel circle type defect detection device is characterized by comprising:
the cutting module is used for cutting according to the position information of the defect on the image to be detected to obtain a cut image;
the extraction module is used for extracting the outline of the defect on the cutting image to obtain a defect outline image;
and the fitting module is used for fitting the defect contour image by adopting an ellipse fitting operator to obtain the standard degree of the contour of the defect relative to a perfect circle.
12. A computer-readable storage medium storing a computer program, wherein the computer program, when loaded and executed by a processor, implements the panel circle defect detection method according to any one of claims 1-10.
13. An electronic device comprising a processor and a memory, wherein,
the memory is used for storing a computer program;
the processor is used for loading and executing the computer program to enable the electronic equipment to execute the panel circle defect detection method of any one of claims 1-10.
14. A computer program product comprising a computer program for performing the panel circular defect detection method of any one of claims 1 to 10 when the computer program is executed.
CN202211691304.8A 2022-12-28 2022-12-28 Panel circle defect detection method, device, medium, equipment and program product Active CN115661157B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211691304.8A CN115661157B (en) 2022-12-28 2022-12-28 Panel circle defect detection method, device, medium, equipment and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211691304.8A CN115661157B (en) 2022-12-28 2022-12-28 Panel circle defect detection method, device, medium, equipment and program product

Publications (2)

Publication Number Publication Date
CN115661157A true CN115661157A (en) 2023-01-31
CN115661157B CN115661157B (en) 2023-04-14

Family

ID=85023035

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211691304.8A Active CN115661157B (en) 2022-12-28 2022-12-28 Panel circle defect detection method, device, medium, equipment and program product

Country Status (1)

Country Link
CN (1) CN115661157B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115932864A (en) * 2023-02-24 2023-04-07 深圳市博铭维技术股份有限公司 Pipeline defect detection method and pipeline defect detection device
CN116309563A (en) * 2023-05-17 2023-06-23 成都数之联科技股份有限公司 Method, device, medium, equipment and program product for detecting defect of panel edge
CN117670876A (en) * 2024-01-31 2024-03-08 成都数之联科技股份有限公司 Panel defect severity level judging method, system, equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103543168A (en) * 2013-10-12 2014-01-29 华南理工大学 Method and system for X ray detection on multilayer package substrate defects
CN106228161A (en) * 2016-07-18 2016-12-14 电子科技大学 A kind of pointer-type dial plate automatic reading method
CN106525966A (en) * 2016-09-22 2017-03-22 中北大学 Axial symmetry workpiece ellipse-like defect reconstruction method
CN111833324A (en) * 2020-07-09 2020-10-27 中国计量大学 Optical fiber ferrule defect detection method based on deep learning
US20210390682A1 (en) * 2020-06-12 2021-12-16 Beijing Baidu Netcom Science And Technology Co., Ltd. Method for detecting surface defect, method for training model, apparatus, device, and media
CN113836850A (en) * 2021-11-26 2021-12-24 成都数之联科技有限公司 Model obtaining method, system and device, medium and product defect detection method
CN114519743A (en) * 2022-02-25 2022-05-20 成都数联云算科技有限公司 Panel defect area extraction method, device, equipment and storage medium
CN114581723A (en) * 2022-05-06 2022-06-03 成都数之联科技股份有限公司 Defect classification method, device, storage medium, equipment and computer program product
CN114723649A (en) * 2020-12-21 2022-07-08 武汉Tcl集团工业研究院有限公司 Panel defect detection method, storage medium and terminal equipment
CN114723755A (en) * 2022-06-08 2022-07-08 深圳新视智科技术有限公司 Fillet defect detection method, device and equipment for glass screen and storage medium
CN115131283A (en) * 2022-04-15 2022-09-30 腾讯科技(深圳)有限公司 Defect detection and model training method, device, equipment and medium for target object
CN115409797A (en) * 2022-08-29 2022-11-29 上海大学 PCB defect image detection method based on improved deep learning algorithm

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103543168A (en) * 2013-10-12 2014-01-29 华南理工大学 Method and system for X ray detection on multilayer package substrate defects
CN106228161A (en) * 2016-07-18 2016-12-14 电子科技大学 A kind of pointer-type dial plate automatic reading method
CN106525966A (en) * 2016-09-22 2017-03-22 中北大学 Axial symmetry workpiece ellipse-like defect reconstruction method
US20210390682A1 (en) * 2020-06-12 2021-12-16 Beijing Baidu Netcom Science And Technology Co., Ltd. Method for detecting surface defect, method for training model, apparatus, device, and media
CN111833324A (en) * 2020-07-09 2020-10-27 中国计量大学 Optical fiber ferrule defect detection method based on deep learning
CN114723649A (en) * 2020-12-21 2022-07-08 武汉Tcl集团工业研究院有限公司 Panel defect detection method, storage medium and terminal equipment
CN113836850A (en) * 2021-11-26 2021-12-24 成都数之联科技有限公司 Model obtaining method, system and device, medium and product defect detection method
CN114519743A (en) * 2022-02-25 2022-05-20 成都数联云算科技有限公司 Panel defect area extraction method, device, equipment and storage medium
CN115131283A (en) * 2022-04-15 2022-09-30 腾讯科技(深圳)有限公司 Defect detection and model training method, device, equipment and medium for target object
CN114581723A (en) * 2022-05-06 2022-06-03 成都数之联科技股份有限公司 Defect classification method, device, storage medium, equipment and computer program product
CN114723755A (en) * 2022-06-08 2022-07-08 深圳新视智科技术有限公司 Fillet defect detection method, device and equipment for glass screen and storage medium
CN115409797A (en) * 2022-08-29 2022-11-29 上海大学 PCB defect image detection method based on improved deep learning algorithm

Non-Patent Citations (6)

* Cited by examiner, † Cited by third party
Title
曹俊丽;李居峰;: "基于莱特准则的椭圆拟合优化算法" *
李飞;冯开勇;苑玮琦;: "柔性印刷线路板LED缺陷检测方法的研究" *
熊光洁;马树元;刘瑞祯;: "PCB检测中圆Mark的快速精确定位" *
王鹏;杜卫东;汪立新;张峰;韩伟;徐莹;: "射线检测中胶片焊缝缺陷定位与识别" *
罗琳;王志武;韦红雨;田社平;: "可乐瓶口缺陷快速检测系统的研制" *
高小宁;张航;王哲;: "盾构隧道椭圆度测量和数据处理" *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115932864A (en) * 2023-02-24 2023-04-07 深圳市博铭维技术股份有限公司 Pipeline defect detection method and pipeline defect detection device
CN116309563A (en) * 2023-05-17 2023-06-23 成都数之联科技股份有限公司 Method, device, medium, equipment and program product for detecting defect of panel edge
CN116309563B (en) * 2023-05-17 2023-07-18 成都数之联科技股份有限公司 Method, device, medium, equipment and program product for detecting defect of panel edge
CN117670876A (en) * 2024-01-31 2024-03-08 成都数之联科技股份有限公司 Panel defect severity level judging method, system, equipment and storage medium
CN117670876B (en) * 2024-01-31 2024-05-03 成都数之联科技股份有限公司 Panel defect severity level judging method, system, equipment and storage medium

Also Published As

Publication number Publication date
CN115661157B (en) 2023-04-14

Similar Documents

Publication Publication Date Title
CN115661157B (en) Panel circle defect detection method, device, medium, equipment and program product
CN114266773B (en) Display panel defect positioning method, device, equipment and storage medium
CN116542975B (en) Defect classification method, device, equipment and medium for glass panel
US20230005130A1 (en) Method and device for detecting display panel defect
CN110288566B (en) Target defect extraction method
CN115578377B (en) Panel defect detection method, training method, device, equipment and medium
CN115880248B (en) Surface scratch defect identification method and visual detection equipment
CN114677567B (en) Model training method and device, storage medium and electronic equipment
CN111221996B (en) Instrument screen vision detection method and system
CN107993223A (en) Scratch detection method, apparatus and electronic equipment
CN113724322B (en) Cargo pallet positioning method and system for unmanned forklift
CN116091503B (en) Method, device, equipment and medium for discriminating panel foreign matter defects
CN112651961A (en) Wafer defect identification method and device
CN115719326A (en) PCB defect detection method and device
CN114937037B (en) Product defect detection method, device and equipment and readable storage medium
CN114627113B (en) Method, system, device and medium for detecting defects of printed circuit board
CN116523871A (en) Method and device for detecting defects of machined part, electronic equipment and storage medium
CN114219806B (en) Automobile radar detection method, device, equipment, medium and product
CN115690089A (en) Image enhancement preprocessing method and system for weak defect detection
CN115937212A (en) Glass plate crack detection method, device, equipment and medium
CN114549465A (en) Defect position determining method and device, storage medium and electronic equipment
CN111678673A (en) Lens detection method, lens detection device and readable storage medium
CN112200805A (en) Industrial product image target extraction and defect judgment method
CN111861997A (en) Method, system and device for detecting circular hole size of pattern board
CN117495846B (en) Image detection method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant