A visually assisted intelligent evaluation method for flux residue
Through visual assistance technology, we analyze images of welding points at different stages, calculate color differences and edge features, and combine with clustering algorithms to solve the problem that traditional detection methods cannot capture changes in flux, achieving a more accurate assessment of welding quality and welding process optimization. More precise control.
Patent Information
- Application Number
- CN202410734057.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-07
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2044-06-07
AI Technical Summary
Traditional flux residue detection methods cannot effectively capture and analyze the physical or chemical changes of flux in different time periods, resulting in a lack of in-depth understanding of the potential impact on solder joint quality, limiting early warning and intervention.
The flux residue intelligent assessment method with visual assistance is used to obtain images of the solder joint area at different stages, calculate the color difference sequence, color distribution time series change index, edge fluctuation coefficient and edge chaos change index, and combine with the clustering algorithm for evaluation.
It provides a more comprehensive and dynamic assessment of flux residues, improves assessment accuracy and welding quality evaluation, and supports the control of welding processes and product quality.
Smart Images

Figure CN118314137B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a visually assisted intelligent evaluation method for flux residue. Background Art
[0002] In today's rapid development of high-tech manufacturing industry, welding technology is the cornerstone of electronic component assembly, and its quality control is particularly important, especially in the fields of precision electronics, aerospace and automotive electronics, which have extremely strict requirements on the reliability of welding points. As a key auxiliary material to improve welding quality and efficiency, flux is used to reduce the surface tension of molten solder, promote wetting and prevent oxidation. At the same time, the residual problem of flux has become a hidden concern affecting the long-term stability and safety of electronic products.
[0003] Traditional flux residue detection methods, such as visual inspection, solvent cleaning inspection, and X-ray inspection, usually focus on the immediate state after welding, ignoring the potential impact of physical or chemical changes that may occur in the flux at different time periods (such as hours, days, or even longer after cleaning) on the quality of solder joints. The lack of information in the time series of these traditional detection methods not only limits the in-depth understanding of the impact of flux residues, but also hinders the early warning and intervention of potential risks to welding quality. Summary of the invention
[0004] In view of the above, it is necessary to provide a visually assisted intelligent evaluation method for flux residue. Compared with being able to systematically capture and analyze the changing trends and impacts of flux residue over time, this analysis method combined with the time dimension can provide a more comprehensive and dynamic perspective for flux residue evaluation, and improve the accuracy of flux residue evaluation and welding quality evaluation.
[0005] An embodiment of the present application provides a visually assisted intelligent evaluation method for flux residue, the method comprising:
[0006] Acquire original solder joint area images of each solder joint area at each preset stage, wherein the preset stages include: early stage, middle stage, and late stage;
[0007] According to the local color difference distribution of the original solder joint area image of each solder joint area at each preset stage, the color difference sequence of each solder joint area at each preset stage is obtained; the change trend of the color difference sequence of each solder joint area at different stages is compared to obtain the color difference fluctuation coefficient of each solder joint area; based on the overall color change degree and chaotic change degree of each solder joint area in all adjacent stages, combined with the color difference fluctuation coefficient, the color distribution time series change index of each solder joint area is obtained;
[0008] According to the difference in the distribution of edge features of the original solder joint area at different preset stages, the edge fluctuation coefficient and the corner fluctuation coefficient of each solder joint area are obtained; according to the local distribution characteristics of all edges of the solder joint area at different stages, the edge chaos variation index of the solder joint area is obtained; according to the edge fluctuation coefficient, the corner fluctuation coefficient and the edge chaos variation index of the solder joint area, the edge area irregularity of the solder joint area is obtained;
[0009] According to the color distribution time series change index of the solder joint area and the irregularity of the edge area, the flux residue in the solder joint area is evaluated in combination with the clustering algorithm.
[0010] In one embodiment, the step of acquiring the color difference sequence of each welding spot area in each preset stage includes:
[0011] For the original solder joint area image of each solder joint area at the initial stage, the average value of the color difference between each pixel and all neighboring pixels is obtained as the color difference mean of each pixel; the sequence composed of the color difference mean of all pixels in the original solder joint area image of each solder joint area at the initial stage is taken as the color difference sequence of each solder joint area at the initial stage.
[0012] In one embodiment, the step of obtaining the color difference fluctuation coefficient of each solder joint area is:
[0013] The first distance metric and the second distance metric between the color difference sequences of each solder joint area in the early and middle stages, and in the early and late stages are obtained respectively; the difference between the first distance metric and the second distance metric of each solder joint area is obtained, and recorded as the first difference of each solder joint area; the first similarity coefficient and the second similarity coefficient between the color difference sequences of each solder joint area in the early and middle stages, and in the early and late stages are obtained respectively; the difference between the first similarity coefficient and the second similarity coefficient of each solder joint area is obtained, and recorded as the second difference of each solder joint area; the color difference fluctuation coefficient of each solder joint area is in an increasing relationship with the first difference, and in a decreasing relationship with the second difference.
[0014] In one embodiment, the step of obtaining the color distribution time series variation index of each solder joint area is:
[0015] According to the grayscale average value and the difference in the degree of confusion of the original solder joint area images of each solder joint area in all adjacent stages, the first grayscale difference and the first entropy difference are obtained; the forward fusion of the color difference fluctuation coefficient of each solder joint area, the first grayscale difference and the first entropy difference is used as the color distribution time series change index of each solder joint area.
[0016] In one embodiment, the edge fluctuation coefficient and the corner fluctuation coefficient of each solder joint area are obtained as follows:
[0017] A window is constructed with each pixel point in the original solder joint area image of each preset stage as the center, and an edge number sequence and a corner point number sequence of each preset stage are obtained according to the texture edge features in the window of each pixel point in the original solder joint area image of each preset stage;
[0018] The third similarity coefficient, the fourth similarity coefficient, and the fifth similarity coefficient between the edge quantity sequences of each solder joint area in the early stage and the middle stage, the middle stage and the late stage, and the early stage and the late stage are respectively obtained; the difference between the third similarity coefficient and the fourth similarity coefficient of each solder joint area is obtained, and recorded as the third difference of each solder joint area; the difference between the fourth similarity coefficient and the fifth similarity coefficient of each solder joint area is obtained, and recorded as the fourth difference of each solder joint area; the edge fluctuation coefficient of each solder joint area is in an increasing relationship with the third difference and in a decreasing relationship with the fourth difference;
[0019] The same calculation method as the edge fluctuation coefficient of each solder joint area is adopted to obtain the corner point fluctuation coefficient of each solder joint area according to the sequence of corner point quantities in all preset stages.
[0020] In one embodiment, the step of obtaining the edge quantity sequence and the corner point quantity sequence of each preset stage is specifically as follows:
[0021] An edge detection algorithm is used to obtain edge curves of the original solder joint area images at each preset stage; a feature point detection algorithm is used to obtain feature points of the original solder joint area images at each preset stage;
[0022] For the original solder joint area image at each preset stage, the number of edge curves and corner points in the window of each pixel point is counted; the sequence consisting of the number of edge curves and the number of corner points corresponding to all pixel points is recorded as the edge number sequence and the corner point number sequence at each preset stage.
[0023] In one embodiment, the edge curve in the window is specifically an edge curve that is fully or partially contained in the window.
[0024] In one embodiment, the specific steps of obtaining the edge chaos variation index of each solder joint area include:
[0025] For the original solder joint area image of each preset stage, the centroid of each edge curve is taken as the neighborhood circle center, and the minimum distance from the centroid to the edge curve and the maximum value in the preset threshold are taken as the neighborhood radius; the number of edge curves in the circular neighborhood corresponding to each edge curve is counted, and recorded as the chaos degree of each edge curve; the average value of the chaos degrees of all edge curves in the original solder joint area image of each preset stage is obtained as the edge chaos index of each preset stage;
[0026] The growth rate of the edge chaos index of each solder joint area in the later period relative to the initial period is taken as the minuend, and the growth rate of the mean value of the edge curve chaos degree of each solder joint area in the middle period relative to the initial period is taken as the subtrahend to obtain the edge chaos change index of each solder joint area.
[0027] In one embodiment, the edge region irregularity of each solder joint region is specifically a forward fusion of the edge fluctuation coefficient, the corner point fluctuation coefficient and the edge chaos variation index of each solder joint region.
[0028] In one embodiment, the flux residue in each solder joint area is evaluated, and the specific steps include:
[0029] The vector composed of the color distribution time series variation index of each solder joint area and the irregularity of the edge area is used as the evaluation feature vector of each solder joint area;
[0030] The evaluation feature vectors of the solder joint area to be tested and a preset number of template solder joint areas are clustered. When the proportion of template solder joint areas with flux residues in the cluster where the solder joint area to be tested is greater than or equal to a preset residue threshold, it is determined that there is flux residue in the solder joint area to be tested; otherwise, it is determined that there is no flux residue in the solder joint area to be tested.
[0031] This application has at least the following beneficial effects:
[0032] This application first obtains the original solder joint area images at different stages to provide effective data information for the subsequent impact of flux on the solder joint area; obtains the color difference sequence to better analyze the local color distribution of each pixel point at each preset stage, providing a data basis for the subsequent color changes at different stages; constructs a color difference fluctuation index to measure the degree of color change caused by residual flux between different preset stages; constructs a color distribution time series change index to summarize the impact of residual flux on the solder joint area at different stages and the degree of color change caused; constructs the edge fluctuation coefficient and corner point fluctuation coefficient of the solder joint area to characterize the edge distribution and corner point distribution at each stage, which is useful for the subsequent analysis of different The data basis is provided for the texture changes in different stages; the edge chaos change index is constructed to measure the change characteristics of texture and edge curve according to the changes in the shape of the flux residue area in different stages; the edge area irregularity is constructed to comprehensively analyze the texture change characteristics in different stages; the evaluation and feature vectors are constructed to analyze the changes in visual features such as color, texture, and edge of the solder joint area. By performing time series analysis on the solder joint images at different time points after welding, the changing trend and influence of flux residue over time are accurately captured. The clustering algorithm is used to evaluate the flux residue, which makes the evaluation of flux residue more accurate and the evaluation of welding quality more precise, providing strong support for the control of welding process and product quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 A flowchart of a visually assisted intelligent evaluation method for flux residue provided in this application;
[0034] Figure 2 A schematic diagram of obtaining the color distribution temporal variation index provided in this application;
[0035] Figure 3 A schematic diagram of a pixel window provided for this application;
[0036] Figure 4 A schematic diagram of obtaining the irregularity of the edge area provided in this application;
[0037] Figure 5 Schematic diagram of the clustering results provided for this application. DETAILED DESCRIPTION
[0038] In the description of the embodiments of the present application, words such as "exemplary", "or", "for example" and the like are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "or", "for example" and the like is intended to present related concepts in a concrete manner.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art in the present application. The terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application.
[0040] It should also be noted that the terms "first" and "second" in this application and its drawings are used to distinguish similar objects, rather than to describe a specific order or sequence. The method disclosed in the embodiments of the present application or the method shown in the flow chart includes one or more steps for implementing the method. Without departing from the scope of protection of this application, the execution order of multiple steps can be interchanged with each other, and some steps can also be deleted.
[0041] 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 application belongs.
[0042] The present application embodiment first proposes a visually assisted intelligent evaluation method for flux residue, which is applied to the field of image processing technology. Figure 1 , the method comprises the following steps:
[0043] S1: Acquire original solder joint area images of each solder joint area at each preset stage.
[0044] A digital microscope with a camera function is used to observe and photograph the solder joint area at each preset stage to obtain the original solder joint area image at each preset stage. In some embodiments of the present application, the preset stages are the initial stage, the middle stage, and the late stage, wherein the initial stage refers to the third hour after the soldering is completed and cleaned; the middle stage refers to the third day after the soldering is completed and cleaned; and the late stage refers to the second week after the soldering is completed and cleaned, and the images at each corresponding moment are used as the original solder joint area images at each preset stage.
[0045] The original weld spot area images collected at each preset stage are denoised and converted into grayscale images. In some embodiments of the present application, a median filtering method is used to denoise the image. As other implementation methods, the implementer may choose other image processing techniques, which are not limited in the present application.
[0046] S2: According to the local color difference distribution of the original solder joint area image of each solder joint area in each preset stage, obtain the color difference sequence of each solder joint area in each preset stage; compare the change trend of the color difference sequence of each solder joint area in different stages to obtain the color difference fluctuation coefficient of each solder joint area; based on the overall color change degree and chaotic change degree of each solder joint area in all adjacent stages, combined with the color difference fluctuation coefficient, obtain the color distribution time series change index of each solder joint area.
[0047] In the initial stage after welding is completed and cleaned, the flux is in a state of not completely volatilizing or cleaning, and the color distribution of the solder joint area is uneven, that is, the color distribution of the solder joint area is more complicated; in the middle stage after welding is completed and cleaned, the flux residue may further evaporate, oxidize or degrade during this period, causing the color of the solder joint to deepen, or due to the adsorption of dust and impurities, mottled dark shadow areas may appear around the solder joint; in the late stage after welding is completed and cleaned, the flux residue during this period may cause signs of corrosion on the surface of the solder joint, such as yellowing, blackening, etc., and fixed white residues may form around the solder joint.
[0048] Based on this, the color difference sequence of each solder joint area in each preset stage is obtained, and the original solder joint area image of each solder joint area in the early stage is taken as an example for analysis:
[0049] For the original solder joint area image of each solder joint area at the initial stage, the average value of the color difference between each pixel and all neighboring pixels is obtained as the color difference mean of each pixel; the sequence composed of the color difference mean of all pixels in the original solder joint area image of each solder joint area at the initial stage is used as the color difference sequence of each solder joint area at the initial stage. The color difference sequence describes the color difference between each pixel in the initial image and the surrounding pixels.
[0050] The same method as the initial color difference sequence is used to obtain the mid-term and late color difference sequences, providing a data basis for subsequent color difference comparisons.
[0051] In some embodiments of the present application, the neighborhood pixel points are eight neighborhood pixel points. The implementer can select the neighborhood pixel points according to the actual situation, and the present application does not impose any restrictions on this.
[0052] It should be noted that if there are less than 8 neighboring pixels around a certain pixel, it will be calculated based on the existing pixels in the neighborhood without completion.
[0053] Due to the complexity of the components in the flux and the changes in the physical and chemical properties of different components over time, the colors presented are more diverse. Therefore, as the stages of welding are completed and cleaned, the color distribution becomes more and more complex, and the color difference in the solder joint area becomes larger and larger. When there is no flux residue, the solder joint presents a uniform and bright metallic color at each stage, that is, the color distribution at each stage is basically the same, and the color difference in the solder joint area remains basically unchanged.
[0054] Based on this, the color difference fluctuation coefficient of each solder joint area is obtained:
[0055] The first distance metric and the second distance metric between the color difference sequences of each solder joint area in the early and middle stages, and in the early and late stages are obtained respectively; the difference between the first distance metric and the second distance metric of each solder joint area is obtained, and recorded as the first difference of each solder joint area; the first similarity coefficient and the second similarity coefficient between the color difference sequences of each solder joint area in the early and middle stages, and in the early and late stages are obtained respectively; the difference between the first similarity coefficient and the second similarity coefficient of each solder joint area is obtained, and recorded as the second difference of each solder joint area; the color difference fluctuation coefficient of each solder joint area is in an increasing relationship with the first difference, and in a decreasing relationship with the second difference.
[0056] It should be noted that the distance metric between sequences is a method for measuring sequence differences, including: Euclidean distance, Manhattan distance, DTW distance, etc.; the similarity coefficient measures the degree of similarity between sequences, including: Pearson correlation coefficient, cosine similarity, Jaccard similarity, etc.; this application does not impose any restrictions on this.
[0057] It should be noted that the difference represents the numerical difference between variables, specifically: difference, absolute value of difference, ratio, etc., and this application does not impose any restrictions on this.
[0058] It should be noted that an increasing (decreasing) relationship indicates a trend in which as one variable increases, another variable also increases (decreases). Common increasing (decreasing) relationships include: linear increasing (decreasing) relationship, exponential increasing (decreasing) relationship, logarithmic increasing (decreasing) relationship, power function increasing (decreasing) relationship, periodic increasing (decreasing) relationship, gradual increasing (decreasing) relationship, etc. This application does not impose any restrictions on this.
[0059] In some embodiments of the present application, the Manhattan distance between the color difference sequences of the initial and later stages is used as the minuend, the Manhattan distance between the color difference sequences of the initial and intermediate grayscale images is used as the subtrahend, and the difference corresponding to the Manhattan distance is used as the numerator; then the Jaccard similarity between the color difference sequences of the initial and intermediate grayscale images is used as the minuend, the Jaccard similarity between the color difference sequences of the initial and later grayscale images is used as the subtrahend, the mapping of the difference corresponding to the Jaccard similarity to an exponential function with a natural constant as the base is used as the denominator, and the calculated fractional result is used as the color difference fluctuation coefficient of the solder joint area.
[0060] It should be further explained that if the area around the pixel is not contaminated by flux, the color difference in multiple stages is basically unchanged, and these parts are the intersection of the elements between the color difference sequences; however, in some cases, as the flux oxidizes or absorbs impurities such as dust, corrosion causes cracks, etc., the range of flux influence will increase, resulting in changes in the color difference of some pixels, thereby reducing the intersection of the elements between the color difference sequences. The physical and chemical properties of the flux change with the stage, which will lead to more diverse colors, making the color difference more diverse, thereby increasing the union of the elements between the color difference sequences, so that the Jaccard similarity gradually decreases with the change of the stage. In contrast, the Manhattan distance gradually increases as the stage changes, the colors presented are more diverse, making the color difference more diverse, and the Manhattan distance gradually increases. The Jaccard similarity considers the similarity of the color difference distribution as a whole, but does not consider the specific color difference size, and the Manhattan distance just makes up for this deficiency. Therefore, the larger the color difference fluctuation coefficient is, the greater the fluctuation of the color difference is with the change of stages, and the greater the influence of residual flux is; conversely, the smaller the color difference fluctuation coefficient is, the color difference remains basically unchanged in each stage, and there is basically no residual flux.
[0061] Based on this, the color distribution time series change index of each solder joint area is obtained:
[0062] According to the grayscale average value and the difference in the degree of confusion of the original solder joint area images of each solder joint area in all adjacent stages, the first grayscale difference and the first entropy difference are obtained; the forward fusion of the color difference fluctuation coefficient of each solder joint area, the first grayscale difference and the first entropy difference is used as the color distribution time series change index of each solder joint area.
[0063] It should be noted that the degree of chaos reflects the degree of dispersion of the overall data distribution, including: Gini impurity, information entropy, variance, etc.; this application does not impose any restrictions on this; forward fusion is specifically addition, multiplication, and mixed addition and multiplication operations, and this application does not impose any restrictions on this.
[0064] In some embodiments of the present application, the sum of the squares of the difference of the grayscale average values of the original solder joint images of each solder joint area in all adjacent stages is used as the first grayscale difference of each solder joint area, and the sum of the squares of the difference of the entropy of the original solder joint images of each solder joint area in all adjacent stages is used as the first entropy difference of each solder joint area; the product of the color difference fluctuation coefficient, the first grayscale difference and the first entropy difference of each solder joint area is used as the color distribution time series change index of each solder joint area. If there is flux residue, as the stage changes, the overall color is getting darker and darker, so the grayscale average value is gradually reduced, and the color is getting richer and richer, so that the entropy value is getting larger and larger, so the first grayscale difference and the first entropy difference are both large. If there is no flux residue, as the stage changes, the overall color is bright and uniform and almost unchanged, so the average grayscale value is basically unchanged, so the first grayscale difference and the first entropy difference are both close to 0.
[0065] Among them, the schematic diagram of obtaining the color distribution time series change index is as follows: Figure 2 shown.
[0066] S3: According to the difference in edge feature distribution of the original solder joint area of each solder joint area at different preset stages, the edge fluctuation coefficient and the corner fluctuation coefficient of each solder joint area are obtained; according to the local distribution characteristics of all edges of each solder joint area at different stages, the edge chaos variation index of each solder joint area is obtained; according to the edge fluctuation coefficient, the corner fluctuation coefficient and the edge chaos variation index of each solder joint area, the edge area irregularity of each solder joint area is obtained.
[0067] If there are a large number of solder joints or other metal parts in the solder joint area, these metal materials will also oxidize over time, resulting in changes in color richness and color difference, but often the oxidation of these parts only occurs in themselves and will not affect other parts, and the edges of each metal part are often relatively regular and smooth. In addition to causing color changes, residual flux will also cause changes in the appearance texture of the solder joint area. In the early stage after welding is completed and cleaned, irregular textures may appear in local areas; in the middle stage after welding is completed and cleaned, as the flux further oxidizes and absorbs impurities and dust, more obvious irregular textures may appear; in the late stage after welding is completed and cleaned, due to the corrosion of the solder joint surface by the flux, a large number of irregular textures will also appear on the solder joint surface.
[0068] Based on this, the edge fluctuation coefficient and corner fluctuation coefficient of each solder joint area are obtained:
[0069] An edge detection algorithm is used to obtain edge curves of the original solder joint area images at each preset stage; a feature point detection algorithm is used to obtain feature points of the original solder joint area images at each preset stage; and a window is constructed with each pixel point in the original solder joint area images at each preset stage as the center.
[0070] In some embodiments of the present application, the edge detection algorithm adopts the Canny edge detection algorithm; the feature point detection adopts the Harris corner detection algorithm; the size of the window of each pixel point is ; The implementer may choose other methods to obtain the edges and feature points of the image, and the implementer may also adjust the window size, and this application does not impose any restrictions on this.
[0071] It should be noted that if the window area of each pixel is less than 5×5, no additional area will be added.
[0072] Among them, the window diagram of the pixel point is as follows Figure 3 As shown; where A is a 5×5 window, B is an edge curve, and C is a corner point.
[0073] For the original solder joint area image at each preset stage, the number of edge curves and corner points in the window of each pixel point is counted; the sequence consisting of the number of edge curves and the number of corner points corresponding to all pixel points is recorded as the edge number sequence and the corner point number sequence at each preset stage.
[0074] It should be noted that the edge curve in the window refers to an edge curve that is fully or partially contained in the window.
[0075] The third similarity coefficient, the fourth similarity coefficient, and the fifth similarity coefficient between the edge quantity sequences of each solder point area in the early and middle stages, the middle and late stages, and the early and late stages are respectively obtained; the difference between the third similarity coefficient and the fourth similarity coefficient of each solder point area is obtained, and recorded as the third difference of each solder point area; the difference between the fourth similarity coefficient and the fifth similarity coefficient of each solder point area is obtained, and recorded as the fourth difference of each solder point area; the edge fluctuation coefficient of each solder point area is in an increasing relationship with the third difference, and in a decreasing relationship with the fourth difference.
[0076] In some embodiments of the present application, the difference between the Pearson correlation coefficient of the initial and mid-term edge quantity sequence and the Pearson correlation coefficient of the initial and late edge quantity sequence is recorded as the third difference; the difference between the Pearson correlation coefficient of the mid-term and late edge curve quantity sequence and the Pearson correlation coefficient of the initial and late edge curve quantity sequence is recorded as the fourth difference; the calculation results with natural constants as the base and the third difference and fourth difference as the exponent are used as the numerator and denominator respectively, and the obtained fractional results are used as the edge fluctuation coefficient of the solder joint area.
[0077] The same calculation method as the edge fluctuation coefficient of each solder joint area is adopted to obtain the corner point fluctuation coefficient of each solder joint area according to the sequence of corner point quantities in all preset stages.
[0078] In the solder joint area, the number of edge curves in the window that is not affected by residual flux at each stage remains basically unchanged, while the number of edge curves in the window affected by residual flux increases with the influence of oxidation, adsorption of impurities or dust, and corrosion, and the increase is greater the later the stage; in addition, some windows that were not affected by residual flux may also suffer some influence, which increases the number of edge curves. Therefore, with the change of stages, the sequence of the number of edge curves has a certain positive correlation, but the later the stage, the weaker this positive correlation is. Therefore, the Pearson correlation coefficient is the smallest in the early and late stages, followed by the middle and late stages, and the largest in the early and middle stages. Therefore, the larger the edge fluctuation coefficient, the greater the influence of residual flux on the solder joint area; the smaller the edge fluctuation coefficient, the closer it is to 1, which means that there is no residual flux or less residual flux in the solder joint area, and the influence is small.
[0079] Based on this, the edge chaos variation index of each solder joint area is obtained:
[0080] For the original solder joint area image of each preset stage, the centroid of each edge curve is taken as the neighborhood circle center, and the minimum distance from the centroid to the edge curve and the maximum value in the preset threshold are taken as the neighborhood radius; the number of edge curves in the circular neighborhood corresponding to each edge curve is counted, which is recorded as the chaos degree of each edge curve; the average value of the chaos degree of all edge curves in the original solder joint area image of each preset stage is obtained as the edge chaos index of each preset stage.
[0081] In some embodiments of the present application, the preset threshold is 5, which can be adjusted by the implementer; the average value of the chaos degree of all edge curves in the original solder joint area image at each preset stage is used as the edge chaos index at each preset stage.
[0082] The growth rate of the edge chaos index of each solder joint area in the later period relative to the initial period is taken as the minuend, and the growth rate of the mean value of the edge curve chaos degree of each solder joint area in the middle period relative to the initial period is taken as the subtrahend to obtain the edge chaos change index of the solder joint area. With the change of stages, the flux residue will lead to an increase in irregular edges, so that the edge chaos change index gradually increases. When there is no flux residue, the number of edge curves is basically unchanged, so the edge chaos change index is small.
[0083] Based on this, the edge irregularity of each solder joint area is obtained:
[0084] The edge region irregularity of each solder point region is specifically a positive fusion of the edge fluctuation coefficient, the corner point fluctuation coefficient and the edge chaos variation index of each solder point region.
[0085] In some embodiments of the present application, the sum of the edge fluctuation coefficient and the corner fluctuation coefficient of each solder joint area is calculated, and the product of the sum and the edge chaos variation index is used as the edge region irregularity of each solder joint area. If there is no flux residue or less flux residue in the solder joint area, the impact is small, then the edge fluctuation coefficient and the corner fluctuation coefficient are both small, and the edge chaos variation index is small, so the edge region irregularity is small.
[0086] Among them, the schematic diagram of obtaining the irregularity of the edge area is as follows: Figure 4 shown.
[0087] S4: Based on the color distribution time series change index of each solder joint area and the irregularity of the edge area, combined with the clustering algorithm, the flux residue of each solder joint area is evaluated.
[0088] The vector composed of the color distribution time series variation index of each solder joint area and the irregularity of the edge area is used as the evaluation feature vector of each solder joint area.
[0089] A preset number of manually annotated solder joint area images are used as solder joint areas of each template, wherein the solder joint area images with flux residues and the solder joint area images without flux residues each account for half.
[0090] The evaluation feature vectors of the solder joint area to be tested and a preset number of template solder joint areas are clustered. When the proportion of template solder joint areas with flux residues in the cluster where the solder joint area to be tested is greater than or equal to a preset residue threshold, it is determined that there is flux residue in the solder joint area to be tested; otherwise, it is determined that there is no flux residue in the solder joint area to be tested.
[0091] In some embodiments of the present application, the preset value is 100, that is, the number of template solder joint areas is 100; the clustering algorithm adopts the K-means algorithm, and the implementer may also choose other clustering algorithms, which is not limited by the present application; the residual threshold value is 50%.
[0092] It should be noted that the number of clusters is obtained by using the elbow method, which is a well-known technology and will not be described in detail in this application.
[0093] The clustering result diagram is as follows: Figure 5 As shown; the round dots represent the template solder joint areas with flux residues, the square dots represent the template solder joint areas determined to be free of flux residues, and the triangular dots are the solder joint areas to be evaluated.
[0094] The embodiment of the present application provides a method for intelligent evaluation of flux residue under visual assistance, the method comprising: firstly obtaining images of the original solder joint area at different stages, so as to provide effective data information for the subsequent influence of the flux on the solder joint area; obtaining a color difference sequence, so as to better analyze the local color distribution of each pixel point at each preset stage, and provide a data basis for the subsequent color changes at different stages; constructing a color difference fluctuation index, so as to measure the degree of color change caused by the residual flux between different preset stages; constructing a color distribution time series change index, so as to summarize the influence of the residual flux on the solder joint area at different stages, and the degree of color change caused; constructing an edge fluctuation coefficient and a corner fluctuation coefficient of the solder joint area, and analyzing the edge distribution of each stage with the color difference fluctuation index. The distribution of corner points is characterized to provide a data basis for the subsequent texture changes in different stages; an edge chaos change index is constructed to measure the change characteristics of texture and edge curves according to the changes in the shape of the flux residue area at different stages; the edge area irregularity is constructed to comprehensively analyze the texture change characteristics at different stages; an evaluation and feature vector is constructed to analyze the changes in visual features such as color, texture, and edge of the solder joint area. By performing time series analysis on the solder joint images at different time points after welding, the changing trend and influence of flux residue over time are accurately captured. The clustering algorithm is used to evaluate the flux residue, making the evaluation of flux residue more accurate and the evaluation of welding quality more precise, providing strong support for the control of welding process and product quality.
[0095] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.
[0096] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A visually assisted intelligent evaluation method for flux residue, characterized in that: The method comprises the following steps: The original solder joint area images of each solder joint area in each preset stage are obtained, wherein the preset stages include: early stage, middle stage, and late stage; according to the local color difference distribution of the original solder joint area images of each solder joint area in each preset stage, the color difference sequence of each solder joint area in each preset stage is obtained; the change trend of the color difference sequence of each solder joint area in different stages is compared to obtain the color difference fluctuation coefficient of each solder joint area; based on the overall color change degree and chaotic change degree of each solder joint area in all adjacent stages, combined with the color difference fluctuation coefficient, the color distribution time series change index of each solder joint area is obtained; according to the edge feature distribution difference of the original solder joint area of each solder joint area in different preset stages, the edge fluctuation coefficient and the corner point fluctuation coefficient of each solder joint area are obtained; according to the local distribution characteristics of all edges of each solder joint area in different stages, the edge chaos change index of each solder joint area is obtained; according to the edge fluctuation coefficient, the corner point fluctuation coefficient and the edge chaos change index of each solder joint area, the edge area irregularity of each solder joint area is obtained; according to the color distribution time series change index and the edge area irregularity of each solder joint area, combined with the clustering algorithm, the flux residue of each solder joint area is evaluated.
2. A visually assisted intelligent evaluation method for flux residue as claimed in claim 1, characterized in that: The step of acquiring the color difference sequence of each welding point area in each preset stage includes: For the original solder joint area image of each solder joint area at the initial stage, the average value of the color difference between each pixel and all the neighboring pixels is obtained as the color difference mean of each pixel; the sequence composed of the color difference mean of all the pixels in the original solder joint area image of each solder joint area at the initial stage is taken as the color difference sequence of each solder joint area at the initial stage.
3. A visually assisted intelligent evaluation method for flux residue as claimed in claim 1, characterized in that: The steps for obtaining the color difference fluctuation coefficient of each solder joint area are as follows: Obtaining the first distance metric and the second distance metric between the color difference sequences of each solder joint area in the early stage and the middle stage, and in the early stage and the late stage respectively; obtaining the difference between the first distance metric and the second distance metric of each solder joint area, and recording it as the first difference of each solder joint area; The first similarity coefficient and the second similarity coefficient between the color difference sequences of each solder joint area in the early and middle stages and in the early and late stages are respectively obtained; the difference between the first similarity coefficient and the second similarity coefficient of each solder joint area is obtained, and recorded as the second difference of each solder joint area; the color difference fluctuation coefficient of each solder joint area is in an increasing relationship with the first difference and in a decreasing relationship with the second difference.
4. The visually assisted intelligent evaluation method for flux residue according to claim 1, characterized in that: The steps for obtaining the color distribution time series variation index of each solder joint area are as follows: According to the grayscale average value and the difference in the degree of confusion of the original solder joint area images of each solder joint area in all adjacent stages, the first grayscale difference and the first entropy difference are obtained; the forward fusion of the color difference fluctuation coefficient of each solder joint area, the first grayscale difference and the first entropy difference is used as the color distribution time series change index of each solder joint area.
5. The visually assisted intelligent evaluation method for flux residue according to claim 1, characterized in that: The step of obtaining the edge fluctuation coefficient and the corner fluctuation coefficient of each solder joint area is specifically as follows: A window is constructed with each pixel point in the original solder joint area image of each preset stage as the center, and an edge quantity sequence and a corner quantity sequence of each preset stage are obtained according to the texture edge features in the window of each pixel point of the original solder joint area image of each preset stage; the third similarity coefficient, the fourth similarity coefficient and the fifth similarity coefficient between the edge quantity sequences of each solder joint area in the early and middle stages, the middle and late stages, and the early and late stages are obtained respectively; the difference between the third similarity coefficient and the fourth similarity coefficient of each solder joint area is obtained, which is recorded as the third difference of each solder joint area; the difference between the fourth similarity coefficient and the fifth similarity coefficient of each solder joint area is obtained, which is recorded as the fourth difference of each solder joint area; the edge fluctuation coefficient of each solder joint area is in an increasing relationship with the third difference and in a decreasing relationship with the fourth difference; the corner point fluctuation coefficient of each solder joint area is obtained according to the corner point quantity sequences of all preset stages using the same calculation method as the edge fluctuation coefficient of each solder joint area.
6. A visually assisted intelligent evaluation method for flux residue as claimed in claim 5, characterized in that: The step of obtaining the edge quantity sequence and the corner point quantity sequence of each preset stage is specifically as follows: An edge detection algorithm is used to obtain edge curves of the original solder joint area image at each preset stage; a feature point detection algorithm is used to obtain feature points of the original solder joint area image at each preset stage; for the original solder joint area image at each preset stage, the number of edge curves and corner points in the window of each pixel point is counted; and a sequence consisting of the number of edge curves and the number of corner points corresponding to all pixel points is recorded as an edge number sequence and a corner point number sequence at each preset stage.
7. A visually assisted intelligent evaluation method for flux residue as claimed in claim 6, characterized in that: The edge curve in the window is specifically an edge curve that is fully or partially contained in the window.
8. The visually assisted intelligent evaluation method for flux residue according to claim 1, characterized in that: The specific steps of obtaining the edge chaos variation index of each solder joint area include: For the original solder joint area images of each preset stage, the centroid of each edge curve is taken as the neighborhood circle center, and the minimum distance from the centroid to the edge curve and the maximum value in the preset threshold are taken as the neighborhood radius; the number of edge curves in the circular neighborhood corresponding to each edge curve is counted, which is recorded as the chaos degree of each edge curve; the average value of the chaos degree of all edge curves in the original solder joint area images of each preset stage is obtained as the edge chaos index of each preset stage; the growth rate of the edge chaos index of each solder joint area in the later stage relative to the initial stage is taken as the minuend, and the growth rate of the mean value of the chaos degree of the edge curve of each solder joint area in the middle stage relative to the initial stage is taken as the subtrahend, and the edge chaos change index of each solder joint area is obtained.
9. The visually assisted intelligent evaluation method for flux residue according to claim 1, characterized in that: The edge region irregularity of each solder point region is specifically a positive fusion of the edge fluctuation coefficient, the corner point fluctuation coefficient and the edge chaos variation index of each solder point region.
10. The visually assisted intelligent evaluation method for flux residue according to claim 1, characterized in that: The flux residue in each solder joint area is evaluated, and the specific steps include: The vector composed of the color distribution time series change index and the edge area irregularity of each solder point area is used as the evaluation feature vector of each solder point area; the evaluation feature vectors of the solder point area to be tested and the preset value of template solder point areas are clustered, and when the proportion of template solder point areas with flux residues in the cluster where the solder point area to be tested is greater than or equal to the preset residue threshold, it is judged that there is flux residue in the solder point area to be tested; otherwise, it is judged that there is no flux residue in the solder point area to be tested.
