CN115272350A - Method for detecting production quality of computer PCB mainboard - Google Patents

Method for detecting production quality of computer PCB mainboard Download PDF

Info

Publication number
CN115272350A
CN115272350A CN202211207713.6A CN202211207713A CN115272350A CN 115272350 A CN115272350 A CN 115272350A CN 202211207713 A CN202211207713 A CN 202211207713A CN 115272350 A CN115272350 A CN 115272350A
Authority
CN
China
Prior art keywords
pixel point
defect
pcb
value
edge
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
CN202211207713.6A
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.)
Jiangsu Baoyi Communication Technology Co ltd
Original Assignee
Jiangsu Baoyi Communication 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 Jiangsu Baoyi Communication Technology Co ltd filed Critical Jiangsu Baoyi Communication Technology Co ltd
Priority to CN202211207713.6A priority Critical patent/CN115272350A/en
Publication of CN115272350A publication Critical patent/CN115272350A/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
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/54Extraction of image or video features relating to texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/56Extraction of image or video features relating to colour
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • G06V10/765Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects using rules for classification or partitioning the feature space
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • 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/10024Color image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • 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]

Abstract

The invention relates to the technical field of data processing, in particular to a method for detecting the production quality of a computer PCB mainboard. The method is characterized in that a data processing method after the data are acquired is improved, the threshold value of the existing LBP algorithm is changed, color characteristic information is added to complete defect type judgment, and edge gradient characteristic information of a defect area is additionally acquired. The method provided by the invention solves the problem of insufficient accuracy when the existing LBP algorithm is used for detecting the quality of the PCB through the improvement of the data processing method, and solves the technical problem that the LBP algorithm cannot meet the accuracy requirement when the quality of the PCB is detected.

Description

Method for detecting production quality of computer PCB mainboard
Technical Field
The invention relates to the technical field of data processing, in particular to a method for detecting the production quality of a computer PCB mainboard.
Background
The PCB is the most basic component in an electronic product, and its function is mainly to perform insulation or connection of the component. With the increase of the number of layers and the improvement of the integration degree of the PCB, the probability of quality defects and the number of types of defects in the production process are obviously improved, so that the quality detection of the PCB is more and more important.
The traditional method for detecting the defects of the PCB mainly depends on visual detection and electric contact test of detection personnel, the detection result is influenced by artificial subjectivity, the detection cost is high, and the efficiency and the precision are low. Therefore, the prior art provides a PCB quality detection method based on pattern feature recognition, which includes a method for completing PCB quality detection by extracting image features through an LBP algorithm, but in the practical application process, it is found that the accuracy of performing quality detection on a PCB by using the existing LBP algorithm is not high, and the existing method for detecting the PCB quality by using the LBP algorithm to acquire feature information in a PCB pattern cannot meet the current detection accuracy requirement.
Disclosure of Invention
In order to solve the problem that the current LBP algorithm can not meet the requirement of PCB quality detection accuracy, the invention provides a method for detecting the production quality of a computer PCB mainboard, which adopts the following technical scheme:
the invention discloses a method for detecting the production quality of a computer PCB mainboard, which comprises the following steps:
acquiring a PCB mainboard surface image, determining whether the surface of the PCB mainboard has a defect according to the PCB mainboard surface image, and determining a defect area when the defect exists;
determining a window with a set size by taking any pixel point in a defect area of a gray image on the surface of a PCB (printed circuit board) as a central pixel point, calculating the mean value of the difference value of the gray value of each pixel point on the edge of the window and the gray value of the central pixel point, and calculating the LBP (local binary pattern) value of the central pixel point by taking the mean value as a threshold value:
Figure 3013DEST_PATH_IMAGE002
Figure 750389DEST_PATH_IMAGE004
Figure 755865DEST_PATH_IMAGE006
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE007
the gray value of the ith pixel point on the edge of the window,
Figure 170665DEST_PATH_IMAGE008
is the gray value of the central pixel point in the window, M is the threshold value, P is the total number of the pixel points on the edge of the window,
Figure DEST_PATH_IMAGE009
is a threshold function;
performing Lab space conversion on the surface image of the PCB mainboard, and obtaining characteristic values representing the texture characteristic information and the color characteristic information of the window simultaneously according to the LBP value and the color information of the central pixel point of the window:
Figure DEST_PATH_IMAGE011
Figure DEST_PATH_IMAGE013
Figure DEST_PATH_IMAGE015
wherein, LBPC is the characteristic value which represents the window texture characteristic information and the color characteristic information at the same time,
Figure 34585DEST_PATH_IMAGE016
the LBP value for the pixel point in the center of the window,
Figure DEST_PATH_IMAGE017
representing the color values of the various pixel points within the window,
Figure 675782DEST_PATH_IMAGE018
is the color value of the pixel point in the center of the window,
Figure DEST_PATH_IMAGE019
the average value of the deviation degree of the color value of each pixel point on the edge of the window relative to the color value of the central pixel point is shown, L represents the brightness dimension, and a and b represent the color opposite dimension;
and (3) the characteristic values obtained by all the pixel points in the defect area are the characteristic information of the defect area, the characteristic information is input into the trained neural network to determine and classify the defects, a PCB mainboard production quality evaluation value is obtained, and PCB mainboard production quality detection is completed.
The beneficial effects of the invention are as follows:
when the LBP value of the central pixel point is calculated, local binaryzation of other pixel points in a window is not completed by directly taking the gray value of the central pixel point as a threshold value and judging whether the gray values of other pixel points in the window of the central pixel point are larger than the threshold value, but the local binaryzation of other pixel points in the window is completed by taking the mean value of difference values between the gray value of the central pixel point and the gray values of other pixel points in the window as the threshold value and judging whether the difference value between the gray values of other pixel points in the window and the gray value of the central pixel point is larger than the threshold value, so that the pixel points with smaller gray difference compared with the central pixel point in the window are eliminated, the pixel points with larger gray difference compared with the central pixel points in the window are highlighted, the texture window characterization effect is improved, and the calculated amount is reduced; meanwhile, the color deviation degree information in the window, namely the color information, is added in the application process of the LBP algorithm, so that the defect characteristics are more effectively represented, and the classification judgment accuracy of the defect area is further improved.
Further, the feature information further includes edge gradient feature information of the defect region, and the determining method of the edge gradient feature information of the defect region is as follows:
performing edge detection on a gray image on the surface of a PCB (printed circuit board), determining the edge of a defect area, randomly selecting a pixel point Q on the edge of the defect area, determining a neighborhood of the set size of the pixel point Q, removing all pixel points belonging to the defect edge in the neighborhood to obtain two new neighborhoods which are a defect neighborhood and a normal neighborhood respectively;
and (3) calculating the difference C between any pixel point W in the defect neighborhood and a pixel point Q on the edge of the defect neighborhood:
Figure DEST_PATH_IMAGE021
wherein the content of the first and second substances,
Figure 473230DEST_PATH_IMAGE022
is the gray value of the pixel point W in the defect neighborhood,
Figure DEST_PATH_IMAGE023
is a defectThe gray value of the pixel point Q on the edge of the region,
Figure 962111DEST_PATH_IMAGE024
and
Figure DEST_PATH_IMAGE025
respectively the brightness information of a pixel point W in a defect neighborhood and a pixel point Q on the edge of the defect area in a Lab space,
Figure 590408DEST_PATH_IMAGE026
and
Figure DEST_PATH_IMAGE027
respectively the color components from green to red of a pixel point W in a defect neighborhood under a Lab space and a pixel point Q on the edge of the defect area,
Figure 158049DEST_PATH_IMAGE028
and
Figure DEST_PATH_IMAGE029
respectively representing color components from blue to yellow of a pixel point W in a defect neighborhood under Lab space and a pixel point Q on the edge of the defect area;
determining the pixel E with the maximum difference C between the defect neighborhood and the pixel Q, and obtaining the first feature vector of the pixel Q
Figure 913515DEST_PATH_IMAGE030
Figure 319220DEST_PATH_IMAGE032
Wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE033
the coordinates of the pixel point E are the coordinates,
Figure 931467DEST_PATH_IMAGE034
the coordinates of the pixel point Q are obtained;
accordingly, can be rightObtaining a second feature vector of the pixel point Q in the normal neighborhood
Figure DEST_PATH_IMAGE035
That is, the pixel point Q on the edge of the defect region corresponds to two feature vectors, and the feature vectors of all the pixel points on the edge of the defect region are the edge gradient feature information of the defect region.
Further, the specific method for determining whether the surface of the PCB main board has a defect according to the image of the surface of the PCB main board and determining the defect area when the defect exists includes:
graying the PCB mainboard surface image to obtain a PCB mainboard surface gray image, subtracting the PCB mainboard surface gray image from a standard PCB mainboard surface gray image without surface defects to obtain a difference image, and binarizing the difference image, wherein the difference area is marked as 1, and the rest areas are marked as 0 to obtain a binary image;
and if the gray values of all pixel points of the binary image are 0, the surface of the PCB does not have a defect, otherwise, the surface of the PCB has a defect, and the binary image is multiplied by the surface image of the PCB to finish marking the position of the defect on the surface image of the PCB.
Further, the evaluation value of the production quality of the PCB main board is:
Figure DEST_PATH_IMAGE037
wherein Z is the evaluation value of PCB mainboard production quality,
Figure 717895DEST_PATH_IMAGE038
the weights corresponding to different kinds of defects on the surface of the PCB main board,
Figure DEST_PATH_IMAGE039
the area of the ith defect area on the surface of the PCB mainboard, and n is the total number of the defects on the surface of the PCB mainboard.
Drawings
FIG. 1 is a flow chart of the method for detecting the production quality of a computer PCB mainboard of the present invention;
fig. 2 is a schematic diagram of the improved circular LBP algorithm of the present invention.
Detailed Description
The following describes a method for detecting the production quality of a computer PCB motherboard in detail with reference to the accompanying drawings and embodiments.
The method comprises the following steps:
the embodiment of the method for detecting the production quality of the computer PCB mainboard has the overall flow shown in figure 1, and the specific process comprises the following steps:
1. and acquiring a surface image of the PCB mainboard by using image acquisition equipment, and determining a surface defect area of the PCB mainboard.
The method comprises the steps of adopting related electronic equipment such as an industrial camera to obtain a surface image of a PCB main board, and carrying out gray processing on the obtained surface image by using a weighted average method to obtain a gray image of the surface of the PCB main board. Of course, other graying methods known in the art can be used in other embodiments.
And (3) subtracting the PCB mainboard surface gray level image after filtering and denoising with a standard PCB mainboard surface gray level image without surface defects to obtain a difference image, and performing binarization processing on the difference image, wherein the difference area is marked as 1, and the rest areas are marked as 0 to obtain a binary image. If the surface of the PCB mainboard has no defect, the gray values of all pixel points of the binary image at the moment are all 0, otherwise, an area with the gray value of 1 exists. And multiplying the binary image by the acquired PCB mainboard surface image to finish marking the defect position on the acquired PCB mainboard surface image.
Thus, whether the PCB main board has defects or not is detected, and the positions of the defect areas on the surface are obtained.
2. And extracting texture characteristic information and color characteristic information of the defect area by adopting an improved LBP algorithm.
In the conventional LBP algorithm, a window is selected from a defect area of a surface gray image of a PCB mainboard, a gray value of a central pixel point in the window is used as a threshold, and a neighborhood range around the central pixel point is judged, that is, whether the gray value of each pixel point of the window exceeds a neighborhood or not is judged, if the gray value exceeds the neighborhood, the gray value is marked as 1, otherwise, the gray value is marked as 0, so that an LBP value of the window is obtained, and the obtained LBP value reflects texture information of the window.
The existing LBP algorithm only considers the relationship between a central pixel point and a plurality of neighborhood pixel points in a window, does not consider the action of the central pixel point and the integral difference gradient between the gray value difference values of the central pixel point and the other neighborhood pixel points, and does not consider the color information of the central pixel point, thereby causing the loss of some important local structural feature information and influencing the classification and identification of defects.
Therefore, the embodiment provides an improved LBP algorithm, which considers the gray value gradient and the color information of the central pixel point and its neighborhood.
As shown in fig. 2, the improved LBP algorithm proposed in this embodiment is described by taking a circular LBP algorithm as an example, and other LBP algorithms with other shapes, such as a rectangular LBP algorithm, may be adopted in other embodiments. Defining a window selected in a defect area of a gray image on the surface of a PCB mainboard as a circular field with the radius of R, uniformly distributing P pixels on the circumference of the window, determining neighborhood point pixels on the circumference of the window through trilinear interpolation, and setting parameters P and R according to detection precision and minimum defect size requirements. In this embodiment, P =8 and r =1 are set.
When the improved LBP algorithm of this embodiment is used for encoding, firstly, in the window, the gray value of the central pixel point is sequentially subtracted from the gray values of the pixels in the adjacent neighborhoods, and the absolute value is taken, and then the average of all absolute values is obtained to obtain the threshold M:
Figure 762205DEST_PATH_IMAGE040
wherein, the first and the second end of the pipe are connected with each other,
Figure 537263DEST_PATH_IMAGE007
is the gray value of the ith pixel point on the circumference of the window,
Figure 461357DEST_PATH_IMAGE008
the gray value of the central pixel point in the window is obtained.
And then coding is carried out by comparing the relationship between the difference value of the gray value of each pixel point in the neighborhood and the gray value of the central pixel point and the threshold value M, and the threshold function is obtained as follows:
Figure 206852DEST_PATH_IMAGE004
then the LBP value of the corresponding center pixel point of the window is:
Figure 569701DEST_PATH_IMAGE002
the LBP value of the central pixel point of the window is the LBP value of the window, and the texture characteristic information of the window area is represented.
Because the color separation degree of each layer of the PCB is higher, and the color deviation degree of each type of defects is also higher, a color model is properly established and added into the texture analysis, and the classification precision can be improved.
After Lab space conversion is carried out on the surface image of the PCB mainboard, according to the LBP value and the color information of the central pixel point of the window, the characteristic value which can represent the texture characteristic information and the color characteristic information of the window area at the same time is obtained:
Figure 402528DEST_PATH_IMAGE011
Figure 622156DEST_PATH_IMAGE013
Figure 46491DEST_PATH_IMAGE015
wherein
Figure 150714DEST_PATH_IMAGE016
Being windowsThe value of the LBP is such that,
Figure 634785DEST_PATH_IMAGE017
representing the color values of the various pixel points within the window,
Figure 900681DEST_PATH_IMAGE018
is the color value of the pixel point in the center of the window,
Figure 853725DEST_PATH_IMAGE019
the average value of the deviation degree of each pixel point color value on the neighborhood of the central pixel point in the window relative to the color value of the central pixel point is shown, the larger the average value is, the larger the color deviation degree in the window is, the more obvious the defect characteristics are, L represents the brightness dimension, and a and b represent the opposite dimension of colors.
And calculating the characteristic value LBPC of each window in the defect area to obtain the texture characteristic information and the color characteristic information of the whole defect area.
3. And acquiring edge gradient characteristic information of the defect area.
Detecting and determining the edge of the defect area on the surface gray level image of the PCB mainboard through a canny operator, and assuming that a certain pixel point on the edge is a Q point and the gray value is the gray value
Figure 496058DEST_PATH_IMAGE023
Determining which other pixel points in 5*5 neighborhood of the pixel point Q have and corresponding gray values, removing all pixel points belonging to the edge of the defect region in 5*5 neighborhood, calculating the rest pixel points and the pixel point Q, and determining the gray gradient of the pixel point Q.
The pixel points on all defect edges in the neighborhood divide the 5*5 neighborhood of the Q point into two areas, and can be determined without doubt, wherein one of the two areas belongs to a normal area on the surface of the PCB, and the other area belongs to a defect area, so that one area is the normal neighborhood, and the other area is the defect neighborhood. Assuming that after all edge pixel points in the neighborhood are removed, N non-edge pixel points are left in the neighborhood, wherein the defect neighborhood comprises a pixel points, and the normal neighborhood comprises B pixel points, so that the relationship of A + B = N exists.
And respectively acquiring the maximum gradient direction angle of the defect neighborhood and the normal neighborhood to be used as the angle of the gradient feature vector of the edge pixel point Q.
The acquisition mode is as follows:
and (3) calculating the difference C between any pixel point W in the defect neighborhood and a pixel point Q on the edge of the defect neighborhood:
Figure 303477DEST_PATH_IMAGE021
wherein the content of the first and second substances,
Figure 114176DEST_PATH_IMAGE022
is the gray value of the pixel point W in the defect neighborhood,
Figure 679150DEST_PATH_IMAGE023
the gray value of the pixel point Q at the edge of the defective region,
Figure 984229DEST_PATH_IMAGE024
and
Figure 583838DEST_PATH_IMAGE025
respectively the brightness information of a pixel point W in a defect neighborhood and a pixel point Q on the edge of the defect region in the Lab space,
Figure 270165DEST_PATH_IMAGE026
and
Figure 712648DEST_PATH_IMAGE027
respectively the color components from green to red of the pixel point W in the defect neighborhood and the pixel point Q on the edge of the defect region in the Lab space,
Figure 431205DEST_PATH_IMAGE028
and
Figure 465414DEST_PATH_IMAGE029
respectively in the defect neighborhood under Lab spaceAnd the pixel point W and the pixel point Q on the edge of the defect area have color components from blue to yellow.
Each pixel point in the defect neighborhood has a color difference value C relative to the edge pixel point Q, the pixel point with the maximum C value is selected, the pixel point is assumed to be the E point, and the coordinate (C and E) of the pixel point is recorded
Figure DEST_PATH_IMAGE041
,
Figure 509593DEST_PATH_IMAGE042
). Then the first feature vector of the pixel point Q can be obtained
Figure 626323DEST_PATH_IMAGE030
Figure 148571DEST_PATH_IMAGE044
Similarly, the second eigenvector of the pixel point Q can be obtained in the normal neighborhood region
Figure 847405DEST_PATH_IMAGE035
. Then
Figure 875535DEST_PATH_IMAGE030
Figure 902397DEST_PATH_IMAGE035
The feature vectors of the Q points of the pixel points on the defect edge are obtained, and if G edge pixel points exist, the edge pixel points correspond to 2G feature vectors, and the 2G feature vectors can represent gradient information of the edge of the defect area on the surface of the PCB.
The purpose of calculating the gradient information of the defect region edge in this embodiment is to additionally obtain new feature information that can be used to determine the defect region on the basis of the texture feature information and the color feature information, so as to further improve the defect region identification accuracy, and it is easy to understand that, in other embodiments, the texture feature information and the color feature information of the defect region may be obtained only by the improved LBP algorithm without obtaining the gradient information of the defect region edge.
4. And inputting the characteristic information into the trained neural network to determine and classify the defects to obtain a PCB mainboard production quality detection result.
The feature information of the defect area is extracted through the steps, but the data volume of the obtained feature information is too large, certain redundant information exists, and the classification result is influenced to a certain extent.
The invention classifies the defect area through the neural network, the neural network is a trained network, the training samples are surface images of PCB mainboards with different defect types, sizes and numbers corresponding to different characteristic information, and the training process of the neural network is not repeated here because the training of the neural network is the prior art. The structure of the network is as follows: and the semantic segmentation network inputs the characteristic information into the trained neural network, inputs the characteristic information into the characteristic information of each defect region, and outputs a classification probability vector of each defect region, wherein the class corresponding to the maximum probability value is the type of the defect. The network loss function adopts a cross entropy loss function.
Therefore, the determination of the types of all the defects on the PCB main board and the determination of the number and the size of the defects can be completed, and the production quality evaluation value of the PCB main board is obtained:
Figure DEST_PATH_IMAGE045
in the formula, the first step is that,
Figure 401905DEST_PATH_IMAGE038
the weights corresponding to different kinds of defects on the surface of the PCB main board,
Figure 830612DEST_PATH_IMAGE039
the area of the ith defect region on the surface of the PCB mainboard, and n is the defect on the surface of the PCB mainboardThe total number of traps.
Therefore, the classification of the surface defects of the PCB main board is completed through the neural network.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (4)

1. A method for detecting the production quality of a computer PCB mainboard is characterized by comprising the following steps:
acquiring a surface image of the PCB, determining whether the surface of the PCB has a defect according to the surface image of the PCB, and determining a defect area when the defect exists;
determining a window with a set size by taking any pixel point in a defect area of a gray image on the surface of a PCB (printed circuit board) mainboard as a central pixel point, calculating the mean value of the difference value between the gray value of each pixel point on the edge of the window and the gray value of the central pixel point, and calculating the LBP (local binary pattern) value of the central pixel point by taking the mean value as a threshold value:
Figure DEST_PATH_IMAGE001
Figure 758969DEST_PATH_IMAGE002
Figure DEST_PATH_IMAGE003
wherein the content of the first and second substances,
Figure 248113DEST_PATH_IMAGE004
the gray value of the ith pixel point on the edge of the window,
Figure DEST_PATH_IMAGE005
is the gray value of the central pixel point in the window, M is the threshold value, P is the total number of pixel points on the edge of the window,
Figure 724225DEST_PATH_IMAGE006
is a threshold function;
performing Lab space conversion on the surface image of the PCB mainboard, and obtaining characteristic values representing the texture characteristic information and the color characteristic information of the window simultaneously according to the LBP value and the color information of the central pixel point of the window:
Figure 781042DEST_PATH_IMAGE007
Figure 328698DEST_PATH_IMAGE008
Figure 669419DEST_PATH_IMAGE009
wherein, LBPC is the characteristic value which represents the window texture characteristic information and the color characteristic information at the same time,
Figure 503383DEST_PATH_IMAGE010
the LBP value of the pixel point in the center of the window,
Figure 532650DEST_PATH_IMAGE011
representing the color values of the various pixel points within the window,
Figure 883996DEST_PATH_IMAGE012
is the color value of the pixel point in the center of the window,
Figure 564377DEST_PATH_IMAGE013
the average value of the deviation degree of the color value of each pixel point on the edge of the window relative to the color value of the central pixel point is shown, L represents the brightness dimension, and a and b represent the color opposite dimension;
and (3) the characteristic values obtained by all the pixel points in the defect area are the characteristic information of the defect area, the characteristic information is input into the trained neural network to determine and classify the defects, a PCB mainboard production quality evaluation value is obtained, and PCB mainboard production quality detection is completed.
2. The method for detecting the production quality of the computer PCB mainboard according to claim 1, wherein the feature information further comprises edge gradient feature information of a defect area, and the determination method of the edge gradient feature information of the defect area comprises the following steps:
performing edge detection on a gray image on the surface of a PCB (printed circuit board), determining the edge of a defect area, arbitrarily taking a pixel point Q from the edge of the defect area, determining the neighborhood of the set size of the pixel point Q, removing all the pixel points belonging to the defect edge in the neighborhood, and obtaining two new neighborhoods which are a defect neighborhood and a normal neighborhood respectively;
and (3) calculating the difference C between any pixel point W in the defect neighborhood and a pixel point Q on the edge of the defect neighborhood:
Figure 975766DEST_PATH_IMAGE014
wherein the content of the first and second substances,
Figure 993794DEST_PATH_IMAGE015
is the gray value of the pixel point W in the defect neighborhood,
Figure 742307DEST_PATH_IMAGE016
the gray value of the pixel point Q on the edge of the defective area,
Figure 683719DEST_PATH_IMAGE017
and
Figure 610217DEST_PATH_IMAGE018
respectively the brightness information of a pixel point W in a defect neighborhood and a pixel point Q on the edge of the defect region in the Lab space,
Figure 863344DEST_PATH_IMAGE019
and
Figure 399237DEST_PATH_IMAGE020
respectively the color components from green to red of the pixel point W in the defect neighborhood and the pixel point Q on the edge of the defect region in the Lab space,
Figure 195154DEST_PATH_IMAGE021
and
Figure 807401DEST_PATH_IMAGE022
respectively representing color components from blue to yellow of a pixel point W in a defect neighborhood under Lab space and a pixel point Q on the edge of the defect area;
determining the pixel E with the maximum difference C between the defect neighborhood and the pixel Q, and obtaining the first feature vector of the pixel Q
Figure 298557DEST_PATH_IMAGE023
Figure 529818DEST_PATH_IMAGE024
Wherein the content of the first and second substances,
Figure 304876DEST_PATH_IMAGE025
is the coordinate of the pixel point E and,
Figure 340221DEST_PATH_IMAGE026
the coordinates of the pixel point Q are obtained;
correspondingly, the second feature vector of the pixel point Q can be obtained in the normal neighborhood
Figure 708886DEST_PATH_IMAGE027
That is, the pixel point Q on the edge of the defect region corresponds to two feature vectors, and the feature vectors of all the pixel points on the edge of the defect region are the edge gradient feature information of the defect region.
3. The method for detecting the production quality of the computer PCB mainboard according to claim 1 or 2, wherein the specific method for determining whether the surface of the PCB mainboard has the defects according to the image of the surface of the PCB mainboard and determining the defect area when the defects exist comprises the following steps:
graying the PCB mainboard surface image to obtain a PCB mainboard surface gray image, subtracting the PCB mainboard surface gray image from a standard PCB mainboard surface gray image without surface defects to obtain a difference image, and binarizing the difference image, wherein the difference area is marked as 1, and the rest areas are marked as 0 to obtain a binary image;
and if the gray values of all pixel points of the binary image are 0, the surface of the PCB does not have a defect, otherwise, the surface of the PCB has a defect, and the binary image is multiplied by the surface image of the PCB to finish marking the position of the defect on the surface image of the PCB.
4. The method for detecting the production quality of the computer PCB mainboard according to claim 3, wherein the evaluation value of the production quality of the PCB mainboard is as follows:
Figure 602892DEST_PATH_IMAGE028
wherein Z is the evaluation value of PCB mainboard production quality,
Figure 107823DEST_PATH_IMAGE029
for a PCB main boardThe weights corresponding to different types of defects on the surface,
Figure 812605DEST_PATH_IMAGE030
the area of the ith defect area on the surface of the PCB mainboard, and n is the total number of the defects on the surface of the PCB mainboard.
CN202211207713.6A 2022-09-30 2022-09-30 Method for detecting production quality of computer PCB mainboard Pending CN115272350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211207713.6A CN115272350A (en) 2022-09-30 2022-09-30 Method for detecting production quality of computer PCB mainboard

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211207713.6A CN115272350A (en) 2022-09-30 2022-09-30 Method for detecting production quality of computer PCB mainboard

Publications (1)

Publication Number Publication Date
CN115272350A true CN115272350A (en) 2022-11-01

Family

ID=83757925

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211207713.6A Pending CN115272350A (en) 2022-09-30 2022-09-30 Method for detecting production quality of computer PCB mainboard

Country Status (1)

Country Link
CN (1) CN115272350A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116758528A (en) * 2023-08-18 2023-09-15 山东罗斯夫新材料科技有限公司 Acrylic emulsion color change identification method based on artificial intelligence
CN117351021A (en) * 2023-12-06 2024-01-05 东莞市南谷第电子有限公司 Intelligent detection method for production quality of photovoltaic connecting wire

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158660A (en) * 2010-02-08 2011-08-17 三星电子株式会社 Apparatus and method for removing defective pixels
CN110006907A (en) * 2019-04-10 2019-07-12 清华大学深圳研究生院 A kind of die casting detection method of surface flaw and system based on machine vision
CN110749598A (en) * 2019-11-05 2020-02-04 中国计量大学 Silkworm cocoon surface defect detection method integrating color, shape and texture characteristics
WO2022062812A1 (en) * 2020-09-28 2022-03-31 歌尔股份有限公司 Screen defect detection method, apparatus, and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102158660A (en) * 2010-02-08 2011-08-17 三星电子株式会社 Apparatus and method for removing defective pixels
CN110006907A (en) * 2019-04-10 2019-07-12 清华大学深圳研究生院 A kind of die casting detection method of surface flaw and system based on machine vision
CN110749598A (en) * 2019-11-05 2020-02-04 中国计量大学 Silkworm cocoon surface defect detection method integrating color, shape and texture characteristics
WO2022062812A1 (en) * 2020-09-28 2022-03-31 歌尔股份有限公司 Screen defect detection method, apparatus, and electronic device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116758528A (en) * 2023-08-18 2023-09-15 山东罗斯夫新材料科技有限公司 Acrylic emulsion color change identification method based on artificial intelligence
CN116758528B (en) * 2023-08-18 2023-11-03 山东罗斯夫新材料科技有限公司 Acrylic emulsion color change identification method based on artificial intelligence
CN117351021A (en) * 2023-12-06 2024-01-05 东莞市南谷第电子有限公司 Intelligent detection method for production quality of photovoltaic connecting wire
CN117351021B (en) * 2023-12-06 2024-03-26 东莞市南谷第电子有限公司 Intelligent detection method for production quality of photovoltaic connecting wire

Similar Documents

Publication Publication Date Title
CN111383209B (en) Unsupervised flaw detection method based on full convolution self-encoder network
CN113808138B (en) Artificial intelligence-based wire and cable surface defect detection method
CN109191459B (en) Automatic identification and rating method for continuous casting billet macrostructure center segregation defect
CN109255344B (en) Machine vision-based digital display type instrument positioning and reading identification method
CN109242848B (en) Wallpaper defect detection and identification method based on OTSU and GA-BP neural network
CN109523529B (en) Power transmission line defect identification method based on SURF algorithm
CN115272350A (en) Method for detecting production quality of computer PCB mainboard
CN111260616A (en) Insulator crack detection method based on Canny operator two-dimensional threshold segmentation optimization
CN115345885A (en) Method for detecting appearance quality of metal fitness equipment
CN111292321B (en) Transmission line insulator defect image identification method
CN106203461B (en) Image processing method and device
CN111079955A (en) GIS (geographic information System) equipment defect detection method based on X-ray imaging
CN115063430B (en) Electric pipeline crack detection method based on image processing
CN111402247A (en) Machine vision-based method for detecting defects of suspension clamp on power transmission line
CN109975196B (en) Reticulocyte detection method and system
CN114782329A (en) Bearing defect damage degree evaluation method and system based on image processing
CN113221881B (en) Multi-level smart phone screen defect detection method
CN111667475A (en) Machine vision-based Chinese date grading detection method
CN115619708A (en) Method for judging fault based on image recognition of oil quality change of main shaft bearing lubricating oil
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
CN114998290A (en) Fabric flaw detection method, device, equipment and medium based on supervised mode
CN114155226A (en) Micro defect edge calculation method
CN112561875A (en) Photovoltaic cell panel coarse grid detection method based on artificial intelligence
JP3020973B2 (en) Image processing method
JP2840347B2 (en) Board mounting inspection equipment

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