CN116152166A - Defect detection method and related device based on feature correlation - Google Patents

Defect detection method and related device based on feature correlation Download PDF

Info

Publication number
CN116152166A
CN116152166A CN202211592462.8A CN202211592462A CN116152166A CN 116152166 A CN116152166 A CN 116152166A CN 202211592462 A CN202211592462 A CN 202211592462A CN 116152166 A CN116152166 A CN 116152166A
Authority
CN
China
Prior art keywords
circuit board
image
board image
feature
defect detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211592462.8A
Other languages
Chinese (zh)
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.)
Shenzhen Smartmore Technology Co Ltd
Original Assignee
Shenzhen Smartmore 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 Shenzhen Smartmore Technology Co Ltd filed Critical Shenzhen Smartmore Technology Co Ltd
Priority to CN202211592462.8A priority Critical patent/CN116152166A/en
Publication of CN116152166A publication Critical patent/CN116152166A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/41Analysis of texture based on statistical description of texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30141Printed circuit board [PCB]

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Probability & Statistics with Applications (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)

Abstract

The application provides a defect detection method and a related device based on feature correlation. The method comprises the following steps: acquiring a circuit board image to be tested and a sample circuit board image; extracting first characteristic information of a circuit board image to be detected and second characteristic information of a sample circuit board image; performing defect detection on the circuit board image to be detected based on the correlation characteristic between the first characteristic information and the second characteristic information to obtain a defect detection result; the correlation features are used for representing the same degree of corresponding same areas between the circuit board image to be tested and the sample circuit board image. By adopting the method and the device, the accuracy of PCB defect detection is improved.

Description

Defect detection method and related device based on feature correlation
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a defect detection method and related device based on feature correlation.
Background
With the wide application of products such as automobile electronics, communication equipment, transformers, inductance devices, power modules and the like in life and the rapid development of electronic information technology and communication technology, the market has put forward higher demands on high-transmission and high-voltage electronic products. And as a basic bearing component of the electronic product, namely a printed circuit board (Printed circuit board, PCB for short), the performance of the electronic product is directly affected by the performance of the corresponding electronic product.
Since the PCB inevitably has a large number of defects during the production process, the defects are mainly located at circuit elements of the PCB. Therefore, it is necessary to detect defective circuit elements for subsequent PCB repair work. Currently, defects on PCBs are detected and located mainly by capturing images of the PCB with an optical camera using automated optical inspection (Automated Optical Inspection, AOI) equipment, and using methods such as image processing, machine learning, etc.
However, due to the detection accuracy of AOI detection of the PCB and the influence factors of the shape, number and type of defects on the PCB, defects in some similar areas or defects of unknown type cannot be detected, so that the accuracy of PCB defect detection is not high.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a defect detection method and related device based on feature correlation, which can improve the accuracy of detecting defects on a PCB.
In a first aspect, the present application provides a defect detection method based on feature correlation, including:
acquiring a circuit board image to be tested and a sample circuit board image;
Extracting first characteristic information of a circuit board image to be detected and second characteristic information of a sample circuit board image;
performing defect detection on the circuit board image to be detected based on the correlation characteristic between the first characteristic information and the second characteristic information to obtain a defect detection result; the correlation features are used for representing the same degree of corresponding same areas between the circuit board image to be tested and the sample circuit board image.
In a second aspect, the present application further provides a defect detection device based on feature correlation, including:
the acquisition unit is used for acquiring the circuit board image to be detected and the sample circuit board image;
the extraction unit is used for extracting first characteristic information of the circuit board image to be detected and second characteristic information of the sample circuit board image;
the detection unit is used for carrying out defect detection on the circuit board image to be detected based on the correlation characteristic between the first characteristic information and the second characteristic information to obtain a defect detection result; the correlation features are used for representing the same degree of corresponding same areas between the circuit board image to be tested and the sample circuit board image.
In a third aspect, the present application further provides an electronic device, where the electronic device includes a memory and a processor, where the memory stores a computer program, and where the processor implements a method for detecting defects based on feature correlation as described above when the processor executes the computer program.
In a fourth aspect, the present application further provides a computer readable storage medium having a computer program stored thereon, which when executed by a processor implements a method for detecting defects based on feature correlation as described above.
In a fifth aspect, the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements a method for defect detection based on feature correlation as described above.
According to the defect detection method and the related device based on the characteristic correlation, on one hand, the same degree of the corresponding area between the circuit board image to be detected and the sample circuit board image is determined by only utilizing the characteristic information of the two, so that the subsequent defect detection flow of the PCB can be easily carried out, the defect detection efficiency is improved, and the real-time property of detection is ensured; on the other hand, the defects in the circuit board image to be detected are detected by utilizing the same degree of the corresponding area between the circuit board image to be detected and the sample circuit board image, so that the accuracy of PCB defect detection can be improved, and the higher recall rate of the circuit board can be ensured.
Drawings
FIG. 1 is an application environment diagram of a defect detection method based on feature correlation according to an embodiment of the present application;
FIG. 2 is a flow chart of a first feature correlation-based defect detection method according to an embodiment of the present application;
fig. 3 is a schematic flow chart of defect detection on a circuit board image to be detected according to an embodiment of the present application;
fig. 4 is a schematic flow chart of determining correlation characteristics between first feature information and second feature information according to an embodiment of the present application;
fig. 5 is a schematic flow chart of performing defect detection on a scaled circuit board image to be tested according to an embodiment of the present application;
fig. 6 is a schematic flow chart of performing defect identification and defect labeling on a scaled image of a circuit board to be tested according to an embodiment of the present application;
FIG. 7 is a flowchart of a second feature correlation-based defect detection method according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a process for updating a defective circuit board according to an embodiment of the present disclosure;
FIG. 9 is a flowchart of a third feature correlation-based defect detection method according to an embodiment of the present application;
FIG. 10 is a block diagram of a defect detection apparatus based on feature correlation according to an embodiment of the present application;
FIG. 11 is a block diagram of an electronic device provided by an embodiment of the present application;
FIG. 12 is a block diagram of a computer-readable storage medium provided by an embodiment of the present application;
Fig. 13 is a block diagram of a computer program product provided by an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application.
The term "and/or" in embodiments of the present application refers to any and all possible combinations including one or more of the associated listed items. Also described are: as used in this specification, the terms "comprises/comprising" and/or "includes" specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, and/or components, and/or groups thereof.
The terms "first," "second," and the like in this application are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
In addition, although the terms "first," "second," etc. may be used several times in this application to describe various operations (or various elements or various applications or various instructions or various data) etc., these operations (or elements or applications or instructions or data) should not be limited by these terms. These terms are only used to distinguish one operation (or element or application or instruction or data) from another operation (or element or application or instruction or data). For example, a first number of pixel features may be referred to as a second number of pixel features, which may also be referred to as a first number of pixel features, and which are included only in a range that is different from the range of the present application, and which are a corresponding set of pixel features on various circuit boards, but which are not a corresponding set of pixel features on the same circuit board.
The defect detection method based on the feature correlation provided by the embodiment of the application can be applied to an application environment shown in fig. 1. Wherein the electronic device 102 communicates with the server 104 via a communication network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104 or may be located on a cloud or other network server.
In some embodiments, referring to fig. 1, server 104 first obtains a circuit board image to be tested and a sample circuit board image; then, extracting first characteristic information of the circuit board image to be detected and second characteristic information of the sample circuit board image; finally, performing defect detection on the circuit board image to be detected based on the correlation characteristic between the first characteristic information and the second characteristic information to obtain a defect detection result; the correlation features are used for representing the same degree of corresponding same areas between the circuit board image to be tested and the sample circuit board image.
In some embodiments, the electronic device 102 (e.g., mobile terminal, fixed terminal) may be implemented in a variety of forms. The electronic device 102 may be a mobile terminal including a mobile phone, a smart phone, a notebook computer, a portable handheld device, a personal digital assistant (PDA, personal Digital Assistant), a tablet personal computer (PAD), etc. that may perform defect detection on a circuit board image based on correlation characteristics corresponding to characteristic information of at least two images, or the electronic device 102 may be an automatic teller machine (Automated Teller Machine, ATM), an access control all-in-one machine, a digital TV, a desktop computer, a solid computer, etc. that may perform defect detection on a circuit board image based on correlation characteristics corresponding to characteristic information of at least two images. In the following, it is assumed that the electronic device 102 is a fixed terminal. However, those skilled in the art will appreciate that configurations according to embodiments disclosed herein can also be applied to mobile-type electronic devices 102, if there are operations or elements specifically for mobile purposes.
In some embodiments, the image processing components and data processing components running by server 104 may load any of a variety of additional server applications and/or middle tier applications being executed, including, for example, HTTP (hypertext transfer protocol), FTP (file transfer protocol), CGI (common gateway interface), RDBMS (relational database management system), and the like.
In some embodiments, the server 104 may be implemented as a stand-alone server or as a cluster of servers. The server 104 may be adapted to run one or more application services or software components that provide the electronic device 102 described in the foregoing disclosure.
In some embodiments, the application services may include, for example, a service for extracting feature information of a circuit board image to be tested and feature information of a sample circuit board image, a service for providing a user with subsequent defect detection of the circuit board image after extracting the feature information of the image, and the like. The software components may include, for example, an APP or a client having a defect detection function for the circuit board image.
In some embodiments, an APP or client having a defect detection function for a circuit board image includes a portal port providing a one-to-one application service to a user in the foreground and a plurality of business systems located in the background for data processing to extend the application of the defect detection function to the APP or client so that the user can use and access the defect detection function at any time and any place.
In some embodiments, the defect detection function of the APP or client may be a computer program running in user mode to accomplish some specific task or tasks, which may interact with the user and have a visual user interface. Wherein, APP or client may include two parts: a Graphical User Interface (GUI) and an engine (engine) with which a user can be provided with a digitized client system of various application services in the form of a user interface.
In some embodiments, a user may input corresponding code data or control parameters to an APP or client via an input device to execute an application service of a computer program and display the application service in a user interface. For example, when the feature information of the circuit board image to be tested and the feature information of the sample circuit board image need to be extracted, a user operates through the input device and displays the result through the user interface. Alternatively, the input device may be a touch screen input, a key input, a voice input, or a pupil focus input, among others.
In some embodiments, the APP or client-running operating system may include various versions of Microsoft Windows
Figure BDA0003995231300000061
Apple/>
Figure BDA0003995231300000062
And/or Linux operating system, various commercial or quasi +. >
Figure BDA0003995231300000063
Operating systems (including but not limited to various GNU/Linux operating systems, google +.>
Figure BDA0003995231300000064
OS, etc.) and/or a mobile operating system, such as
Figure BDA0003995231300000065
Phone、/>
Figure BDA0003995231300000066
OS、/>
Figure BDA0003995231300000067
OS、/>
Figure BDA0003995231300000068
OS operating systems, as well as other online or offline operating systems.
In some embodiments, as shown in fig. 2, a first defect detection method based on feature correlation is provided, and the method is applied to the server 104 in fig. 1 for illustration, and the method includes the following steps:
step S11, obtaining a circuit board image to be tested and a sample circuit board image.
In some embodiments, a user acquires a shot image of a circuit board to be tested and a shot image of a sample circuit board in real time through an image pickup device in the electronic device, and then the electronic device sends the acquired shot images to a server for subsequent data processing.
In some embodiments, the captured image of the circuit board under test and the captured image of the sample circuit board have been captured in advance by an imaging device or other device in the electronic apparatus and stored in a third party mechanism (e.g., an image database, a cloud storage platform, etc.), and when the server responds to receiving an instruction to initiate acquisition of the captured image selected by the user, the server acquires the circuit board image under test and the sample circuit board image from the corresponding third party mechanism.
In some embodiments, the camera in the electronic device is an automated optical inspection device (Automated Optical Inspection, AOI) or an automated visual inspection (automated vision inspection, AVI), where AOI or AVI is a device that integrates image sensing technology, data processing technology, motion control technology, which is based on optical principles to detect common defects encountered in PCB circuit board solder production. When automatic detection is carried out, the AOI machine or the AVI machine automatically scans the PCB through the camera, and captures the shooting image of the circuit board to be detected and the shooting image of the sample circuit board.
In some embodiments, the AOI machine or AVI machine may itself be mounted with an image capturing device of one of a depth camera, a 3D camera, a monocular camera, a binocular camera, or the like, and generate corresponding control information according to user input to capture a captured image of the circuit board under test and a captured image of the sample circuit board.
In some embodiments, the captured image of the circuit board under test and the captured image of the sample circuit board are captured as PCB (Printed circuit boards, printed circuit board) images. Wherein, the PCB face is divided into a circuit board area and a non-circuit board area.
In some embodiments, the circuit board area of the PCB is provided with a PCB circuit etched by the medicament, and the circuit elements and sharp corners thereof are tiny and dense on the PCB circuit (namely, the sharp corner area protrudes outwards from four right-angle parts of the square area, and two adjacent straight lines of the square area form mutually-intersected inclined lines at the mutually-approaching end parts, and the two adjacent inclined lines mutually intersect to form a sharp corner, and the inclined lines are called sharp corner line segments). Because of the tension of the medicament, a great number of defects (such as holes, rat erosion, open circuits, short circuits, burrs, copper residues and the like, for example) are inevitably generated in the production process of the PCB due to the manufacturing process, and sharp corners on the PCB circuit are often false point sharp corners (more false points can be generated on the circuit element due to the fact that the sharp corners are bright in the openings, the substrate reflects light, the local oxidation, the dirty points and the like). Thus, the circuit board image to be tested acquired by the AOI machine or the AVI machine is a PCB image with various defects and sharp corners.
The sample circuit board image is a schematic design diagram corresponding to the PCB, and compared with the PCB image, the sample circuit board image has no defects and no false point sharp angles at the position of the sharp angle on the board surface, and is the PCB in the optimal state.
Step S12, extracting first characteristic information of the circuit board image to be detected and second characteristic information of the sample circuit board image.
In some embodiments, the server extracts the characteristic information of the image from the acquired circuit board image to be tested through a preset neural network, and extracts the characteristic information of the image from the sample circuit board image.
In some embodiments, the first characteristic information of the circuit board image to be tested and the second characteristic information of the sample circuit board image include information of color characteristics, texture characteristics, shape characteristics, spatial relationship characteristics and the like of the image.
In some embodiments, the server firstly cuts the circuit board image to be tested and the sample circuit board image respectively, then extracts all the corners in the circuit board image to be tested and the sample circuit board image by using the Harris corner detection method, and finally, the server performs feature analysis on the extracted corners through a preset neural network (such as a convolutional neural network, a semantic segmentation network and the like) so as to extract feature information.
In some embodiments, the server may input the circuit board image to be tested and the sample circuit board image into a pre-trained convolutional neural network model (e.g., UNet network model, CNN network model, RNN network model, etc.) to directly obtain the feature information of the circuit board image to be tested and the sample circuit board image from the convolutional neural network model.
As an example, the pre-trained convolutional neural network model is a UNet convolutional neural network. The UNet convolutional neural network can be divided into two parts, namely a feature extraction part, and the feature extraction part is used for extracting image features through stacking convolution, and compressing the feature map through pooling like other convolutional neural networks. The other part is an image restoration part, which restores the compressed image by upsampling and convolution. Wherein the feature extraction part may use a residual network structure, for example: resnet50, VGG, etc. The positive and negative examples can be balanced by using a sample balance loss function (i.e. focal loss) as a loss function of the neural network, and finally a stable semantic segmentation model capable of outputting characteristic information and no longer reducing the loss function can be obtained.
And step S13, performing defect detection on the circuit board image to be detected based on the correlation characteristic between the first characteristic information and the second characteristic information to obtain a defect detection result.
In some embodiments, the correlation feature is used to characterize the degree of identity of corresponding identical regions between the circuit board image under test and the sample circuit board image.
In some embodiments, the server first determines correlation characteristics (including the same degree of the same region) corresponding to each same region between the circuit board image to be tested and the sample circuit board image based on the first characteristic information of the circuit board image to be tested and the second characteristic information of the sample circuit board image, and then determines defect information on the circuit board image to be tested according to the correlation characteristics of each same region to complete defect detection of the circuit board image to be tested.
In some embodiments, the correlation feature may be a feature similarity between the circuit board image to be tested and the sample circuit board image for each identical region. Such as similarity of texture features, similarity of color features, similarity of shape features, etc.
In some embodiments, the server compares the feature similarity of each corresponding identical region between the circuit board image to be tested and the sample circuit board image with a preset similarity threshold, if the feature similarity is smaller than the similarity threshold, the server indicates that the circuit board image to be tested of the corresponding region includes a defect, and if the feature similarity is greater than or equal to the similarity threshold, the server indicates that the circuit board image to be tested of the corresponding region does not include a defect.
In the defect detection method based on the characteristic correlation, on one hand, the same degree of the corresponding region between the circuit board image to be detected and the sample circuit board image is determined by only using the characteristic information of the two, so that the subsequent defect detection flow can be easily carried out, the defect detection efficiency is improved, and the real-time property of detection is ensured; on the other hand, the defects in the circuit board image to be detected are detected by utilizing the same degree of the corresponding area between the circuit board image to be detected and the sample circuit board image, so that the accuracy of defect detection can be improved, and the higher recall rate of the circuit board can be ensured.
It will be appreciated by those skilled in the art that in the above-described methods of the embodiments, the disclosed methods may be implemented in a more specific manner. For example, the above-described embodiment of a feature correlation-based defect detection method is merely a schematic description.
For example, the process of extracting the feature information of the circuit board image to be tested and the feature information of the sample circuit board image, etc. are just one way of collection, and there may be another division manner when actually implementing, for example, the feature information of the circuit board image to be tested and the feature information of the sample circuit board image may be combined or may be collected into another system, or some features may be omitted or not performed.
In a more specific embodiment, in the process of extracting the feature information of the circuit board image to be tested and the feature information of the sample circuit board image by the server, the method can further comprise the step of firstly scaling the circuit board image to be tested and the sample circuit board image by utilizing various interpolation algorithms. And then performing defect detection based on the scaled circuit board image to be detected and the sample circuit board image.
In some embodiments, after acquiring the circuit board image to be tested and the sample circuit board image, the server may further include:
Scaling the circuit board image to be tested and the sample circuit board image to obtain a scaled circuit board image to be tested and a sample circuit board image with the same pixel size.
In some embodiments, the server may scale the circuit board image to be tested and the sample circuit board image by interpolation.
In some embodiments, the interpolation algorithm may include an adaptive interpolation algorithm and a non-adaptive interpolation algorithm. The adaptive method may be changed according to the content of the interpolation (e.g., sharp edges included in the image or smooth textures), and the non-adaptive method requires the same scaling process for all pixels in the feature map. Wherein the non-adaptive algorithm comprises: nearest neighbors, bilinear, bicubic, spline, sinc, lanczos, etc.
In some embodiments, because the complexity of the features correspondingly included in the circuit board image to be tested and the sample circuit board image are different, the server performs interpolation scaling (including interpolation warping) on the features in the circuit board image to be tested and the sample circuit board image by using adjacent pixels from 0 to 256 (or more) through an interpolation algorithm, so as to obtain a scaled circuit board image to be tested and a sample circuit board image with the same pixel size.
In some embodiments, the more adjacent pixels that the server interpolates and scales features in the circuit board image to be tested and the sample circuit board image, the more accurate the warped or scaled image, but the longer it takes.
In some embodiments, the server extracts the first feature information of the circuit board image to be tested and the second feature information of the sample circuit board image, which may specifically include:
and extracting the first characteristic information of the scaled circuit board image to be tested and the second characteristic information of the scaled sample circuit board image.
In some embodiments, the server extracts the characteristic information of the image from the acquired circuit board image to be tested through a preset neural network, and extracts the characteristic information of the image from the sample circuit board image.
In some embodiments, the first characteristic information of the scaled circuit board image to be tested and the second characteristic information of the scaled sample circuit board image each include at least one of color characteristics, texture characteristics, shape characteristics, and spatial relationship characteristics at positions of corresponding pixels of the image.
In some embodiments, the spatial relationship feature of the pixel position corresponding to the image is used to characterize the distance and direction relationship between the pixel position of the corresponding one feature in the feature information of the image and the pixel position of the adjacent feature.
In some embodiments, the color features of the image at the locations of the corresponding pixel points include pixel duty ratios of appearance colors of a corresponding one of the features in the feature information of the image and spatial relationships of the colors as a function of distance.
In some embodiments, the shape features of the image corresponding to the pixel locations include contour features and region features. The contour features are mainly aimed at the outer boundary of a corresponding feature in the feature information of the image, and the region features are mainly aimed at the whole shape region corresponding to the feature information of the image.
In some embodiments, referring to fig. 3, fig. 3 is a flowchart illustrating an embodiment of performing defect detection on an image of a circuit board to be tested in the present application. In step S13, the server performs defect detection on the image of the circuit board to be detected based on the correlation feature between the first feature information and the second feature information, so as to obtain a defect detection result, which may be specifically implemented by the following ways:
step S131, determining a correlation feature between the first feature information and the second feature information.
In some embodiments, referring to fig. 4, fig. 4 is a flowchart illustrating an embodiment of determining correlation characteristics between first characteristic information and second characteristic information in the present application. In step S131, the correlation feature between the first feature information and the second feature information of the server may be specifically implemented by:
And a1, determining each pair of pixel points corresponding to the same pixel point position between the zoomed circuit board image to be detected and the zoomed sample circuit board image.
In some embodiments, the server first determines, in the circuit board image to be tested and the sample circuit board image with the same pixel size, that the pixel positions of the two images correspond to the same pair of pixels.
And a2, calculating the similarity of at least one characteristic information corresponding to each pair of pixel points based on the first characteristic information and the second characteristic information.
In some embodiments, the server may calculate the similarity of each pair of pixels corresponding to at least one feature information for the same pixel location through the euclidean distance or the epipolar distance.
After calculating the euclidean distance or the residual rotation distance between the feature vector of the pixel point A of the circuit board image to be tested and the feature vector of the pixel point B of the sample circuit board image, determining the similarity of the pixel point A of the circuit board image to be tested and the pixel point B of the sample circuit board image corresponding to at least one feature information based on the euclidean distance or the residual rotation distance.
And S132, performing defect detection on the scaled circuit board image to be detected according to the correlation characteristics to obtain a defect detection result.
In some embodiments, referring to fig. 5, fig. 5 is a flowchart illustrating an embodiment of performing defect detection on a scaled circuit board image to be tested in the present application. In step S132, the server performs defect detection on the scaled image of the circuit board to be detected according to the correlation characteristics to obtain a defect detection result, which may be specifically implemented by the following ways:
step a3, determining that the scaled circuit board image to be tested corresponds to a first number of pixel features and the scaled sample circuit board image corresponds to a second number of pixel features.
In some embodiments, after the server scales the circuit board image to be tested and the sample circuit board image, the server determines that the feature information of the circuit board image to be tested corresponds to the pixel feature with the first number of channels on the image, and the feature information of the sample circuit board image corresponds to the pixel feature with the second number of channels on the image.
As an example, the feature information of the circuit board image to be measured corresponds to A1 feature on the scaled circuit board image to be measured, the A1 feature is distributed on the scaled circuit board image to be measured and occupies A2 pixel points, and the A2 pixel points are the pixel point features with the number of channels being the first number of channels on the image. The characteristic information of the sample circuit board image corresponds to B1 characteristics on the scaled sample circuit board image, the B1 characteristics are distributed on the scaled sample circuit board image to occupy B2 pixel points, and the B2 pixel points are pixel point characteristics with the number of channels being the number of second channels on the image.
And a step a4 of performing defect identification and defect labeling on the scaled circuit board image to be detected based on the first number of pixel features, the second number of pixel features and the similarity of at least one feature information corresponding to each pair of pixel points to obtain a defect detection result.
In some embodiments, referring to fig. 6, fig. 6 is a flowchart illustrating an embodiment of performing defect recognition and defect labeling on the scaled image of the circuit board to be tested in the present application. In step a4, the server performs defect identification and defect labeling on the scaled circuit board image to be tested based on the first number of pixel features, the second number of pixel features and the similarity of at least one feature information corresponding to each pair of pixel points to obtain a defect detection result, which can be realized specifically by the following steps:
and b1, traversing and identifying each pixel point in the scaled circuit board image to be detected based on the first number of pixel features, the second number of pixel features and the similarity of at least one feature information corresponding to each pair of pixel points to obtain a defect identification result.
In some embodiments, the server inputs the pixel characteristics of the first channel number of the circuit board image to be tested, the pixel characteristics of the second channel number of the sample circuit board image and the similarity of at least one characteristic information corresponding to the image into a trained convolutional neural network model, and performs traversal on each pixel point in the scaled circuit board image to identify whether the pixel point belongs to the pixel point corresponding to the defect characteristic.
Step b2: and marking the corresponding pixel point areas based on the defect identification result to obtain a defect detection result.
In some embodiments, if the convolutional neural network model traverses and identifies that a part of the corresponding pixel points in the scaled circuit board image to be detected are pixel points corresponding to the defect feature, the convolutional neural network model marks the pixel point area of the part, and finally the convolutional neural network model outputs the scaled circuit board image to be detected after marking to the server to be used as a defect detection result.
In some embodiments, the scaled circuit board image to be measured after labeling includes labeling the pixel point region corresponding to the defect feature by the convolutional neural network model through selecting or adding a specific color, and the adjacent region of the labeling region is also labeled with the position information of the pixel point region corresponding to the defect feature.
In some embodiments, as shown in fig. 7, a second defect detection method based on feature correlation is provided, and the method is applied to the server 104 in fig. 1 for illustration, and the method includes the following steps:
step S21, traversing whether the similarity of the corresponding same region between the zoomed circuit board image to be tested and the sample circuit board image meets a preset threshold value or not by utilizing the sample circuit board image.
In some embodiments, the sample circuit board image is any one of a pre-set captured image of a defect-free circuit board and a design image of a circuit board to be tested. The design image of the circuit board to be tested is an image of a designed non-defective circuit board.
In some embodiments, the server traverses sample circuit board images designed to be defect free to each identical region of the circuit board image under test matching identical pixel sizes. Wherein the matching process includes determining whether the similarity of each of the identical regions thereof satisfies a preset threshold.
And S22, if the preset threshold value is not met, marking an image area which corresponds to the preset threshold value not met in the zoomed circuit board image to be detected as a defect area in the zoomed circuit board image to be detected.
In some embodiments, if the server determines that the similarity of the region corresponding to the same region as the sample circuit board image in the region of at least one part of the circuit board image to be tested does not meet the preset threshold requirement, the server marks the region of at least one part of the zoomed circuit board image to be tested, and uses the marked region as a defect region in the circuit board image to be tested.
In some embodiments, the sample circuit board image may be an acquisition image of a preset defective circuit board. The defective circuit board is a circuit board that a design engineer previously makes a plurality of known defects on the circuit board, i.e. the sample circuit board can be regarded as a defective sample template.
In some embodiments, the server may traverse each pixel area in the scaled image of the circuit board to be tested by using the collected image of the defective circuit board, and annotate the image area in the scaled image of the circuit board to be tested that matches the collected image, as the defective area in the scaled image of the circuit board to be tested.
Specifically, the server traverses a sample circuit board image designed as a defect sample template through each identical region of the scaled circuit board image under test that matches the same pixel size. Wherein the matching process includes determining whether the similarity of each of the identical regions thereof satisfies a preset threshold.
Further, if the server determines that the similarity of the region, corresponding to the sample circuit board image, in the region of at least one part of the zoomed circuit board image to be detected meets the preset threshold requirement, the server marks the region of the at least one part of the zoomed circuit board image to be detected, and takes the marked region as a defect region in the circuit board image to be detected.
In some embodiments, referring to fig. 8, fig. 8 is a flow chart illustrating an embodiment of updating a defective circuit board in the present application. After the server marks the image area matched with the acquired image in the zoomed circuit board image to be detected, the following implementation process can be specifically performed:
and c1, extracting an image area matched with the acquired image.
In some embodiments, the server extracts the noted image region matching the captured image from the scaled circuit board image to be tested.
And c2, performing one or more image processing of turning, rotating, amplifying, shrinking and chromaticity adjustment on the extracted image area to obtain a plurality of extended image areas.
In some embodiments, the server may generate the extracted multiple image areas into corresponding multiple images to be trained through an image processing program carried by the server device, or the optical detection device, and send the multiple images to a third party mechanism (such as an image processing platform, a cloud server, etc.) to perform one or more image processing of flipping, rotating, zooming in, zooming out, and chromaticity adjustment on the multiple images to be trained, so as to obtain multiple extended image areas.
And c3, updating the preset defect circuit board by utilizing a plurality of extended image areas.
In some embodiments, the server adds the resulting plurality of expanded image regions to a sample circuit board image designed as a defective sample template to update the sample circuit board image. The sample circuit board image may have one or more sample circuit board images, that is, the obtained plurality of expanded image areas may be partially added to one sample circuit board image, and another part may be added to other sample circuit board images. The specific manner steps for updating the predetermined defective circuit board are specifically defined herein.
In order to more clearly illustrate the defect detection method based on the feature correlation provided in the embodiments of the present disclosure, a specific embodiment of the defect detection method based on the feature correlation is described below. In an exemplary embodiment, referring to fig. 9, fig. 9 is a flowchart of a second feature correlation-based defect detection method provided in an embodiment of the present application, where the feature correlation-based defect detection method is used in the server 104, and specifically includes the following:
step S31: the server extracts the characteristic information of the defect map and the characteristic information of the standard map.
And the server photographs and takes an image of the PCB through the AOI to obtain an AOI image of the defect map. Or shooting and taking an image of the PCB through the AVI to obtain an AVI image of the defect map. The defect map image to be detected may be black and white or may be colored.
The server extracts the feature information of the defect map and the standard map through the neural network, and the server may perform feature extraction on the defect map and the standard map by using the convolutional neural network to obtain feature maps corresponding to the defect map and the standard map as feature information corresponding to the defect map and the standard map.
The standard graph refers to a mother graph without defects corresponding to the defect graph, and may be a design graph or a CAM graph.
The feature extraction refers to extracting image information by using a computer, and determining whether points of each image belong to one image feature. The result of feature extraction is to divide the points on the image into different subsets, which often belong to isolated points, continuous curves or continuous areas. Common image features are color features, texture features, shape features, and spatial relationship features.
The embodiment of the application performs feature extraction on the AOI image to be detected, the black-and-white AVI image and the color AVI image, wherein different networks can be used for extracting different features.
Illustratively, the extracted features include color features and shape features of the image. The color characteristics can be represented by a color correlation diagram, and the color correlation diagram is another expression mode of image color distribution, not only characterizes the pixel ratio of a certain color, but also expresses the spatial relationship of the color along with the distance transformation, and reflects the spatial relationship among the colors. Shape features are represented in two classes, one is outline features and the other is region features. The contour features of the image are mainly directed to the outer boundary of the object, whereas the region features of the image are related to the whole shape region. The specific feature representation method is not limited in this application.
Step S32: the server scales the feature graphs corresponding to the feature information of the defect graph and the standard graph to the same size.
The server takes the feature graphs corresponding to the defect graphs and the standard graphs as feature information of the defect graphs and the standard graphs.
In some embodiments, the server may scale the feature maps of both by interpolation. Among other things, interpolation algorithms can include two classes: adaptive classes and non-adaptive classes. The adaptive approach may vary depending on the content of the interpolation (e.g., sharp edges included in the feature map or smooth textures), and the non-adaptive approach requires the same scaling of all pixels in the feature map.
Wherein the non-adaptive algorithm comprises: nearest neighbors, bilinear, bicubic, spline, sinc, lanczos, etc.
Wherein, because the complexity of the feature graphs corresponding to the defect graph and the standard graph is different, the server uses from 0 to 256 (or more) adjacent pixels for the features in the feature graphs through the interpolation algorithm, that is, the more adjacent pixels contained in the interpolation of the features, the more accurate the distorted or scaled image, but the longer the time spent.
Step S33: and the server calculates the correlation characteristic on each pixel in the feature map corresponding to the defect map and the standard map according to the feature map after the size is scaled.
The correlation feature on each pixel comprises cosine similarity on the same pixel corresponding to the defect map and the standard map.
The cosine similarity measures the similarity between two vector inner product spaces by measuring the cosine values of the two vector inner product spaces, and is suitable for vector comparison of any dimension, so that the method belongs to a high-dimensional space and applies more machine learning algorithms. The digital image contains more feature codes, the feature groups belong to a high-dimensional space, the server converts the feature groups of each image into vectors of the high-dimensional space, and cosine values of angles between the two vectors can be used for determining whether the two vectors point to the same direction approximately.
In the embodiment of the application, the correlation characteristic on each pixel is determined by calculating the cosine value of the included angle of the inner product space of the vector representing the characteristic of each pixel.
Step S34: the server inputs the correlation characteristic containing each pixel into the trained neural network for defect detection so as to output a defect detection result.
The defect detection result comprises detection result information such as the type, the size, the position and the like of the defect in the defect map.
The server inputs the scaled defect map and standard map with the size of one quarter or one eighth of the original map corresponding to the correlation feature on the same pixel and the feature channel number (256 or 512) of the corresponding image into the neural network together for defect detection, so as to output a new defect map with the same size and with detection marks, wherein the new defect map is the defect detection result.
As an example, the server extracts a (channel) features from the defect map, extracts B (channel) features from the standard map, uses the similarity feature of the pixels as 1 (channel) feature, and finally, inputs the a+b+1 (channel) features into the neural network for comparison and judgment, so as to obtain the defect result.
It should be understood that, although the steps in the flowcharts of fig. 2-9 are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least a portion of the steps of fig. 2-9 may include multiple steps or stages that are not necessarily performed at the same time, but may be performed at different times, nor does the order in which the steps or stages are performed necessarily occur sequentially, but may be performed alternately or alternately with at least a portion of the steps or stages in other steps or other steps.
It should be understood that the same/similar parts of the embodiments of the method described above in this specification may be referred to each other, and each embodiment focuses on differences from other embodiments, and references to descriptions of other method embodiments are only needed.
Fig. 10 is a block diagram of a defect detection device based on feature correlation according to an embodiment of the present application. Referring to fig. 10, the defect detecting apparatus 10 based on the characteristic correlation includes:
An acquisition unit 11 for acquiring a board image to be tested and a sample board image;
an extracting unit 12 for extracting first characteristic information of the circuit board image to be tested and second characteristic information of the sample circuit board image;
a detecting unit 13, configured to detect a defect of the circuit board image to be detected based on the correlation feature between the first feature information and the second feature information, so as to obtain a defect detection result; the correlation features are used for representing the same degree of corresponding same areas between the circuit board image to be tested and the sample circuit board image.
In some embodiments, after acquiring the circuit board image to be tested and the sample circuit board image, the feature correlation-based defect detection device 10 is further specifically configured to:
scaling the circuit board image to be tested and the sample circuit board image to obtain a scaled circuit board image to be tested and a sample circuit board image with the same pixel size.
In some embodiments, the extracting unit 12 is specifically configured to, in extracting first feature information of the circuit board image to be tested and second feature information of the sample circuit board image:
and extracting the first characteristic information of the scaled circuit board image to be tested and the second characteristic information of the scaled sample circuit board image.
In some embodiments, in terms of performing defect detection on the image of the circuit board to be detected based on the correlation feature between the first feature information and the second feature information to obtain a defect detection result, the detection unit 13 is specifically configured to:
determining a correlation feature between the first feature information and the second feature information;
and performing defect detection on the scaled circuit board image to be detected according to the correlation characteristics to obtain a defect detection result.
In some embodiments, in determining a correlation characteristic between the first characteristic information and the second characteristic information, the detection unit 13 is specifically configured to:
determining each pair of pixel points corresponding to the same pixel point position between the zoomed circuit board image to be detected and the zoomed sample circuit board image;
and calculating the similarity of each pair of pixel points corresponding to at least one piece of characteristic information based on the first characteristic information and the second characteristic information.
The first characteristic information and the second characteristic information comprise at least one of color characteristics, texture characteristics, shape characteristics and spatial relation characteristics at positions of corresponding pixels of the image.
In some embodiments, in terms of performing defect detection on the scaled circuit board image to be tested according to the correlation characteristics to obtain a defect detection result, the detection unit 13 is specifically configured to:
Determining that the scaled circuit board image to be tested corresponds to a first number of pixel features and the scaled sample circuit board image corresponds to a second number of pixel features;
and performing defect identification and defect labeling on the scaled circuit board image to be detected based on the first number of pixel features, the second number of pixel features and the similarity of at least one feature information corresponding to each pair of pixel points to obtain a defect detection result.
In some embodiments, in terms of performing defect recognition and defect labeling on the scaled circuit board image to be tested based on the first number of pixel features, the second number of pixel features and the similarity of at least one feature information corresponding to each pair of pixel points to obtain a defect detection result, the detection unit 13 is specifically configured to:
traversing and identifying each pixel point in the zoomed circuit board image to be detected based on the first number of pixel features, the second number of pixel features and the similarity of at least one feature information corresponding to each pair of pixel points to obtain a defect identification result;
and marking the corresponding pixel point areas based on the defect identification result to obtain a defect detection result.
In some embodiments, the defect detection device 10 based on feature correlation is specifically further configured to:
Traversing whether the similarity of the corresponding same region between the zoomed circuit board image to be tested and the sample circuit board image meets a preset threshold value or not by utilizing the sample circuit board image;
if the preset threshold value is not met, marking an image area corresponding to the preset threshold value which is not met in the zoomed circuit board image to be measured as a defect area in the zoomed circuit board image to be measured.
The sample circuit board image is any one of a preset collection image of a defect-free circuit board and a design image of a circuit board to be tested.
In some embodiments, the defect detection device 10 based on feature correlation is specifically further configured to:
and traversing each pixel point area in the zoomed circuit board image to be detected by utilizing the acquired image of the defect circuit board, and marking an image area matched with the acquired image in the zoomed circuit board image to be detected as the defect area in the zoomed circuit board image to be detected.
The sample circuit board image is an acquisition image of a preset defect circuit board.
In some embodiments, the defect detection device 10 based on feature correlation is specifically further configured to:
after labeling the image area matched with the acquired image in the zoomed circuit board image to be detected, extracting the image area matched with the acquired image;
One or more image processing of turning, rotating, amplifying, shrinking and chromaticity adjustment is carried out on the extracted image areas, so that a plurality of extended image areas are obtained;
and updating the preset defect circuit board by utilizing the plurality of expanded image areas.
The specific manner in which the various modules perform the operations in the apparatus of the above embodiments have been described in detail in connection with the embodiments of the method, and will not be described in detail herein.
Fig. 11 is a block diagram of an electronic device 20 provided in an embodiment of the present application. For example, the electronic device 20 may be a server. Referring to fig. 11, the electronic device 20 comprises a processor 21, which further processor 21 may be a processor set, which may comprise one or more processors, and the electronic device 20 comprises memory resources represented by a memory 22, wherein the memory 22 has stored thereon a computer program, such as an application program. The computer program stored in the memory 22 may include one or more modules each corresponding to a set of executable instructions. Furthermore, the processing component 21 is configured to implement the defect detection method based on feature correlation as described above when executing a computer program.
In some embodiments, electronic device 20 is a server in which a computing system may run one or more operating systems, including any of the operating systems discussed above, as well as any commercially available server operating systems. The server may also run any of a variety of additional server applications and/or middle tier applications, including HTTP (hypertext transfer protocol) servers, FTP (file transfer protocol) servers, CGI (common gateway interface) servers, database servers, and the like. Exemplary database servers include, but are not limited to, those commercially available from (International Business machines) and the like.
In some embodiments, the processing component 21 generally controls overall operation of the electronic device 20, such as operations associated with display, data processing, data communication, and recording operations. The processing component 21 may include one or more processors to execute computer programs to perform all or part of the steps of the methods described above. Further, the processing component 21 may include one or more modules that facilitate interactions between the processing component 21 and other components. For example, the processing component 21 may include a multimedia module to facilitate controlling interactions between the consumer electronic device and the processing component 21 with the multimedia component.
In some embodiments, the processor in the processing component 21 may also be referred to as a CPU (Central Processing Unit ). The processor may be an electronic chip with signal processing capabilities. The processor may also be a general purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC), a Field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. In addition, the processor may be commonly implemented by an integrated circuit chip.
In some embodiments, memory 22 is configured to store various types of data to support operations at electronic device 20. Examples of such data include instructions, collected data, messages, pictures, videos, etc. for any application or method operating on electronic device 20. The memory 22 may be implemented by any type of volatile or non-volatile memory device or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, optical disk, or graphene memory.
In some embodiments, the memory 22 may be a memory bank, a TF card, or the like, and may store all information in the electronic device 20, including input raw data, computer programs, intermediate operation results, and final operation results, all stored in one embodiment, the memory 22. It stores and retrieves information based on the location specified by the processor. With the memory 22, the electronic device 20 has a memory function to ensure proper operation in one embodiment. In one embodiment of the electronic device 20, the memory 22 may be divided into a main memory (memory) and an auxiliary memory (external memory) according to purposes, and there is a classification method of dividing the main memory into an external memory and an internal memory. The external memory is usually a magnetic medium, an optical disk, or the like, and can store information for a long period of time. The memory refers to a storage component on the motherboard for storing data and programs currently being executed, but is only used for temporarily storing programs and data, and the data is lost when the power supply is turned off or the power is turned off.
In some embodiments, the electronic device 20 may further include: the power supply assembly 23 is configured to perform power management of the electronic device 20, and the wired or wireless network interface 24 is configured to connect the electronic device 20 to a network, and an input output (I/O) interface 25. The electronic device 20 may operate based on an operating system stored in the memory 22, such as Windows Server, mac OS X, unix, linux, freeBSD, or the like.
In some embodiments, power supply assembly 23 provides power to the various components of electronic device 20. Power supply components 23 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 20.
In some embodiments, wired or wireless network interface 24 is configured to facilitate wired or wireless communication between electronic device 20 and other devices. The electronic device 20 may access a wireless network based on a communication standard, such as WiFi, an operator network (e.g., 2G, 3G, 4G, or 5G), or a combination thereof.
In some embodiments, the wired or wireless network interface 24 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the wired or wireless network interface 24 also includes a Near Field Communication (NFC) module to facilitate short range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
In some embodiments, input output (I/O) interface 25 provides an interface between processing component 21 and a peripheral interface module, which may be a keyboard, click wheel, button, or the like. These buttons may include, but are not limited to: homepage button, volume button, start button, and lock button.
Fig. 12 is a block diagram of a computer-readable storage medium 30 provided in an embodiment of the present application. The computer readable storage medium 30 has stored thereon a computer program 31, wherein the computer program 31, when executed by a processor, implements the feature correlation-based defect detection method as described above.
The units integrated with the functional units in the various embodiments of the present application may be stored in the computer-readable storage medium 30 if implemented in the form of software functional units and sold or used as separate products. Based on such understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or all or part of the technical solution, or in a software product, and the computer readable storage medium 30 includes several instructions in a computer program 31 to enable a computer device (may be a personal computer, a system server, or a network device, etc.), an electronic device (such as MP3, MP4, etc., also may be a smart terminal such as a mobile phone, a tablet computer, a wearable device, etc., also may be a desktop computer, etc.), or a processor (processor) to perform all or part of the steps of the methods of the embodiments of the present application.
Fig. 13 is a block diagram of a computer program product 40 provided by an embodiment of the present application. The computer program product 40 comprises program instructions 41, which program instructions 41 are executable by a processor of the electronic device 20 for implementing the feature correlation based defect detection method as described above.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided with a feature correlation-based defect detection method, a feature correlation-based defect detection apparatus 10, an electronic device 20, a computer-readable storage medium 30, or a computer program product 40. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product 40 embodied on one or more computer program instructions 41 (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of feature correlation-based defect detection methods, feature correlation-based defect detection apparatus 10, electronic device 20, computer-readable storage medium 30, or computer program product 40 according to embodiments of the application. It will be understood that each flowchart and/or block of the flowchart illustrations and/or block diagrams, and combinations of flowcharts and/or block diagrams, can be implemented by computer program product 40. These computer program products 40 may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the program instructions 41, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program products 40 may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the program instructions 41 stored in the computer program product 40 produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These program instructions 41 may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the program instructions 41 which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that the descriptions of the above methods, apparatuses, electronic devices, computer-readable storage media, computer program products and the like according to the method embodiments may further include other implementations, and specific implementations may refer to descriptions of related method embodiments, which are not described herein in detail.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This disclosure is intended to cover any adaptations, uses, or adaptations of the disclosure following the general principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It is to be understood that the present disclosure is not limited to the precise arrangements and instrumentalities shown in the drawings, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (11)

1. A defect detection method based on feature correlation, comprising:
acquiring a circuit board image to be tested and a sample circuit board image;
extracting first characteristic information of the circuit board image to be detected and second characteristic information of the sample circuit board image;
performing defect detection on the circuit board image to be detected based on the correlation characteristic between the first characteristic information and the second characteristic information to obtain a defect detection result; the correlation feature is used for representing the same degree of the corresponding same area between the circuit board image to be tested and the sample circuit board image.
2. The method of claim 1, wherein after the obtaining the circuit board image to be tested and the sample circuit board image, the method further comprises:
scaling the circuit board image to be tested and the sample circuit board image to obtain a scaled circuit board image to be tested and a sample circuit board image with the same pixel size;
the extracting the first characteristic information of the circuit board image to be detected and the second characteristic information of the sample circuit board image includes:
extracting first characteristic information of the scaled circuit board image to be tested and second characteristic information of the scaled sample circuit board image;
performing defect detection on the circuit board image to be detected based on the correlation characteristic between the first characteristic information and the second characteristic information to obtain a defect detection result, wherein the defect detection result comprises:
determining a correlation feature between the first feature information and the second feature information;
and performing defect detection on the scaled circuit board image to be detected according to the correlation characteristics to obtain a defect detection result.
3. The method of claim 2, wherein the first feature information and the second feature information each include at least one of a color feature, a texture feature, a shape feature, and a spatial relationship feature at a location of a corresponding pixel point of the image;
The determining a correlation feature between the first feature information and the second feature information includes:
determining each pair of pixel points corresponding to the same pixel point position between the scaled circuit board image to be detected and the scaled sample circuit board image;
and calculating the similarity of at least one characteristic information corresponding to each pair of pixel points based on the first characteristic information and the second characteristic information.
4. The method of claim 3, wherein performing defect detection on the scaled circuit board image to be tested according to the correlation characteristic to obtain a defect detection result comprises:
determining a first number of pixel features corresponding to the scaled circuit board image to be tested and a second number of pixel features corresponding to the scaled sample circuit board image;
and performing defect identification and defect labeling on the scaled circuit board image to be detected based on the first number of pixel features, the second number of pixel features and the similarity of at least one feature information corresponding to each pair of pixel points to obtain a defect detection result.
5. The method of claim 4, wherein performing defect recognition and defect labeling on the scaled circuit board image to be tested based on the first number of pixel features, the second number of pixel features, and the similarity of at least one feature information corresponding to each pair of pixel points to obtain a defect detection result comprises:
Traversing and identifying each pixel point in the scaled circuit board image to be detected based on the first number of pixel features, the second number of pixel features and the similarity of at least one feature information corresponding to each pair of pixel points to obtain a defect identification result;
and marking the corresponding pixel point areas based on the defect identification result to obtain a defect detection result.
6. The method of claim 2, wherein the sample circuit board image is any one of a preset collection image of a defect-free circuit board and a design image of the circuit board to be tested;
the method further comprises the steps of:
traversing whether the similarity of the corresponding same region between the zoomed circuit board image to be tested and the sample circuit board image meets a preset threshold value or not by utilizing the sample circuit board image;
if the preset threshold value is not met, marking an image area which corresponds to the preset threshold value not met in the zoomed circuit board image to be detected as a defect area in the zoomed circuit board image to be detected.
7. The method of claim 2, wherein the sample circuit board image is an acquisition image of a pre-set defective circuit board;
The method further comprises the steps of:
and traversing each pixel point area in the zoomed circuit board image to be detected by utilizing the acquired image of the defect circuit board, and marking an image area matched with the acquired image in the zoomed circuit board image to be detected as the defect area in the zoomed circuit board image to be detected.
8. The method of claim 7, wherein after said labeling the image area in the scaled circuit board image to be tested that matches the captured image, the method further comprises:
extracting an image area matched with the acquired image;
performing one or more of image processing of turning, rotating, amplifying, shrinking and chromaticity adjustment on the extracted image area to obtain a plurality of extended image areas;
and updating the preset defect circuit board by utilizing the plurality of extended image areas.
9. A defect detection apparatus based on feature correlation, comprising:
the acquisition unit is used for acquiring the circuit board image to be detected and the sample circuit board image;
the extraction unit is used for extracting first characteristic information of the circuit board image to be detected and second characteristic information of the sample circuit board image;
The detection unit is used for carrying out defect detection on the circuit board image to be detected based on the correlation characteristic between the first characteristic information and the second characteristic information to obtain a defect detection result; the correlation feature is used for representing the same degree of the corresponding same area between the circuit board image to be tested and the sample circuit board image.
10. An electronic device comprising a memory storing a computer program and a processor implementing the feature correlation-based defect detection method as claimed in any one of claims 1 to 8 when the computer program is executed.
11. A computer-readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the feature correlation-based defect detection method as claimed in any one of claims 1 to 8.
CN202211592462.8A 2022-12-13 2022-12-13 Defect detection method and related device based on feature correlation Pending CN116152166A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211592462.8A CN116152166A (en) 2022-12-13 2022-12-13 Defect detection method and related device based on feature correlation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211592462.8A CN116152166A (en) 2022-12-13 2022-12-13 Defect detection method and related device based on feature correlation

Publications (1)

Publication Number Publication Date
CN116152166A true CN116152166A (en) 2023-05-23

Family

ID=86357425

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211592462.8A Pending CN116152166A (en) 2022-12-13 2022-12-13 Defect detection method and related device based on feature correlation

Country Status (1)

Country Link
CN (1) CN116152166A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117011304A (en) * 2023-10-08 2023-11-07 深圳思谋信息科技有限公司 Defect detection method, defect detection device, computer equipment and computer readable storage medium
CN117474908A (en) * 2023-12-26 2024-01-30 宁德时代新能源科技股份有限公司 Labeling method, labeling device, labeling equipment and computer-readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117011304A (en) * 2023-10-08 2023-11-07 深圳思谋信息科技有限公司 Defect detection method, defect detection device, computer equipment and computer readable storage medium
CN117011304B (en) * 2023-10-08 2024-03-26 深圳思谋信息科技有限公司 Defect detection method, defect detection device, computer equipment and computer readable storage medium
CN117474908A (en) * 2023-12-26 2024-01-30 宁德时代新能源科技股份有限公司 Labeling method, labeling device, labeling equipment and computer-readable storage medium
CN117474908B (en) * 2023-12-26 2024-05-28 宁德时代新能源科技股份有限公司 Labeling method, labeling device, labeling equipment and computer-readable storage medium

Similar Documents

Publication Publication Date Title
US9727775B2 (en) Method and system of curved object recognition using image matching for image processing
JP5699788B2 (en) Screen area detection method and system
CN116152166A (en) Defect detection method and related device based on feature correlation
CN111091590B (en) Image processing method, device, storage medium and electronic equipment
US20140270362A1 (en) Fast edge-based object relocalization and detection using contextual filtering
EP3561776A1 (en) Method and apparatus for processing a 3d scene
CN114399502A (en) Appearance defect detection method and system suitable for LED chip and storage medium
CN114298902A (en) Image alignment method and device, electronic equipment and storage medium
CN113066088A (en) Detection method, detection device and storage medium in industrial detection
CN112435223A (en) Target detection method, device and storage medium
CN113947613B (en) Target area detection method, device, equipment and storage medium
CN116977341A (en) Dimension measurement method and related device
CN117218633A (en) Article detection method, device, equipment and storage medium
CN115546219B (en) Detection plate type generation method, plate card defect detection method, device and product
US20230016350A1 (en) Configurable keypoint descriptor generation
CN110610178A (en) Image recognition method, device, terminal and computer readable storage medium
CN110717060A (en) Image mask filtering method and device and storage medium
CN111476056A (en) Target object identification method and device, terminal equipment and computer storage medium
CN114494751A (en) License information identification method, device, equipment and medium
CN116152586A (en) Model training method and device, electronic equipment and storage medium
CN113780269A (en) Image recognition method, device, computer system and readable storage medium
Jang et al. Stroke-based semi-automatic region of interest detection algorithm for in-situ painting recognition
CN116091419A (en) Defect identification method and device based on similarity, electronic equipment and storage medium
CN113055599B (en) Camera switching method and device, electronic equipment and readable storage medium
TWI776668B (en) Image processing method and image processing system

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