CN115294114A - Quality detection method based on ECU circuit welding - Google Patents

Quality detection method based on ECU circuit welding Download PDF

Info

Publication number
CN115294114A
CN115294114A CN202211211487.9A CN202211211487A CN115294114A CN 115294114 A CN115294114 A CN 115294114A CN 202211211487 A CN202211211487 A CN 202211211487A CN 115294114 A CN115294114 A CN 115294114A
Authority
CN
China
Prior art keywords
area
welding
circular edge
circuit board
points
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.)
Withdrawn
Application number
CN202211211487.9A
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.)
Nantong Aimeirui Intelligent Manufacturing Co ltd
Original Assignee
Nantong Aimeirui Intelligent Manufacturing 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 Nantong Aimeirui Intelligent Manufacturing Co ltd filed Critical Nantong Aimeirui Intelligent Manufacturing Co ltd
Priority to CN202211211487.9A priority Critical patent/CN115294114A/en
Publication of CN115294114A publication Critical patent/CN115294114A/en
Withdrawn 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
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration using local operators
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • 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/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/187Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • 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/20024Filtering details
    • G06T2207/20032Median filtering

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Chemical & Material Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Signal Processing (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Geometry (AREA)
  • Quality & Reliability (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of data processing, in particular to a quality detection method based on ECU circuit welding. The method is a method for identifying by using electronic equipment, and the circuit welding quality detection of the circuit board is completed by using an artificial intelligence system in the production field. The method comprises the steps of firstly identifying a circuit board image through a camera, acquiring a device area and a non-device area, respectively carrying out data processing on the device area and the non-device area to obtain a welding area, and further carrying out data processing on the welding area to obtain a welding quality evaluation value of the welding area, namely the welding quality evaluation value of the circuit board. According to the invention, the welding areas of the device area and the non-device area of the circuit board are extracted, and then the welding quality of the welding area is judged, so that the problem that the welding quality detection result is influenced by the alignment deviation when the circuit board is compared with a standard circuit board is solved, the accurate positioning and segmentation of the welding area are realized, and the precision of the circuit board welding quality detection is improved.

Description

Quality detection method based on ECU circuit welding
Technical Field
The invention relates to the technical field of data processing, in particular to a quality detection method based on ECU circuit welding.
Background
In an electronic manufacturing production line, a plurality of processes are required for the production of a circuit board, wherein a key link is the detection of the quality of the circuit board, and an important link in the direct measurement and detection of the circuit board is the detection of the welding quality of electronic components, and the detection is mainly used for detecting whether each electronic component has unqualified conditions such as missing welding, insufficient soldering tin and the like in the welding process. The quality of the soldering has an important influence on the stability of the electrical and mechanical properties of the ECU circuit board. In order to ensure the performance of the ECU circuit main board, the quality of the ECU circuit welding is detected.
At present, a common method for detecting the quality of welding of an ECU circuit is to compare an image of an ECU circuit board to be detected with an image of a standard ECU circuit board, and this method needs to obtain a corresponding image of the standard ECU circuit board for each image of the ECU circuit board to be detected, and the alignment deviation of the two images may seriously affect the accuracy of a welding quality detection result.
Disclosure of Invention
In order to solve the above technical problems, an object of the present invention is to provide a quality detection method based on ECU circuit welding, which adopts the following technical solution:
acquiring a circuit board image, and preprocessing the circuit board image to obtain a device area and a non-device area in the circuit board image;
calculating gray value range of pixel points in an edge region corresponding to the device region, and when the gray value range is smaller than a preset range threshold, taking all the pixel points in the edge region as initial growth points; when the gray value range difference is larger than or equal to a preset range difference threshold, selecting partial pixel points in the edge area as initial growth points; performing region growth based on the initial growth point to obtain a welding pin region corresponding to the device region;
carrying out linear detection on the non-device area to obtain a plurality of straight lines, and screening out the straight lines in the non-device area; detecting the circular edge lines of the non-device area to obtain a plurality of circular edge lines, calculating the integrity of the circular edge lines according to the polar coordinate polar difference of each circular edge line, and screening out the incomplete circular edge lines based on the integrity; searching edge points in eight neighborhoods of the edge points on the circular edge line, calculating the adhesion degree of the circular edge line, and screening out the adhered circular edge line according to the adhesion degree; calculating the uniformity degree of the gray values of the circular edge lines and the corresponding internal areas, and screening out non-solid circular edge lines according to the uniformity degree; based on multiple screening, the inner area of the round edge line which is not screened out is a non-idle pad area;
and calculating the welding quality evaluation value of the circuit board based on the gray values and the welding areas of the welding pin area and the non-idle welding disc area.
Preferably, the preprocessing the circuit board image to obtain a device region and a non-device region in the circuit board image includes:
graying the circuit board image to obtain a grayscale image; filtering noise of the gray level image by adopting a median filter; for the gray level image after noise filtering, carrying out image enhancement by adopting histogram equalization to obtain an enhanced image;
and semantically segmenting the enhanced image based on the label of the component set on the circuit board image, and extracting the component area and the non-component area.
Preferably, when the gray value range is greater than or equal to a preset range threshold, selecting a part of the pixel points in the edge region as initial growing points, including:
when the gray value range difference is larger than or equal to a preset range difference threshold, obtaining an optimal gray segmentation threshold by utilizing an Otsu threshold segmentation method based on the gray values of all pixel points in the edge region; and taking the pixel points in the edge area with the gray value larger than the optimal gray segmentation threshold value as initial growth points.
Preferably, the performing the line detection on the non-device region to obtain a plurality of lines, and screening out the lines in the non-device region includes:
extracting edge points on the non-device area by using a Canny operator; and acquiring a plurality of straight lines on the non-device area by adopting Hough straight line detection, and removing pixel points corresponding to the straight lines from edge points on the non-device area to screen out the straight lines in the non-device area.
Preferably, the detecting the circular edge lines of the non-device region to obtain a plurality of circular edge lines includes:
and performing circular edge line detection on the non-device area by adopting a Hough gradient circle detection algorithm to obtain a plurality of circular edge lines.
Preferably, the calculating the integrity of the circular edge lines according to the polar coordinate polar difference of each circular edge line, and screening out incomplete circular edge lines based on the integrity includes:
converting the coordinates of the pixel points on each circular edge line into polar coordinates, and calculating the polar coordinate polar difference corresponding to each circular edge line;
the integrity of the circular edge line corresponding to the polar coordinate difference smaller than the preset angle threshold value is zero; the integrity of the circular edge line corresponding to the polar coordinate range which is greater than or equal to the preset angle threshold value is one;
the round edge line with zero integrity is an incomplete round edge line which is screened out.
Preferably, the searching for edge points in eight neighborhoods of edge points on the circular edge line, calculating the adhesion degree of the circular edge line, and screening out the circular edge line with adhesion according to the adhesion degree includes:
for eight neighborhoods of each pixel point on the circular edge line, searching new edge points except the current pixel point of the circular edge line as first edge points; searching a new edge point in the eight neighborhoods of the first edge point as a second edge point; searching a new edge point in the eight neighborhoods of the second edge point as a third edge point; repeatedly searching for new edge points until no other new edge points exist in the eight neighborhoods of the searched new edge points;
the number of the obtained new edge points is used as the adhesion number; calculating the ratio of the adhesion quantity to the quantity of the edge points on the corresponding circular edge line as an adhesion ratio; the adhesion degree of the circular edge line corresponding to the adhesion ratio value which is more than or equal to the preset adhesion threshold value is one; the adhesion degree of the circular edge line corresponding to the adhesion ratio smaller than the preset adhesion threshold value is zero;
and the circular edge line with the first adhesion degree is the circular edge line with the adhesion, and the circular edge line with the adhesion is screened out.
Preferably, the calculating the uniformity of the gray values of the circular edge lines and the corresponding internal regions, and screening out non-solid circular edge lines according to the uniformity includes:
the calculation formula of the uniformity degree is as follows:
Figure 162810DEST_PATH_IMAGE001
wherein, the first and the second end of the pipe are connected with each other,
Figure 299393DEST_PATH_IMAGE002
the degree of uniformity;
Figure 374797DEST_PATH_IMAGE003
is a minimum function;
Figure 571423DEST_PATH_IMAGE004
a maximum function;
Figure 260505DEST_PATH_IMAGE005
the gray level mean value of the pixel points on the circular edge line is obtained;
Figure 731938DEST_PATH_IMAGE006
the gray average value of the pixel points in the internal area corresponding to the circular edge line is obtained;
Figure 193006DEST_PATH_IMAGE007
the minimum gray value of the inner area corresponding to the circular edge line;
Figure 294955DEST_PATH_IMAGE008
the maximum gray value of the inner area corresponding to the circular edge line;
and the circular edge lines corresponding to the uniformity degree larger than the preset uniformity threshold value are non-solid circular edge lines, and the non-solid circular edge lines are screened out.
Preferably, the calculating the evaluation value of the soldering quality of the circuit board based on the gray-scale values and the soldering areas of the soldering pin area and the non-idle pad area includes:
the welding pin area and the non-idle welding pad area are welding areas;
acquiring a gray level co-occurrence matrix of each welding area; taking an exponential function taking a natural constant as a base number and the energy of the negative gray level co-occurrence matrix as an index as welding quality parameters of the welding areas, wherein each welding area corresponds to one welding quality parameter;
based on a plurality of welding quality parameters, obtaining an optimal quality segmentation threshold by utilizing an Otsu threshold segmentation method; calculating the total area of the welding area with the welding quality parameter larger than the optimal quality segmentation threshold value as a first total area; calculating the total area of all the welding areas as a second total area;
and the ratio of the first total area to the second total area is the welding quality evaluation value of the circuit board.
Preferably, after calculating the evaluation value of the soldering quality of the circuit board based on the gray-scale values and the soldering areas of the soldering pin area and the non-idle pad area, the method further includes:
the circuit board with the welding quality evaluation value larger than the preset quality threshold value is a welding qualified circuit board; and the circuit board with the welding quality evaluation value less than or equal to the preset quality threshold value is a unqualified welding circuit board.
The embodiment of the invention at least has the following beneficial effects:
the embodiment of the invention utilizes a data processing technology, and the method collects the circuit board image and obtains the device area and the non-device area of the circuit board; based on the structural characteristics of the circuit board, the welding area is divided aiming at the two areas respectively. And screening pixel points in the edge region corresponding to the device region to obtain initial growth points, and performing region growth based on the initial growth points to obtain a welding pin region corresponding to the device region. Carrying out linear detection on the non-device area to obtain a plurality of straight lines, and screening out the straight lines in the non-device area; carrying out circular edge line detection on the non-device area to obtain a plurality of circular edge lines, and screening out incomplete circular edge lines based on the integrity of the circular edge lines; calculating the adhesion degree of the circular edge lines, and screening out the adhered circular edge lines according to the adhesion degree of the circular edge lines; calculating the uniformity degree of the gray values of the circular edge lines and the corresponding internal areas, and screening out non-solid circular edge lines according to the uniformity degree; obtaining a non-idle bonding pad area based on multiple screening; and calculating the welding quality evaluation value of the circuit board based on the gray values and the welding areas of the welding pin area and the non-idle pad area. According to the invention, the welding areas of the device area and the non-device area of the circuit board are extracted through the structural characteristics of the circuit board, so that the welding quality of the welding areas is judged. The method does not need to be compared with a standard circuit board, avoids the problem that the alignment deviation in the traditional comparison with the standard circuit board can influence the welding quality detection result, realizes the accurate positioning and segmentation of the welding area, and improves the precision of the detection of the welding quality of the circuit board.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions and advantages of the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flowchart of a method for quality detection based on ECU circuit welding according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a step of acquiring a non-spare pad area according to an embodiment of the present invention.
Detailed Description
To further illustrate the technical means and effects of the present invention for achieving the predetermined objects, the following detailed description of the method for detecting quality of circuit welding based on ECU according to the present invention, its specific implementation, structure, features and effects will be given with reference to the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" refers to not necessarily the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
The embodiment of the invention provides a specific implementation method of a quality detection method based on ECU circuit welding, which is suitable for an ECU circuit board welding quality detection scene. And acquiring a circuit board image of the ECU circuit board by using a camera under the scene, wherein the optical axis of the camera is vertical to the ECU circuit board. The ECU circuit board comprises various types of modules, various types of interfaces, indicator lamps, keys, resistors, inductors, reactors and other components, and further comprises a welding plate blank area, an idle welding plate area, a printed wire, printed letters, printed numbers, a printed frame and other structures, and the ECU circuit board can be subjected to double-sided welding in the scene. The problem that the traditional comparison of an ECU circuit board image to be detected and a standard circuit board image has alignment deviation, and then the welding quality detection result is seriously influenced is solved. According to the invention, the welding areas of the device area and the non-device area of the circuit board are extracted through the structural characteristics of the circuit board, so that the welding quality of the welding areas is judged. The method does not need to be compared with a standard circuit board, avoids the problem that the traditional alignment deviation when being compared with the standard circuit board can influence the welding quality detection result, realizes the accurate positioning and segmentation of the welding area, and improves the precision of the detection of the welding quality of the circuit board.
The following describes a specific scheme of the quality detection method based on the ECU circuit welding in detail with reference to the accompanying drawings.
Referring to fig. 1, a flowchart illustrating steps of a method for detecting quality of an ECU based circuit welding according to an embodiment of the present invention is shown, the method including the steps of:
and S100, acquiring a circuit board image, and preprocessing the circuit board image to obtain a device area and a non-device area in the circuit board image.
And acquiring a circuit board image of the ECU circuit board by using a camera, wherein the circuit board image is an RGB image. And graying the circuit board image to obtain a grayscale image.
And filtering noise of the gray-scale image by adopting a median filter. Further, for the gray level image after noise filtering, histogram equalization is adopted to perform image enhancement to obtain an enhanced image.
According to the labels of the components set on the circuit board image, semantically segmenting the enhanced image and extracting a component area
Figure 208684DEST_PATH_IMAGE009
And a non-device region. That is, the components on the circuit board image containing the labels are extracted from the circuit board image as the device areas. Wherein, components and parts on the circuit board include: various types of modules, various types of interfaces, indicator lamps, keys, resistors, inductors, reactors and the like, wherein each component is provided with a label corresponding to the component; the structure of the non-device region is complex, including: the structure comprises a blank area of a welding plate, an idle welding pad area, a printed lead, printed numbers, printed letters, a printed frame and the like.
Step S200, calculating gray value range of pixel points in an edge region corresponding to the device region, and when the gray value range is smaller than a preset range threshold, taking all the pixel points in the edge region as initial growth points; when the gray value range difference is larger than or equal to a preset range difference threshold value, selecting partial pixel points in the edge area as initial growing points; and performing region growth based on the initial growth point to obtain a welding pin region corresponding to the device region.
Obtaining device area of circuit board
Figure 483808DEST_PATH_IMAGE009
And searching a welding pin area. Because the welding pin area is in the device area of the circuit board
Figure 64962DEST_PATH_IMAGE009
Outside the edge of (a). Therefore, it is required to be in the device region
Figure 72232DEST_PATH_IMAGE009
The welding pin area is searched near the edge, but the shape and the size of the welding pin area are not known in advance, and the gray value of the pixel of the pin area of the device is relatively approximate, so the device area can be obtained by adopting an area growth method
Figure 738837DEST_PATH_IMAGE009
The solder pin area of (1). Considering that the solder lead area does not necessarily completely surround the device area, if all the solder board area pixels around the device area are selected as the initial growth points, a solder board area that is considered to be the solder lead area is obtained. It is therefore necessary to find pixels that fall into the solder pin area near the device area as the initial growth points.
An edge region of the device region is obtained. Specifically, the method comprises the following steps: and obtaining an edge area wrapping the device area with a preset width at the outer side of the edge of the device area. In the embodiment of the present invention, the preset width is 10, and in other embodiments, an implementer may adjust the value according to actual situations.
Further, gray value range of pixel points in the edge region of the device region is calculated, and when the gray value range is smaller than a preset range threshold, all the pixel points in the edge region are used as initial growth points. And when the gray value range is smaller than a preset range threshold, the device region is considered to be completely wrapped by the welding pin region, so that all pixel points in the edge region are selected as initial growth points. In the embodiment of the present invention, the value of the preset range threshold is 50, and in other embodiments, an implementer may adjust the value according to actual conditions.
And when the gray value range difference is larger than or equal to a preset range difference threshold value, selecting partial pixel points in the edge area as initial growth points.
Specifically, the method comprises the following steps: and when the gray value range difference is larger than or equal to the preset range difference threshold, obtaining the optimal gray segmentation threshold by using an Otsu threshold segmentation method based on the gray values of all pixel points in the edge region. And taking the pixel points in the edge area with the gray value larger than the optimal gray segmentation threshold value as initial growth points. When the gray value range difference is larger than or equal to the preset range difference threshold value, the device region is considered not to be completely wrapped by the welding pin region, the edge region of the device region contains the welding plate region, and the welding pin region is full of soldering tin, so that the gray value is larger than or equal to the gray value of the welding plate region, and pixel points in the edge region with the gray value larger than or equal to the optimal gray value segmentation threshold value are used as initial growth points.
Further, area growing is carried out based on the initial growing point, and a welding pin area of the period area is obtained. Specifically, the method comprises the following steps: setting a growth rule: and searching pixel points of which the difference value between the gray value and the gray value of the initial growing point is smaller than a preset growing threshold value in eight neighborhoods near the initial growing point. In the embodiment of the present invention, the preset growth threshold is 5, and in other embodiments, an implementer may adjust the value according to actual conditions. Taking the pixel points meeting the growth rule as new growth points, and simultaneously taking the device region
Figure 758264DEST_PATH_IMAGE009
Is set as a growth-inhibited region, i.e., a pixel that is not allowed to grow falls in this region. Obtaining device area of ECU circuit board
Figure 193924DEST_PATH_IMAGE009
Corresponding solder pin area.
Step S300, carrying out linear detection on the non-device area to obtain a plurality of straight lines, and screening out the straight lines in the non-device area; detecting a plurality of circular edge lines in a non-device area by using circular edge lines, calculating the integrity of the circular edge lines according to the polar coordinate polar difference of each circular edge line, and screening out incomplete circular edge lines based on the integrity; searching edge points in eight neighborhoods of the edge points on the circular edge lines, calculating the adhesion degree of the circular edge lines, and screening out the adhered circular edge lines according to the adhesion degree; calculating the uniformity degree of the gray values of the circular edge lines and the corresponding internal regions, and screening out non-solid circular edge lines according to the uniformity degree; based on the multiple screening, the inner area of the round edge line which is not screened out is the non-idle pad area.
From non-device areas
Figure 637675DEST_PATH_IMAGE010
The non-idle bonding pad area is divided, namely the non-idle bonding pad area. The soldering area mostly appears in the lead area around the components on the circuit board, but because the circuit board has the condition of double-sided soldering, the used pad areas on the two sides of the soldering board are different, so the soldering area comprises the soldering lead area around the components on the circuit board and the non-idle pad area. The welding pin area is originally a welding pad area and becomes the welding pin area after the current surface of the circuit board is welded with an upper component; the non-free pad area refers to a pad area with solder, which is a soldering pin area of a certain component on the other side of the circuit board. In terms of morphological structure, the non-spare pad area is a circular structure and the circular interior is filled with solder.
The structure of the non-device area is complex, and includes the blank area of the welding plate, the idle pad area, the printed conductor, the printed letter, the printed number and the printed frame, etc., the extraction of the circular structure of the non-idle pad area by the complex lines brings great problems, especially the idle pad area on the welding plate, the printed number "0", "3", "5", "6", "8", "9", the printed letter "O", "Q", "C", "R", "P", "B", "D", "G", etc., can lead to the occurrence of the condition of false detection, so that the idle pad area, the printed number or the printed letter are mistaken as the non-idle pad area. Therefore, a classification algorithm capable of distinguishing a non-idle pad region, an idle pad region, a printed number and a printed letter is provided to obtain the non-idle pad region.
Referring to fig. 2, a step of obtaining a non-idle pad area is shown. Specifically, the method comprises the following steps:
step S301, carrying out straight line detection on the non-device area to obtain a plurality of straight lines, and screening out the straight lines in the non-device area.
Extracting edge points on the non-device area by using a Canny operator, acquiring a plurality of straight lines on the non-device area by adopting Hough straight line detection, removing pixel points corresponding to the straight lines from the edge points on the non-device area, and screening out the straight lines in the non-device area. Straight line parts on the non-device area are removed, and the precision of subsequent circle detection is improved. The straight line portions of the non-device area of the circuit board are mainly straight line portions such as printed wires and printed frames.
Step S302, circular edge lines are detected in the non-device area to obtain a plurality of circular edge lines, the integrity of the circular edge lines is calculated according to the polar coordinate polar difference of each circular edge line, and incomplete circular edge lines are screened out based on the integrity.
And performing circular edge line detection on the non-device area by adopting a Hough gradient circle detection algorithm to obtain a plurality of circular edge lines. Namely, the Hough gradient circle detection algorithm is adopted, and the edge points of the non-device area are input to obtain a plurality of circular edge lines.
Further, the authenticity degree of the plurality of circular edge lines is judged so as to distinguish the circular edge lines in the non-idle pad area from other circular edge lines.
Firstly, the integrity of the circular edge line is judged, if the circular edge line is an unclosed arc line, the corresponding integrity is low, the unclosed circular edge line is removed from the plurality of circular edge lines, and the incomplete circular edge line is also removed from the plurality of circular edge lines. Such as the printing of the numbers "3" and "5", the printing of the letters "C", "R", "P", "B", "D", "G", etc., which contain incomplete circular edge lines of circular configuration.
Calculating the integrity of the circular edge line, specifically: and calculating the integrity of the circular edge line according to the polar coordinate polar difference of the circular edge line. And converting the coordinates of the pixel points on each circular edge line into polar coordinates, and calculating the polar coordinate polar difference corresponding to each circular edge line. And when the integrity is zero, the incomplete circular edge line is reflected. And the integrity of the circular edge line corresponding to the polar coordinate range which is greater than or equal to the preset angle threshold value is one. In the embodiment of the present invention, the preset angle threshold is 350, and in other embodiments, an implementer may adjust the value according to actual conditions.
And the round edge line with zero integrity is an incomplete round edge line, and the incomplete round edge line is screened from the plurality of round edge lines.
Step S303, searching edge points in eight neighborhoods of the edge points on the circular edge line, calculating the adhesion degree of the circular edge line, and screening out the circular edge line with adhesion according to the adhesion degree.
And judging the adhesion degree of the circular edge line, if the circular edge line is connected with other edge structures or the circular edge line, the corresponding adhesion degree is higher, and the circular edge line with higher adhesion degree is removed from the plurality of circular edge lines. For example, the characters "6", "8", "9" and the letters "Q" are printed, and the like, and the round edge lines with adhesion are printed.
Calculating the adhesion degree of the circular edge line, specifically: searching new edge points except the pixel points of the current circular edge line as first edge points for eight neighborhoods of each pixel point on the circular edge line; searching a new edge point in eight neighborhoods of the first edge point as a second edge point; searching a new edge point in the eight neighborhoods of the second edge point as a third edge point; and repeatedly searching for new edge points until no other new edge points exist in the eight neighborhoods of the searched new edge points.
The number of the obtained new edge points is used as the adhesion number; calculating the ratio of the adhesion quantity to the quantity of the edge points on the corresponding circular edge line as an adhesion ratio; the adhesion degree of the circular edge line corresponding to the adhesion ratio value which is more than or equal to the preset adhesion threshold value is one; the adhesion degree of the circular edge line corresponding to the adhesion ratio smaller than the preset adhesion threshold value is zero. In the embodiment of the present invention, the value of the preset adhesion threshold is 0.1, and in other embodiments, the value may be adjusted by an implementer according to an actual situation.
When the adhesion degree is one, the reflection circular edge line is connected with other edge lines. Therefore, the circular edge line with the first adhesion degree is the adhered circular edge line, and the adhered circular edge line is screened from the plurality of circular edge lines.
Step S304, calculating the uniformity of the gray values of the circular edge lines and the corresponding internal areas, and screening out non-solid circular edge lines according to the uniformity; based on the multiple screening, the inner area of the round edge line which is not screened out is the non-idle pad area.
For non-solid circular edge lines printed with numbers of 0, letters of O, idle pad areas and the like, namely circular edge lines without soldering tin inside, from the aspect of shape structure, the circular edge lines are all circular structures and are not easy to distinguish, so that the judgment needs to be carried out by combining internal area information contained in the circular edge lines, the difference between the gray level of pixel points in the internal area of the non-idle pad area and the gray level on the corresponding circular edge lines is small, and the non-solid circular edge lines are screened out by combining the internal area information of the circular edge lines.
And calculating the uniformity of the circular edge lines and the corresponding inner area, and if the gray value difference between the inner area of the circular edge lines and the gray value difference between the circular edge lines is larger, the corresponding uniformity is lower, and the circular edge lines with lower uniformity are removed from the plurality of circular edge lines. The degree of uniformity associated with the circular edge lines is determined by the gray scale uniformity of the pixels in the inner region and the gray scale contrast of the pixels in the inner region.
The degree of uniformity
Figure 57155DEST_PATH_IMAGE002
The calculation formula of (2) is as follows:
Figure 877344DEST_PATH_IMAGE001
wherein, the first and the second end of the pipe are connected with each other,
Figure 167511DEST_PATH_IMAGE003
is a minimum function;
Figure 782163DEST_PATH_IMAGE004
a maximum function;
Figure 157780DEST_PATH_IMAGE005
the gray average value of the pixel points on the circular edge line is obtained;
Figure 778730DEST_PATH_IMAGE006
the gray level mean value of the pixel points in the internal area corresponding to the circular edge line;
Figure 392245DEST_PATH_IMAGE012
the minimum gray value of the inner area corresponding to the circular edge line;
Figure 646640DEST_PATH_IMAGE008
the maximum gray value of the inner area corresponding to the circular edge line.
The greater the contrast between the gray average of the pixels on the circular edge line and the gray average of the pixels in the internal area corresponding to the circular edge line, the greater the contrast between the minimum gray value and the maximum gray value of the pixels in the internal area corresponding to the circular edge line, and the smaller the degree of internal uniformity of the reflected circular edge line.
And taking the circular edge line corresponding to the uniformity degree larger than the preset uniformity threshold value as a non-solid circular edge line, and screening the non-solid circular edge line from the plurality of circular edge lines. In the embodiment of the present invention, the value of the preset uniform threshold is 0.8, and in other embodiments, the implementer may adjust the value according to the actual situation.
Based on the multiple screening in steps S301 to S304, the inner area of the circular edge line that is not screened out is the non-idle pad area, that is, the area surrounded by the circular edge line left after the four times of screening is the non-idle pad area.
And step S400, calculating the welding quality evaluation value of the circuit board based on the gray values and the welding areas of the welding pin area and the non-idle pad area.
The obtained welding pin area and the non-idle pad area are both welding areas. That is, each bonding pin area is a bonding area, and each non-idle pad area is also a bonding area. And acquiring the welding area of each welding area.
And performing welding quality evaluation based on the gray value and the welding area of the welding area to obtain a welding quality evaluation value of the corresponding circuit board. The smoother and more uniform the welding area, indicating the better welding quality.
And extracting texture information of the welding area by adopting a gray level co-occurrence matrix. Is set to have a size of
Figure 509554DEST_PATH_IMAGE013
Sliding window of setting gray scale
Figure 937124DEST_PATH_IMAGE014
And respectively solving the gray level co-occurrence matrix for the plurality of welding areas, namely obtaining the gray level co-occurrence matrix of each welding area, wherein each welding area corresponds to one gray level co-occurrence matrix. Further, energy of gray level co-occurrence matrix is adopted
Figure 405146DEST_PATH_IMAGE015
The gray level co-occurrence matrix is characterized, wherein the energy of the gray level co-occurrence matrix is the sum of squares of each matrix element. The energy of the gray level co-occurrence matrix reflects the uniformity degree of the texture, and when the welding quality of the welding area is higher, the welding area is more uniform, and the energy is higher
Figure 883970DEST_PATH_IMAGE015
The smaller the value of (c).
Therefore, the energy of the negative gray level co-occurrence matrix is used as an exponential function of an index as a base number by taking a natural constant as a base number, and each welding area corresponds to one welding quality parameter.
The welding quality parameter
Figure 234180DEST_PATH_IMAGE016
The calculation formula of (2) is as follows:
Figure 934283DEST_PATH_IMAGE017
wherein the content of the first and second substances,
Figure 53548DEST_PATH_IMAGE018
is a natural constant;
Figure 446483DEST_PATH_IMAGE015
the energy of the gray level co-occurrence matrix corresponding to the welding area.
When the welding area is more uniform, the corresponding energy
Figure 18410DEST_PATH_IMAGE015
The smaller the value of (b), the larger the weld quality parameter, and the higher the weld quality.
Performing threshold segmentation on the welding quality parameters by utilizing an Otsu threshold segmentation method based on a plurality of welding quality parameters corresponding to a plurality of welding areas to obtain an optimal quality segmentation threshold; calculating the total area of the welding area with the welding quality parameter larger than the optimal quality segmentation threshold value as a first total area; the total area of all the weld regions is calculated as the second total area.
And the ratio of the first total area to the second total area is the welding quality evaluation value of the circuit board.
After obtaining a welding quality evaluation value corresponding to the circuit board, taking the circuit board with the welding quality evaluation value larger than a preset quality threshold value as a welding qualified circuit board; and taking the circuit board with the welding quality evaluation value less than or equal to the preset quality threshold value as the unqualified welding circuit board. The quick judgment of the welding quality of the welding area of the circuit board is realized. In the embodiment of the present invention, the value of the preset quality threshold is 0.95, and in other embodiments, an implementer may adjust the value according to an actual situation.
In summary, the embodiment of the present invention utilizes a data processing technology, and the method acquires the circuit board image, and preprocesses the circuit board image to obtain the device region and the non-device region in the circuit board image; calculating gray value range of pixel points in an edge region corresponding to the device region, and when the gray value range is smaller than a preset range threshold, taking all the pixel points in the edge region as initial growing points; when the gray value range difference is larger than or equal to a preset range difference threshold value, selecting partial pixel points in the edge area as initial growing points; performing region growth based on the initial growth point to obtain a welding pin region corresponding to the device region; carrying out linear detection on the non-device area to obtain a plurality of straight lines, and screening out the straight lines in the non-device area; detecting a plurality of circular edge lines in a non-device area by using circular edge lines, calculating the integrity of the circular edge lines according to the polar coordinate polar difference of each circular edge line, and screening out incomplete circular edge lines based on the integrity; searching edge points in eight neighborhoods of the edge points on the circular edge line, calculating the adhesion degree of the circular edge line, and screening out the adhered circular edge line according to the adhesion degree; calculating the uniformity degree of the gray values of the circular edge lines and the corresponding internal areas, and screening out non-solid circular edge lines according to the uniformity degree; based on multiple screening, the inner area of the round edge line which is not screened out is a non-idle pad area; and calculating the welding quality evaluation value of the circuit board based on the gray values and the welding areas of the welding pin area and the non-idle pad area. According to the invention, the welding areas of the device area and the non-device area of the circuit board are extracted through the structural characteristics of the circuit board, so that the welding quality of the welding areas is judged. The method does not need to compare with a standard circuit board, avoids alignment deviation, realizes accurate positioning and segmentation of a welding area, and improves the precision of detection of the welding quality of the circuit board.
It should be noted that: the precedence order of the above embodiments of the present invention is only for description, and does not represent the merits of the embodiments. And specific embodiments thereof have been described above. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A quality detection method based on ECU circuit welding is characterized by comprising the following steps:
acquiring a circuit board image, and preprocessing the circuit board image to obtain a device area and a non-device area in the circuit board image;
calculating gray value range of pixel points in an edge region corresponding to the device region, and when the gray value range is smaller than a preset range threshold, taking all the pixel points in the edge region as initial growth points; when the gray value range difference is larger than or equal to a preset range difference threshold, selecting partial pixel points in the edge area as initial growth points; performing region growth based on the initial growth point to obtain a welding pin region corresponding to the device region;
carrying out linear detection on the non-device area to obtain a plurality of straight lines, and screening out the straight lines in the non-device area; detecting the circular edge lines of the non-device area to obtain a plurality of circular edge lines, calculating the integrity of the circular edge lines according to the polar coordinate polar difference of each circular edge line, and screening out the incomplete circular edge lines based on the integrity; searching edge points in eight neighborhoods of the edge points on the circular edge line, calculating the adhesion degree of the circular edge line, and screening out the adhered circular edge line according to the adhesion degree; calculating the uniformity degree of the gray values of the circular edge lines and the corresponding internal areas, and screening out non-solid circular edge lines according to the uniformity degree; based on multiple screening, the inner area of the round edge line which is not screened out is a non-idle bonding pad area;
and calculating the welding quality evaluation value of the circuit board based on the gray values and the welding areas of the welding pin area and the non-idle welding disc area.
2. The method of claim 1, wherein the preprocessing the circuit board image to obtain device areas and non-device areas in the circuit board image comprises:
graying the circuit board image to obtain a grayscale image; filtering noise of the gray level image by adopting a median filter; for the gray level image after noise filtering, carrying out image enhancement by adopting histogram equalization to obtain an enhanced image;
and semantically segmenting the enhanced image based on the label of the component set on the circuit board image, and extracting the component area and the non-component area.
3. The method for detecting the quality of the ECU-based circuit welding according to claim 1, wherein when the gray value range is greater than or equal to a preset range threshold, selecting a part of pixel points in the edge area as initial growing points comprises:
when the gray value range difference is larger than or equal to a preset range difference threshold, obtaining an optimal gray segmentation threshold by utilizing an Otsu threshold segmentation method based on the gray values of all pixel points in the edge region; and taking the pixel points in the edge area with the gray value larger than the optimal gray segmentation threshold value as initial growth points.
4. The method for detecting the quality of the ECU-based circuit welding according to claim 1, wherein the step of performing the line detection on the non-device area to obtain a plurality of lines and screening out the lines in the non-device area comprises the following steps:
extracting edge points on the non-device area by using a Canny operator; and acquiring a plurality of straight lines on the non-device area by adopting Hough straight line detection, removing pixel points corresponding to the straight lines from edge points on the non-device area, and screening out the straight lines in the non-device area.
5. The method of claim 1, wherein the detecting the circular edge lines of the non-device area to obtain a plurality of circular edge lines comprises:
and performing circular edge line detection on the non-device area by adopting a Hough gradient circle detection algorithm to obtain a plurality of circular edge lines.
6. The method of claim 1, wherein the step of calculating the integrity of the circular edge lines according to the polar coordinate polar difference of each circular edge line and the step of screening out incomplete circular edge lines based on the integrity comprises:
converting the coordinates of the pixel points on each circular edge line into polar coordinates, and calculating the polar coordinate polar difference corresponding to each circular edge line;
the integrity of the circular edge line corresponding to the polar coordinate polar difference smaller than the preset angle threshold value is zero; the integrity of the circular edge line corresponding to the polar coordinate range which is greater than or equal to the preset angle threshold value is one;
the round edge line with zero integrity is an incomplete round edge line which is screened out.
7. The method for detecting quality of an ECU-based circuit welding according to claim 1, wherein the searching for edge points in eight neighborhoods of edge points on the circular edge line, calculating adhesion degree of the circular edge line, and screening out the adhered circular edge line according to the adhesion degree comprises:
searching new edge points except the current pixel point of the circular edge line as first edge points for eight neighborhoods of each pixel point on the circular edge line; searching a new edge point in the eight neighborhoods of the first edge point as a second edge point; searching a new edge point in the eight neighborhoods of the second edge point as a third edge point; repeatedly searching for new edge points until no other new edge points exist in the eight neighborhoods of the searched new edge points;
the number of the obtained new edge points is used as the adhesion number; calculating the ratio of the adhesion quantity to the quantity of the edge points on the corresponding circular edge line as an adhesion ratio; the adhesion degree of the circular edge line corresponding to the adhesion ratio value which is more than or equal to the preset adhesion threshold value is one; the adhesion degree of the circular edge line corresponding to the adhesion ratio smaller than the preset adhesion threshold value is zero;
and the circular edge line with the first adhesion degree is the circular edge line with the adhesion, and the circular edge line with the adhesion is screened out.
8. The method of claim 1, wherein the calculating of the uniformity of the gray values of the circular edge lines and the corresponding inner regions, and the screening of non-solid circular edge lines according to the uniformity comprises:
the calculation formula of the uniformity degree is as follows:
Figure DEST_PATH_IMAGE002
wherein the content of the first and second substances,
Figure DEST_PATH_IMAGE004
the degree of uniformity;
Figure DEST_PATH_IMAGE006
is a minimum function;
Figure DEST_PATH_IMAGE008
a maximum function;
Figure DEST_PATH_IMAGE010
the gray average value of the pixel points on the circular edge line is obtained;
Figure DEST_PATH_IMAGE012
the gray average value of the pixel points in the internal area corresponding to the circular edge line is obtained;
Figure DEST_PATH_IMAGE014
the minimum gray value of the inner area corresponding to the circular edge line;
Figure DEST_PATH_IMAGE016
the maximum gray value of the inner area corresponding to the circular edge line;
and the circular edge lines corresponding to the uniformity degree larger than the preset uniformity threshold value are non-solid circular edge lines, and the non-solid circular edge lines are screened out.
9. The method for detecting the quality of ECU (electronic control Unit) circuit welding according to claim 1, wherein the step of calculating the evaluation value of the welding quality of the circuit board based on the gray-level values and the welding areas of the welding pin area and the non-idle pad area comprises the following steps:
the welding pin area and the non-idle welding pad area are welding areas;
acquiring a gray level co-occurrence matrix of each welding area; taking an exponential function taking a natural constant as a base number and the energy of the negative gray level co-occurrence matrix as an index as welding quality parameters of the welding areas, wherein each welding area corresponds to one welding quality parameter;
based on a plurality of welding quality parameters, obtaining an optimal quality segmentation threshold by utilizing an Otsu threshold segmentation method; calculating the total area of the welding area with the welding quality parameter larger than the optimal quality segmentation threshold value as a first total area; calculating the total area of all the welding areas as a second total area;
and the ratio of the first total area to the second total area is the welding quality evaluation value of the circuit board.
10. The method of claim 1, wherein after calculating the evaluation value of the soldering quality of the circuit board based on the gray-level values and the soldering areas of the soldering pin region and the non-idle pad region, the method further comprises:
the circuit board with the welding quality evaluation value larger than the preset quality threshold value is a welding qualified circuit board; and the circuit board with the welding quality evaluation value less than or equal to the preset quality threshold value is a unqualified welding circuit board.
CN202211211487.9A 2022-09-30 2022-09-30 Quality detection method based on ECU circuit welding Withdrawn CN115294114A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211211487.9A CN115294114A (en) 2022-09-30 2022-09-30 Quality detection method based on ECU circuit welding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211211487.9A CN115294114A (en) 2022-09-30 2022-09-30 Quality detection method based on ECU circuit welding

Publications (1)

Publication Number Publication Date
CN115294114A true CN115294114A (en) 2022-11-04

Family

ID=83833467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211211487.9A Withdrawn CN115294114A (en) 2022-09-30 2022-09-30 Quality detection method based on ECU circuit welding

Country Status (1)

Country Link
CN (1) CN115294114A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116030060A (en) * 2023-03-29 2023-04-28 高唐县红发塑业有限公司 Plastic particle quality detection method
CN116958125A (en) * 2023-09-18 2023-10-27 惠州市鑫晖源科技有限公司 Electronic contest host power supply element defect visual detection method based on image processing
CN117593298A (en) * 2024-01-18 2024-02-23 深圳市思博威激光科技有限公司 Laser welding quality detection system based on machine vision

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116030060A (en) * 2023-03-29 2023-04-28 高唐县红发塑业有限公司 Plastic particle quality detection method
CN116958125A (en) * 2023-09-18 2023-10-27 惠州市鑫晖源科技有限公司 Electronic contest host power supply element defect visual detection method based on image processing
CN116958125B (en) * 2023-09-18 2023-12-26 惠州市鑫晖源科技有限公司 Electronic contest host power supply element defect visual detection method based on image processing
CN117593298A (en) * 2024-01-18 2024-02-23 深圳市思博威激光科技有限公司 Laser welding quality detection system based on machine vision
CN117593298B (en) * 2024-01-18 2024-06-04 深圳市思博威激光科技有限公司 Laser welding quality detection system based on machine vision

Similar Documents

Publication Publication Date Title
CN115311301B (en) PCB welding spot defect detection method
CN115294114A (en) Quality detection method based on ECU circuit welding
CN115601364B (en) Golden finger circuit board detection method based on image analysis
CN114926463B (en) Production quality detection method suitable for chip circuit board
CN115018850B (en) Method for detecting burrs of punched hole of precise electronic part based on image processing
CN115205290B (en) Online detection method and system for PCB production process
CN114170228A (en) Computer image edge detection method
CN116721107B (en) Intelligent monitoring system for cable production quality
CN113298769B (en) FPC flexible flat cable appearance defect detection method, system and medium
CN115775250A (en) Golden finger circuit board defect rapid detection system based on digital image analysis
CN108596829A (en) A kind of PCB bare boards picture method for registering and device
CN115359047A (en) Abnormal defect detection method for intelligent welding of PCB (printed circuit board)
CN114972230A (en) Method and system for detecting defects of circuit board on production line
CN113506243A (en) PCB welding defect detection method and device and storage medium
CN115775246A (en) Method for detecting defects of PCB (printed circuit board) components
CN112561875A (en) Photovoltaic cell panel coarse grid detection method based on artificial intelligence
CN115311484A (en) Optimized clustering segmentation method for weld data
CN114820439A (en) PCB bare board defect detection system and method based on AOI
CN116309518A (en) PCB (printed circuit board) detection method and system based on computer vision
CN116993725B (en) Intelligent patch information processing system of flexible circuit board
CN117388263B (en) Hardware terminal quality detection method for charging gun
CN113674260A (en) SMT welding spot defect detection method
KR100827906B1 (en) Substrate inspection device
CN114155179A (en) Light source defect detection method, device, equipment and storage medium
CN112036391A (en) Electronic inspection method and system based on shale gas field production station

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20221104