CN118037715A - Intelligent welding spot analysis optimization method and system for PCBA board - Google Patents

Intelligent welding spot analysis optimization method and system for PCBA board Download PDF

Info

Publication number
CN118037715A
CN118037715A CN202410430429.8A CN202410430429A CN118037715A CN 118037715 A CN118037715 A CN 118037715A CN 202410430429 A CN202410430429 A CN 202410430429A CN 118037715 A CN118037715 A CN 118037715A
Authority
CN
China
Prior art keywords
complexity
welding spot
welding
solder joint
spots
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202410430429.8A
Other languages
Chinese (zh)
Other versions
CN118037715B (en
Inventor
刘凯
袁龙
谢伟章
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yingtang Intelligent Industry Co ltd
Original Assignee
Shenzhen Yingtang Intelligent Industry Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yingtang Intelligent Industry Co ltd filed Critical Shenzhen Yingtang Intelligent Industry Co ltd
Priority to CN202410430429.8A priority Critical patent/CN118037715B/en
Publication of CN118037715A publication Critical patent/CN118037715A/en
Application granted granted Critical
Publication of CN118037715B publication Critical patent/CN118037715B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)

Abstract

The invention discloses an intelligent welding spot analysis and optimization method and system for a PCBA board, which relate to the technical field of intelligent spot welding of PCBA boards and comprise the following steps: and extracting a welding spot area from the PCBA image for image enhancement so as to improve the identification degree of welding spots. According to the invention, the welding spots are divided into three categories of simple, general and complex by evaluating the geometric characteristics and morphological characteristics of the welding spots, the detection time of the welding spots is dynamically adjusted, the intelligent regulation and control of the simple welding spots, the general welding spots and the complex welding spots are realized according to real-time monitoring data of different welding spot complexity, the detection time of the simple welding spots is shorter, the rhythm of the whole production line is not influenced, the production efficiency is improved, and the detection time of the complex welding spots is possibly longer, more attention and resources are needed, but the high-efficiency detection process can be ensured through intelligent regulation and control, and the reduction of the production efficiency is avoided.

Description

Intelligent welding spot analysis optimization method and system for PCBA board
Technical Field
The invention relates to the technical field of intelligent spot welding of PCBA plates, in particular to an intelligent welding spot analysis and optimization method and system for PCBA plates.
Background
Intelligent solder joint analysis optimization refers to the process of analyzing and optimizing solder joints on a PCBA (Printed Circuit Board Assembly ) board using intelligent algorithms and techniques. Such analysis and optimization aims at improving the quality of soldering, improving production efficiency and reducing costs to ensure the reliability and stability of the PCBA board.
The intelligent solder joint analysis stage involves the detection and identification of solder joints on the PCBA board using image processing techniques and machine learning algorithms. This includes detecting the location, shape, size, and quality of the weld spot. Then, by analyzing these characteristics, it is possible to evaluate the weld quality and detect possible defects or problems. During the optimization phase, the intelligent algorithm may provide advice based on previous analysis results, such as adjusting welding parameters, improving the welding process, or optimizing the configuration of the welding equipment to improve the quality of the weld and minimize the yield. Through the intelligent analysis and optimization process, manufacturers can realize more reliable and efficient PCBA production, thereby improving the product quality and the production efficiency.
Image processing techniques are used to process image data of the PCBA board so that it can be recognized and understood by a computer system. This includes preprocessing steps such as removing noise from the image, adjusting illumination and contrast, etc., to improve the quality and sharpness of the image. Next, the image processing technique may employ methods such as edge detection, morphological processing, etc., in order to accurately locate and segment the location and shape of the solder joint.
The prior art has the following defects:
in the intelligent welding spot analysis and optimization process of the PCBA board, when welding spots are detected through an image processing technology, if the welding spot on the PCBA board is complex in shape, but the detection time is short, the algorithm may not fully capture the complex features, and part of welding spots are missed to be detected. This may lead to omission of defects, so that defective products pass detection, reducing product quality. On the other hand, a shorter detection time may result in the algorithm misdetecting the non-weld areas as welds. The probability of such false detection increases due to the complex spot morphology. If the welding spots on the PCBA board are simple in shape, but the detection time is long, the long-time welding spot detection can influence the rhythm of the whole production line, so that the production efficiency is reduced.
The above information disclosed in the background section is only for enhancement of understanding of the background of the disclosure and therefore it may include information that does not form the prior art that is already known to a person of ordinary skill in the art.
Disclosure of Invention
The invention aims to provide an intelligent welding spot analysis optimization method and system for a PCBA board, wherein welding spots are divided into three categories of simple, general and complex by evaluating geometric characteristics and morphological characteristics of the welding spots, the detection time of the welding spots is dynamically adjusted, the intelligent regulation and control of the simple welding spots, the general welding spots and the complex welding spots are realized according to real-time monitoring data of different welding spot complexity, the detection time of the simple welding spots is shorter, the rhythm of the whole production line is not influenced, the production efficiency is improved, and the detection time of the complex welding spots is possibly longer, more attention and resources are needed, but the efficient detection process can still be ensured through the intelligent regulation and control, the reduction of the production efficiency is avoided, and the problems in the background technology are solved.
In order to achieve the above object, the present invention provides the following technical solutions: the intelligent welding spot analysis optimization method for the PCBA board comprises the following steps of:
extracting a welding spot area from the PCBA image for image enhancement so as to improve the identification degree of welding spots;
extracting features from each welding spot area by a contour extraction image processing method;
According to the feature extraction result, carrying out complexity evaluation on each welding spot according to the geometric features and morphological features of the welding spot;
Based on the evaluation results of the geometric feature and the morphological feature complexity, marking the welding spots with different complexity into categories of welding spots, and classifying the welding spots into simple welding spots, general welding spots or complex welding spots;
according to the welding spots of different mark types, the detection time of a simple welding spot, a general welding spot or a complex welding spot is dynamically adjusted according to the data monitored in real time, so that the high-efficiency detection of the welding spots of different mark types is realized.
Preferably, the step of extracting features for each solder joint region by a contour extraction image processing method is as follows:
performing edge detection on the preprocessed image so as to find out the outline of the welding spot;
extracting the outline of the edge information obtained through edge detection, and separating the outline of the welding spot area;
extracting the characteristics of each contour to describe the specific form of the welding spot area;
Combining the extracted contour features into feature vectors to represent features of each solder joint region;
the extracted feature vectors are stored in a dataset as input data for a machine learning algorithm.
Preferably, when complexity evaluation is performed on each welding spot according to the geometric features of the welding spots, generating a geometric feature complexity index through the geometric features of the welding spots, and generating logic of the geometric feature complexity index is as follows:
marking the preprocessed PCBA image as I;
performing haar wavelet transformation on the preprocessed image I to obtain the horizontal direction of the image And vertical direction/>Components of (2);
The energy of the edge component in the horizontal and vertical directions is calculated and used as a measure of the complexity of the geometric characteristics of the welding spot area, and the energy is calculated according to the following formula: ,/> wherein/> Representing pixel locations in an image,/>And/>Representing haar wavelet transform coefficients in horizontal and vertical directions, respectively,/>And/>Representing the edge component energy in the horizontal and vertical directions, respectively;
According to energy in horizontal and vertical directions And/>Calculating the geometric feature complexity G of the welding spot area, wherein the calculated expression is as follows: /(I)
Calculating a geometric feature complexity index through the geometric feature complexity G, wherein the calculated expression is as follows: in the above, the ratio of/> Representing the geometric feature complexity index.
Preferably, when complexity evaluation is performed on each welding spot according to the morphological characteristics of the welding spot, generating a morphological characteristic complexity index through the morphological characteristics of the welding spot, and generating logic of the morphological characteristic complexity index is as follows:
Marking the preprocessed PCBA image as
Extracting the edge of the welding spot area by using an edge detection algorithm, and marking the obtained edge image as E;
And extracting the contour of the welding spot area by using a contour extraction algorithm according to the edge detection result E, wherein the obtained contour set is marked as C, and then: Wherein/> Representing the outline of the kth weld;
for each contour Morphological feature calculations including perimeter/>Sum area/>
Calculating a morphological feature complexity index, wherein the calculated expression is: in the above, the ratio of/> Representing morphological feature complexity index,/>Represents the circumference of the kth weld,/>Representing the area of the kth solder joint.
Preferably, the geometric feature complexity index of the welding spot is obtainedAnd morphological feature complexity index/>Then, a welding spot complexity analysis model is established, and a complexity coefficient/> isgeneratedBy complexity factor/>The complexity of the solder joint is evaluated.
Preferably, the complexity coefficient generated by the welding spot is compared with a preset first complexity reference threshold value and a preset second complexity reference threshold value for analysis, wherein the first complexity reference threshold value is smaller than the second complexity reference threshold value, and the comparison analysis result is as follows:
If the complexity coefficient generated by the welding spot meets the complexity coefficient smaller than the first complexity reference threshold, marking the welding spot as a simple welding spot;
if the complexity coefficient generated by the welding spot meets the complexity coefficient that is larger than or equal to the first complexity reference threshold value and smaller than the second complexity reference threshold value, marking the welding spot as a common welding spot;
and if the complexity coefficient generated by the welding spot meets the complexity coefficient more than or equal to a second complexity reference threshold, marking the welding spot as a complex welding spot.
Preferably, for a simple welding spot, the process of dynamically adjusting the detection time according to the complexity coefficient is as follows:
Setting initial detection time for simple welding spot Representing;
according to the complexity coefficient of the simple welding spot, dynamically adjusting the detection time of the simple welding spot The adjustment formula is: /(I)Wherein/>The adjustment coefficient is a simple welding spot and is used for controlling the adjustment speed; /(I)Is a simple solder joint complexity threshold.
Preferably, for a general welding spot, the process of dynamically adjusting the detection time according to the complexity coefficient is as follows:
setting initial detection time for common welding spot Representing;
according to the complexity coefficient of the simple welding spot, dynamically adjusting the detection time of the simple welding spot The adjustment formula is: /(I)Wherein/>The adjustment coefficient is the adjustment coefficient of a common welding spot; /(I)Is a general solder joint complexity threshold.
Preferably, for a complex welding spot, the process of dynamically adjusting the detection time according to the complexity coefficient is as follows:
Setting initial detection time for complex welding spots Representing;
according to the complexity coefficient of the complex welding spot, dynamically adjusting the detection time of the simple welding spot The adjustment formula is: /(I)Wherein/>The adjustment coefficient is the adjustment coefficient of the complex welding spot; /(I)Is a complex solder joint complexity threshold.
The intelligent welding spot analysis optimization system for the PCBA comprises an image enhancement module, a feature extraction module, a complexity evaluation module, a classification marking module and a dynamic regulation and control module;
The image enhancement module extracts a welding spot area from the PCBA image to carry out image enhancement so as to improve the identification degree of welding spots;
the feature extraction module extracts features from each welding spot area through a contour extraction image processing method;
The complexity evaluation module is used for evaluating the complexity of each welding spot according to the geometric characteristics and morphological characteristics of the welding spot and the result of feature extraction;
the classification marking module is used for marking welding spots with different complexity based on the evaluation results of the geometric feature and the morphological feature complexity, and classifying the welding spots into simple welding spots, general welding spots or complex welding spots;
And the dynamic regulation and control module dynamically regulates the detection time of a simple welding spot, a general welding spot or a complex welding spot according to the data monitored in real time according to the welding spots of different mark types, so as to realize the efficient detection of the welding spots of different mark types.
In the technical scheme, the invention has the technical effects and advantages that:
The method has the advantages that through image processing technologies such as image enhancement and contour extraction, effective feature extraction is carried out on welding areas, the identification degree of welding spots is improved, so that the detection accuracy is enhanced, and through evaluating geometric features and morphological features of the welding spots, the welding spots are divided into three categories of simplicity, generality and complexity, so that a detection algorithm can adopt different processing strategies for the welding spots with different complexity, and the detection efficiency is improved.
Through dynamic adjustment welding spot detection time, according to the real-time monitoring data of different welding spot complexity, realize the intelligent regulation and control to simple welding spot, general welding spot and complicated welding spot, to simple welding spot, because its detection time is shorter, can not influence the rhythm of whole production line, improved production efficiency, and to complicated welding spot, because its detection time probably is longer, needs more attention and resource, but through intelligent regulation and control, still can guarantee efficient testing process, avoid production efficiency's decline.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments described in the present application, and other drawings may be obtained according to these drawings for those skilled in the art.
FIG. 1 is a flow chart of a method of the present invention for intelligent solder joint analysis optimization for PCBA boards.
FIG. 2 is a block diagram of an intelligent solder joint analysis optimization system for PCBA boards of the present invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments may be embodied in many forms and should not be construed as limited to the examples set forth herein; rather, these example embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of the example embodiments to those skilled in the art.
The invention provides an intelligent welding spot analysis optimization method for a PCBA board as shown in FIG. 1, which comprises the following steps:
extracting a welding spot area from the PCBA image for image enhancement so as to improve the identification degree of welding spots;
The purpose of image enhancement is to improve the recognition of the welding spots by improving the quality and definition of the image, and the following are common image enhancement techniques and their roles (including but not limited to, intelligent selection according to practical situations):
denoising: noise in the image, such as camera sensor noise, circuit interference, etc., is removed to reduce interference with weld detection. Common denoising techniques include median filtering, gaussian filtering, mean filtering, and the like.
Contrast enhancement: the contrast ratio of the welding spots and surrounding areas in the image is enhanced, so that the welding spots are more prominent, and the subsequent detection and analysis are facilitated. The contrast ratio of the image can be improved by the methods of contrast ratio stretching, histogram equalization and the like.
Brightness adjustment: the brightness of the image is adjusted to make the welding spot area brighter or darker so as to adapt to the image detection under different illumination conditions. The brightness of the image is adjusted linearly or nonlinearly, such as gamma correction, histogram matching, etc.
Edge enhancement: the edges between the welding spots and the background in the image are highlighted to enhance the outline characteristics of the welding spots, so that the detection and the segmentation are facilitated. Edge detection algorithms, such as Sobel, prewitt or Canny operators, are used to detect edges in the image.
Removing blurring: the blurring effect in the image is removed, so that the welding spot area is clearer and sharper, and the position and the shape of the welding spot can be accurately detected. Deblurring algorithms such as inverse filtering, wiener filtering, or nonlinear deblurring are used.
Color enhancement: the color difference between the spot and surrounding area in the image is enhanced to improve the visibility of the spot. And parameters such as color balance, hue, saturation and the like of the image are adjusted, so that the welding spot area and the surrounding environment are more prominent.
Extracting features from each welding spot area by a contour extraction image processing method;
the feature extraction method for each welding spot area comprises the following steps of:
performing edge detection on the preprocessed image so as to find out the outline of the welding spot;
common edge detection algorithms include Sobel, prewitt, canny, etc.
Extracting the outline of the edge information obtained through edge detection, and separating the outline of the welding spot area;
Contour extraction functions in an image processing library, such as findContours functions in OpenCV, may be used.
Extracting the characteristics of each contour to describe the specific form of the welding spot area;
Specific forms include information such as the shape, size, direction and the like of welding spots, and common contour features include contour area, perimeter, center point coordinates, aspect ratio of circumscribed rectangles or ellipses and the like.
Combining the extracted contour features into feature vectors to represent features of each solder joint region;
different feature description methods, such as shape descriptors, statistical features, etc., may be selected as desired.
The extracted feature vectors are stored in a dataset as input data for a machine learning algorithm.
According to the feature extraction result, carrying out complexity evaluation on each welding spot according to the geometric features and morphological features of the welding spot;
the geometric characteristics of a weld point refer to attributes related to the shape, size, and location of the weld point. These features include area, perimeter, center position, aspect ratio, area ratio, orientation, etc. of the weld spot. The area may represent the size of the weld spot, the perimeter reflects the length of the outline of the weld spot, the center location provides accurate location information of the weld spot, the aspect ratio may describe whether the shape of the weld spot is nearly a perfect circle or square, and the direction indicates the orientation of the weld spot. By extracting the geometric features, the basic morphological features of the welding spots can be quantitatively described, and important information is provided for subsequent analysis and optimization.
Morphological characteristics of a weld refer to attributes related to the appearance and shape of the weld. These features include shape, texture, edge features, etc. of the solder joint. The shape of the solder joint may be circular, square, rectangular, etc., while the texture of the solder joint may be smooth, rough, etc. Edge features describe the transition of the weld spot to the surrounding background, such as the sharpness, smoothness, etc. of the edge. By extracting the morphological characteristics, the appearance characteristics of the welding spots can be described more carefully, and more accurate basis is provided for detection, identification and classification of the welding spots.
When each welding spot is subjected to complexity evaluation according to the geometric characteristics of the welding spots, generating a geometric characteristic complexity index through the geometric characteristics of the welding spots, wherein the generating logic of the geometric characteristic complexity index is as follows:
marking the preprocessed PCBA image as I;
performing haar wavelet transformation on the preprocessed image I to obtain the horizontal direction of the image And vertical direction/>Components of (2);
These components represent edge information in different directions in the image.
The energy of the edge component in the horizontal and vertical directions is calculated and used as a measure of the complexity of the geometric characteristics of the welding spot area, and the energy is calculated according to the following formula:,/> wherein/> Representing pixel locations in an image,/>And/>Representing haar wavelet transform coefficients in horizontal and vertical directions, respectively,/>And/>Representing the edge component energy in the horizontal and vertical directions, respectively;
According to energy in horizontal and vertical directions And/>Calculating the geometric feature complexity G of the welding spot area, wherein the calculated expression is as follows: /(I)
This ratio represents the relative intensity of the horizontal and vertical edge information. When the energy in the horizontal direction and the energy in the vertical direction are equal, the complexity index G is 1, and the geometric characteristics of the welding spots are uniform; when the energy in the horizontal direction is large, the value of G deviates from 1, which means that the geometrical characteristics of the welding spot are more complex.
Calculating a geometric feature complexity index through the geometric feature complexity G, wherein the calculated expression is as follows: in the above, the ratio of/> Representing the geometric feature complexity index.
From the calculation formula, the complexity index G is closer to 1, namely the geometric feature complexity indexThe smaller the expression value of (2), the more uniform and less complex the geometric feature of the weld, the more the complexity index G deviates from 1, i.e., the geometric feature complexity indexThe larger the representation of (c) indicates the more non-uniform and more complex the geometric features of the weld.
When each welding spot is evaluated in complexity according to the morphological characteristics of the welding spot, generating a morphological characteristic complexity index through the morphological characteristics of the welding spot, and generating logic of the morphological characteristic complexity index is as follows:
Marking the preprocessed PCBA image as
Extracting the edge of the welding spot area by using an edge detection algorithm (such as Canny edge detection), and marking the obtained edge image as E;
And extracting the contour of the welding spot area by using a contour extraction algorithm (such as findContours functions) according to the edge detection result E, wherein the obtained contour set is marked as C, and then: Wherein/> Representing the outline of the kth weld;
for each contour Morphological feature calculations including perimeter/>Sum area/>
The perimeter and area of the outline can be calculated using functions in an image processing library, which are commonly used to calculate the perimeter and area of the outline, including cv2.arclength () and cv2.contourarea () in OpenCV. The cv2.arcLength () function is used to calculate the perimeter of the contour, accept the contour as an input parameter, and can choose to calculate the perimeter of a closed contour or an open contour. While the cv2.Contourarea () function is used to calculate the area of the contour, also accepting the contour as an input parameter. Both functions can quickly and accurately calculate the perimeter and the area of the contour, and are important tools for contour feature analysis.
Calculating a morphological feature complexity index, wherein the calculated expression is: in the above, the ratio of/> Representing morphological feature complexity index,/>Represents the circumference of the kth weld,/>Represents the area of the kth solder joint;
the morphological feature complexity index reflects the complexity of the morphological feature of the weld, when the perimeter of the weld is Larger and area/>At a smaller scale, morphological feature complexity index/>The value of (2) is larger, and the morphological characteristics of the welding spots are more complex; otherwise, the morphological characteristics of the welding spots are simpler.
Based on the evaluation results of the geometric feature and the morphological feature complexity, marking the welding spots with different complexity into categories of welding spots, and classifying the welding spots into simple welding spots, general welding spots or complex welding spots;
Obtaining geometric feature complexity index of welding spot And morphological feature complexity index/>Then, a welding spot complexity analysis model is established, and a complexity coefficient/> isgeneratedBy complexity factor/>The complexity of the solder joint is evaluated.
The specific implementation manner of the welding spot complexity analysis model is not specifically limited herein, and can realize the indexing of geometric feature complexityAnd morphological feature complexity index/>Performing comprehensive analysis and generating complexity coefficientsThe invention provides a specific implementation mode for realizing the technical scheme of the invention;
Complexity coefficient The generated calculation formula is as follows: /(I)In the above, the ratio of/>、/>Geometric feature complexity index/>, respectivelyAnd morphological feature complexity index/>And/>、/>Are all greater than 0.
As can be seen from the calculation formula, the larger the expression value of the geometric feature complexity index of the welding spot is, the larger the expression value of the morphological feature complexity index is, namely the complexity coefficient of the welding spotThe larger the performance value of (c) indicates the more complex the weld, and conversely indicates the less complex the weld.
Comparing and analyzing the complexity coefficient generated by the welding spot with a preset first complexity reference threshold value and a preset second complexity reference threshold value, wherein the first complexity reference threshold value is smaller than the second complexity reference threshold value, and comparing and analyzing results are as follows:
If the complexity coefficient generated by the welding spot meets the complexity coefficient smaller than the first complexity reference threshold, marking the welding spot as a simple welding spot;
if the complexity coefficient generated by the welding spot meets the complexity coefficient that is larger than or equal to the first complexity reference threshold value and smaller than the second complexity reference threshold value, marking the welding spot as a common welding spot;
and if the complexity coefficient generated by the welding spot meets the complexity coefficient more than or equal to a second complexity reference threshold, marking the welding spot as a complex welding spot.
According to the welding spots of different mark types, the detection time of a simple welding spot, a general welding spot or a complex welding spot is dynamically adjusted according to the data monitored in real time, so that the welding spots of different mark types are efficiently detected;
for complex welds, morphological algorithms are used to extract their features and detect them. The method comprises the following specific steps:
Pretreatment: firstly, preprocessing PCBA images, including denoising, image enhancement and the like, so as to reduce interference and enhance the recognition degree of welding spots. This may be achieved by filters or other image processing techniques.
Binarization: and converting the preprocessed image into a binary image so as to facilitate the application of morphological algorithm. The binarization process separates the solder joint from the background in the image so that the solder joint appears as a white area and the background is black.
Morphological operations: morphological operations such as dilation, erosion, open and close operations, etc. are used to process the binary image to highlight the features of the weld. The method comprises the following specific steps:
Expansion operation: the expansion operation may increase the size and connectivity of the solder joint, making the solder joint easier to detect. This helps to fill voids inside the solder joint and to merge adjacent solder joints into one piece.
And (3) corrosion operation: the etching operation may reduce the size of the solder joint and eliminate some unnecessary detail. This helps to remove noise and small discontinuities, making the weld spot clearer.
And (3) carrying out an opening operation: the open operation is to perform the etching operation first and then the expansion operation. It can eliminate fine objects in the image, and keep large communication area, which is helpful for separating interference between welding spots.
Closing operation: the closing operation is to perform the expansion operation first and then the corrosion operation. It can fill the hollow inside the welding spot and eliminate the isolated point and tiny void around the welding spot.
Feature extraction: after morphological operation, feature extraction is performed to extract the morphology and geometric features, such as area, perimeter, shape, etc., of the solder joint. These features can be used for further analysis.
For a general solder joint, an edge detection algorithm is used for detection. The method comprises the following specific steps:
Pretreatment: the PCBA image is preprocessed, and the method comprises the steps of denoising, image enhancement and the like, so that the recognition degree of welding spots is improved. Common pretreatment methods include gaussian filtering, median filtering, and the like.
Graying: the preprocessed color image is converted into a gray scale image. Edge detection algorithms typically operate on grayscale images because grayscale images have only one channel and are easier to process.
Edge detection: the gray scale image is processed using an edge detection algorithm to detect the edges of the solder joints. Common edge detection algorithms include Sobel operator, prewitt operator, canny edge detection, etc. These algorithms will find areas of greater gray scale variation in the image, which generally correspond to the edges of the weld spot.
And (3) threshold processing: and carrying out threshold processing on the edge detection result, and converting the gray level image into a binary image. The appropriate threshold may be selected to further highlight the edges of the solder joint depending on the situation.
Contour extraction: and carrying out contour extraction on the binary image to obtain contour information of the welding spot. Common contour extraction methods include the use of findContours functions (in image processing libraries such as OpenCV).
Screening profile: and screening out the outline conforming to the characteristics of a common welding spot according to the characteristics of the outline, such as area, perimeter and the like. These features can be used to distinguish between solder joints and other disturbances in the image.
Morphological treatment: the detected welding spots are further processed through morphological processing such as expansion, corrosion and the like to fill cavities or eliminate tiny noise points, so that the detection accuracy and stability are improved.
Post-treatment: post-processing is performed on the detected welding spots, such as connecting adjacent contours, removing overlapping contours, etc., so as to obtain more accurate welding spot detection results.
For simple welds, a contour detection algorithm is used for detection. The method comprises the following specific steps:
Pretreatment: the PCBA image is preprocessed, and the method comprises the steps of denoising, image enhancement and the like, so that the recognition degree of welding spots is improved. Common pretreatment methods include gaussian filtering, median filtering, and the like.
Graying: the preprocessed color image is converted into a gray scale image. Contour detection algorithms typically operate on grayscale images because grayscale images have only one channel and are easier to process.
Edge detection: the gray scale image is processed using an edge detection algorithm to detect the edges of the solder joints. Common edge detection algorithms include Sobel operator, prewitt operator, canny edge detection, etc. These algorithms will find areas of greater gray scale variation in the image, which generally correspond to the edges of the weld spot.
And (3) threshold processing: and carrying out threshold processing on the edge detection result, and converting the gray level image into a binary image. The appropriate threshold may be selected to further highlight the edges of the solder joint depending on the situation.
Contour extraction: and carrying out contour extraction on the binary image to obtain contour information of the welding spot. Common contour extraction methods include the use of findContours functions (in image processing libraries such as OpenCV).
For a simple welding spot, the process of dynamically adjusting the detection time according to the complexity coefficient is as follows:
Setting initial detection time for simple welding spot Representing;
according to the complexity coefficient of the simple welding spot, dynamically adjusting the detection time of the simple welding spot The adjustment formula is: /(I)Wherein/>The adjustment coefficient is a simple welding spot and is used for controlling the adjustment speed; /(I)For a simple spot-complexity threshold, i.e. when the complexity factor is below the simple spot-complexity threshold, the shorter the detection time.
For a general welding spot, the process of dynamically adjusting the detection time according to the complexity coefficient is as follows:
setting initial detection time for common welding spot Representing;
according to the complexity coefficient of the simple welding spot, dynamically adjusting the detection time of the simple welding spot The adjustment formula is: /(I)Wherein/>The adjustment coefficient is the adjustment coefficient of a common welding spot; /(I)Is a general solder joint complexity threshold.
For complex welding spots, the process of dynamically adjusting the detection time according to the complexity coefficient is as follows:
Setting initial detection time for complex welding spots Representing;
according to the complexity coefficient of the complex welding spot, dynamically adjusting the detection time of the simple welding spot The adjustment formula is: /(I)Wherein/>The adjustment coefficient is the adjustment coefficient of the complex welding spot; /(I)Is a complex solder joint complexity threshold.
According to the real-time monitoring data, algorithm parameters can be updated continuously to adapt to detection requirements under different environments and conditions, such as、/>、/>And/>、/>、/>The real-time updating can be performed according to methods such as feedback control or reinforcement learning.
The method has the advantages that through image processing technologies such as image enhancement and contour extraction, effective feature extraction is carried out on welding areas, the identification degree of welding spots is improved, so that the detection accuracy is enhanced, and through evaluating geometric features and morphological features of the welding spots, the welding spots are divided into three categories of simplicity, generality and complexity, so that a detection algorithm can adopt different processing strategies for the welding spots with different complexity, and the detection efficiency is improved.
Through dynamic adjustment welding spot detection time, according to the real-time monitoring data of different welding spot complexity, realize the intelligent regulation and control to simple welding spot, general welding spot and complicated welding spot, to simple welding spot, because its detection time is shorter, can not influence the rhythm of whole production line, improved production efficiency, and to complicated welding spot, because its detection time probably is longer, needs more attention and resource, but through intelligent regulation and control, still can guarantee efficient testing process, avoid production efficiency's decline.
The invention provides an intelligent welding spot analysis optimizing system for a PCBA board as shown in FIG. 2, which comprises an image enhancement module, a feature extraction module, a complexity evaluation module, a classification marking module and a dynamic regulation and control module;
The image enhancement module extracts a welding spot area from the PCBA image to carry out image enhancement so as to improve the identification degree of welding spots;
the feature extraction module extracts features from each welding spot area through a contour extraction image processing method;
The complexity evaluation module is used for evaluating the complexity of each welding spot according to the geometric characteristics and morphological characteristics of the welding spot and the result of feature extraction;
the classification marking module is used for marking welding spots with different complexity based on the evaluation results of the geometric feature and the morphological feature complexity, and classifying the welding spots into simple welding spots, general welding spots or complex welding spots;
the dynamic regulation and control module dynamically regulates detection time of a simple welding spot, a general welding spot or a complex welding spot according to the welding spots of different mark types and the data monitored in real time so as to realize high-efficiency detection of the welding spots of different mark types;
The intelligent welding spot analysis optimizing method for the PCBA board is realized through the intelligent welding spot analysis optimizing system for the PCBA board, and the specific method and the flow of the intelligent welding spot analysis optimizing system for the PCBA board are detailed in the embodiment of the intelligent welding spot analysis optimizing method for the PCBA board, and are not repeated herein.
The above formulas are all formulas with dimensions removed and numerical values calculated, the formulas are formulas with a large amount of data collected for software simulation to obtain the latest real situation, and preset parameters in the formulas are set by those skilled in the art according to the actual situation.
The above embodiments may be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented in software, the above-described embodiments may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions or computer programs. When the computer instructions or computer program are loaded or executed on a computer, the processes or functions described in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website site, computer, server, or data center to another website site, computer, server, or data center by wired or wireless means (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more sets of available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium may be a solid state disk.
It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. The intelligent welding spot analysis optimization method for the PCBA board is characterized by comprising the following steps of:
extracting a welding spot area from the PCBA image for image enhancement so as to improve the identification degree of welding spots;
extracting features from each welding spot area by a contour extraction image processing method;
According to the feature extraction result, carrying out complexity evaluation on each welding spot according to the geometric features and morphological features of the welding spot;
Based on the evaluation results of the geometric feature and the morphological feature complexity, marking the welding spots with different complexity into categories of welding spots, and classifying the welding spots into simple welding spots, general welding spots or complex welding spots;
according to the welding spots of different mark types, the detection time of a simple welding spot, a general welding spot or a complex welding spot is dynamically adjusted according to the data monitored in real time, so that the high-efficiency detection of the welding spots of different mark types is realized.
2. The intelligent solder joint analysis optimization method for a PCBA board according to claim 1, wherein the step of extracting features for each solder joint region by a contour extraction image processing method is as follows:
performing edge detection on the preprocessed image so as to find out the outline of the welding spot;
extracting the outline of the edge information obtained through edge detection, and separating the outline of the welding spot area;
extracting the characteristics of each contour to describe the specific form of the welding spot area;
Combining the extracted contour features into feature vectors to represent features of each solder joint region;
the extracted feature vectors are stored in a dataset as input data for a machine learning algorithm.
3. The intelligent solder joint analysis optimization method for a PCBA board according to claim 1, wherein when each solder joint is evaluated in complexity according to the geometrical characteristics of the solder joint, the geometrical characteristic complexity index is generated by the geometrical characteristics of the solder joint, and the logic for generating the geometrical characteristic complexity index is:
marking the preprocessed PCBA image as I;
performing haar wavelet transformation on the preprocessed image I to obtain the horizontal direction of the image And vertical direction/>Components of (2);
The energy of the edge component in the horizontal and vertical directions is calculated and used as a measure of the complexity of the geometric characteristics of the welding spot area, and the energy is calculated according to the following formula: ,/> wherein/> Representing pixel locations in an image,/>And/>Representing haar wavelet transform coefficients in horizontal and vertical directions, respectively,/>And/>Representing the edge component energy in the horizontal and vertical directions, respectively;
According to energy in horizontal and vertical directions And/>Calculating the geometric feature complexity G of the welding spot area, wherein the calculated expression is as follows: /(I)
Calculating a geometric feature complexity index through the geometric feature complexity G, wherein the calculated expression is as follows: in the above, the ratio of/> Representing the geometric feature complexity index.
4. The intelligent solder joint analysis optimization method for a PCBA board according to claim 3, wherein when complexity evaluation is performed on each solder joint according to the morphological characteristics of the solder joint, the morphological characteristics complexity index is generated through the morphological characteristics of the solder joint, and then the generation logic of the morphological characteristics complexity index is as follows:
Marking the preprocessed PCBA image as
Extracting the edge of the welding spot area by using an edge detection algorithm, and marking the obtained edge image as E;
And extracting the contour of the welding spot area by using a contour extraction algorithm according to the edge detection result E, wherein the obtained contour set is marked as C, and then: Wherein/> Representing the outline of the kth weld;
for each contour Morphological feature calculations including perimeter/>Sum area/>
Calculating a morphological feature complexity index, wherein the calculated expression is: in the above, the ratio of/> Representing morphological feature complexity index,/>Represents the circumference of the kth weld,/>Representing the area of the kth solder joint.
5. The intelligent solder joint analysis optimization method for PCBA boards as in claim 4, wherein the geometric feature complexity index of the solder joint is obtainedAnd morphological feature complexity index/>Then, a welding spot complexity analysis model is established, and a complexity coefficient/> isgeneratedBy complexity factor/>The complexity of the solder joint is evaluated.
6. The intelligent solder joint analysis optimization method for a PCBA board according to claim 5, wherein the complexity coefficient of solder joint generation is compared with a first complexity reference threshold and a second complexity reference threshold set in advance, wherein the first complexity reference threshold is smaller than the second complexity reference threshold, and the result of the comparison analysis is as follows:
If the complexity coefficient generated by the welding spot meets the complexity coefficient smaller than the first complexity reference threshold, marking the welding spot as a simple welding spot;
if the complexity coefficient generated by the welding spot meets the complexity coefficient that is larger than or equal to the first complexity reference threshold value and smaller than the second complexity reference threshold value, marking the welding spot as a common welding spot;
and if the complexity coefficient generated by the welding spot meets the complexity coefficient more than or equal to a second complexity reference threshold, marking the welding spot as a complex welding spot.
7. The intelligent solder joint analysis optimization method for a PCBA board according to claim 6, wherein for simple solder joints, the process of dynamically adjusting the detection time according to the complexity factor is as follows:
Setting initial detection time for simple welding spot Representing;
according to the complexity coefficient of the simple welding spot, dynamically adjusting the detection time of the simple welding spot The adjustment formula is: wherein/> The adjustment coefficient is a simple welding spot and is used for controlling the adjustment speed; /(I)Is a simple solder joint complexity threshold.
8. The intelligent solder joint analysis optimization method for a PCBA board according to claim 6, wherein for a general solder joint, the process of dynamically adjusting the detection time according to the complexity coefficient is as follows:
setting initial detection time for common welding spot Representing;
according to the complexity coefficient of the simple welding spot, dynamically adjusting the detection time of the simple welding spot The adjustment formula is: wherein/> The adjustment coefficient is the adjustment coefficient of a common welding spot; /(I)Is a general solder joint complexity threshold.
9. The intelligent solder joint analysis optimization method for a PCBA board according to claim 6, wherein for complex solder joints, the process of dynamically adjusting the detection time according to the complexity factor is as follows:
Setting initial detection time for complex welding spots Representing;
according to the complexity coefficient of the complex welding spot, dynamically adjusting the detection time of the simple welding spot The adjustment formula is: wherein/> The adjustment coefficient is the adjustment coefficient of the complex welding spot; /(I)Is a complex solder joint complexity threshold.
10. An intelligent welding spot analysis optimizing system for a PCBA board, which is used for realizing the intelligent welding spot analysis optimizing method for the PCBA board according to any one of the claims 1-9, and is characterized by comprising an image enhancement module, a feature extraction module, a complexity evaluation module, a classification marking module and a dynamic regulation and control module;
The image enhancement module extracts a welding spot area from the PCBA image to carry out image enhancement so as to improve the identification degree of welding spots;
the feature extraction module extracts features from each welding spot area through a contour extraction image processing method;
The complexity evaluation module is used for evaluating the complexity of each welding spot according to the geometric characteristics and morphological characteristics of the welding spot and the result of feature extraction;
the classification marking module is used for marking welding spots with different complexity based on the evaluation results of the geometric feature and the morphological feature complexity, and classifying the welding spots into simple welding spots, general welding spots or complex welding spots;
And the dynamic regulation and control module dynamically regulates the detection time of a simple welding spot, a general welding spot or a complex welding spot according to the data monitored in real time according to the welding spots of different mark types, so as to realize the efficient detection of the welding spots of different mark types.
CN202410430429.8A 2024-04-11 2024-04-11 Intelligent welding spot analysis optimization method and system for PCBA board Active CN118037715B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410430429.8A CN118037715B (en) 2024-04-11 2024-04-11 Intelligent welding spot analysis optimization method and system for PCBA board

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410430429.8A CN118037715B (en) 2024-04-11 2024-04-11 Intelligent welding spot analysis optimization method and system for PCBA board

Publications (2)

Publication Number Publication Date
CN118037715A true CN118037715A (en) 2024-05-14
CN118037715B CN118037715B (en) 2024-06-14

Family

ID=90989719

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410430429.8A Active CN118037715B (en) 2024-04-11 2024-04-11 Intelligent welding spot analysis optimization method and system for PCBA board

Country Status (1)

Country Link
CN (1) CN118037715B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109813728A (en) * 2019-03-01 2019-05-28 沈阳建筑大学 A kind of circuit board solder joint detection method and system
CN110044920A (en) * 2019-04-26 2019-07-23 中国科学院自动化研究所 Wire-shaped workpieces solder joint weld quality prediction system and method
CN215866445U (en) * 2021-06-30 2022-02-18 深圳市华生威实业有限公司 PCB circuit board intellectual detection system device based on machine vision
US20230142578A1 (en) * 2021-11-09 2023-05-11 Fulian Yuzhan Precision Technology Co.,Ltd System and method for detecting welding based on edge computing

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109813728A (en) * 2019-03-01 2019-05-28 沈阳建筑大学 A kind of circuit board solder joint detection method and system
CN110044920A (en) * 2019-04-26 2019-07-23 中国科学院自动化研究所 Wire-shaped workpieces solder joint weld quality prediction system and method
CN215866445U (en) * 2021-06-30 2022-02-18 深圳市华生威实业有限公司 PCB circuit board intellectual detection system device based on machine vision
US20230142578A1 (en) * 2021-11-09 2023-05-11 Fulian Yuzhan Precision Technology Co.,Ltd System and method for detecting welding based on edge computing

Also Published As

Publication number Publication date
CN118037715B (en) 2024-06-14

Similar Documents

Publication Publication Date Title
CN109242853B (en) PCB defect intelligent detection method based on image processing
CN111815555A (en) Metal additive manufacturing image detection method and device combining anti-neural network with local binary
CN109472788B (en) Method for detecting flaw on surface of airplane rivet
CN115330758B (en) Welding quality detection method based on denoising treatment
CN111275659B (en) Weld image processing method and device, terminal equipment and storage medium
CN117611590B (en) Defect contour composite detection method, device, equipment and storage medium
CN112862744A (en) Intelligent detection method for internal defects of capacitor based on ultrasonic image
CN115661161A (en) Method, device, storage medium, equipment and program product for detecting defects of parts
CN113516619A (en) Product surface flaw identification method based on image processing technology
CN113066088A (en) Detection method, detection device and storage medium in industrial detection
CN117094975A (en) Method and device for detecting surface defects of steel and electronic equipment
CN114332081A (en) Textile surface abnormity determination method based on image processing
CN113971681A (en) Edge detection method for belt conveyor in complex environment
CN118037715B (en) Intelligent welding spot analysis optimization method and system for PCBA board
WO2018046407A1 (en) Particle boundary identification
CN114627113B (en) Method, system, device and medium for detecting defects of printed circuit board
CN115471684A (en) Injection molding workpiece template matching method, electronic equipment and storage medium
CN113222978A (en) Target identification method
Golodov et al. Weld segmentation and defect detection in radiographic images of pipe welds
CN117876270B (en) Archive scanning image restoration method, archive scanning image restoration device and storage medium
CN117474916B (en) Image detection method, electronic equipment and storage medium
CN116681628B (en) Business license data processing method and system based on deep learning
CN117911409B (en) Mobile phone screen bad line defect diagnosis method based on machine vision
Abdillah et al. Product Defect Detection using Image Template Matching with MATLAB
CN117830287A (en) Circuit board on-line detection and re-judgment algorithm

Legal Events

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