CN116735612A - Welding defect detection method for precise electronic components - Google Patents

Welding defect detection method for precise electronic components Download PDF

Info

Publication number
CN116735612A
CN116735612A CN202311021529.7A CN202311021529A CN116735612A CN 116735612 A CN116735612 A CN 116735612A CN 202311021529 A CN202311021529 A CN 202311021529A CN 116735612 A CN116735612 A CN 116735612A
Authority
CN
China
Prior art keywords
welding
gray
area
areas
target
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
CN202311021529.7A
Other languages
Chinese (zh)
Other versions
CN116735612B (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.)
Shandong Jingyi Machinery Manufacturing Co ltd
Original Assignee
Shandong Jingyi Machinery Manufacturing Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Jingyi Machinery Manufacturing Co ltd filed Critical Shandong Jingyi Machinery Manufacturing Co ltd
Priority to CN202311021529.7A priority Critical patent/CN116735612B/en
Publication of CN116735612A publication Critical patent/CN116735612A/en
Application granted granted Critical
Publication of CN116735612B publication Critical patent/CN116735612B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30164Workpiece; Machine component
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Pathology (AREA)
  • Computing Systems (AREA)
  • Analytical Chemistry (AREA)
  • Chemical & Material Sciences (AREA)
  • Immunology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Signal Processing (AREA)
  • Artificial Intelligence (AREA)
  • Biochemistry (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention relates to the technical field of image data processing, and provides a welding defect detection method for a precise electronic component, which comprises the following steps: collecting a back image of the welded panel, cutting to obtain a panel image, and dividing to obtain a plurality of welding areas; acquiring a center point and a mutation point in each welding area, acquiring gray level fluctuation degree of each welding area according to the center point, the mutation point and the welding area edge, and determining a plurality of target areas according to the gray level fluctuation degree; acquiring gray entropy of each welding area, acquiring a plurality of reference areas according to the gray entropy, acquiring gray fluctuation degree of each reference area, and acquiring a plurality of standard areas according to gray fluctuation degree difference between the target area and the reference areas; and obtaining the optimal filter kernel size according to the distribution of the abrupt change points in each standard region, filtering to obtain a plurality of images to be detected, and detecting welding defects. The invention aims to denoise a detection image acquired self-adaptive filter kernel to improve defect detection accuracy.

Description

Welding defect detection method for precise electronic components
Technical Field
The invention relates to the technical field of image data processing, in particular to a welding defect detection method for a precise electronic component.
Background
The precise electronic component is a component part of an electronic element, a small machine and an instrument, and is usually composed of a plurality of parts, so that the precision electronic component has more varieties and smaller volume; during welding, the electronic components are subjectively seen as small welding spots one by one after the welding is finished due to the fact that the size of the electronic components is smaller, and the welding of the electronic components is mainly the small welding spots; however, in the image acquisition, the noise appears on the acquired image due to the interference of environmental factors on a pipeline and the self reason of a camera; because the distribution position of the noise points cannot be accurately determined, the virtual welding and normal welding positions in the image are affected by noise at the same time, the visual difference is small, and further, when the electronic components are identified, large errors can occur when welding defects of the electronic components are detected due to the distribution relation between the pixel points and the noise points in the welding area; in the filtering and denoising process, the size of the filter kernel determines the denoising effect in the image, the appearance characteristics of the noise points at the virtual welding position and the normal welding position are different, if the filter kernel with a fixed size is still used, the image is smoothed, the denoising effect is poor, and more original detail information is lost.
Disclosure of Invention
The invention provides a welding defect detection method for a precise electronic component, which aims to solve the problem that the defect detection result is inaccurate due to denoising of the existing fixed-size filtering check image, and adopts the following technical scheme:
one embodiment of the invention provides a method for detecting welding defects of a precision electronic component, which comprises the following steps:
collecting a back image of a panel welded by an electronic component, cutting the back image of the panel to obtain a panel image, and dividing the panel image to obtain a plurality of welding areas in the panel;
taking the pixel point with the maximum gray value in each welding area as the center point of each welding area, detecting and obtaining mutation points in each welding area, obtaining a plurality of mutation connecting lines in each welding area according to the center point, the mutation points and the edges of the welding areas, obtaining the gray change rate of each pixel point according to the gray value and distribution of each pixel point on the mutation connecting lines, obtaining the gray change rate curve and the gray change degree of each mutation connecting line according to the gray change rate, taking the gray change degree average value of all mutation connecting lines in each welding area as the gray fluctuation degree of each welding area, and obtaining a target area according to the gray fluctuation degree;
acquiring the gray entropy of each welding area, clustering the welding areas according to the size of the gray entropy to obtain two clusters, acquiring a plurality of reference areas according to the gray entropy of the welding areas in the clusters, acquiring the gray fluctuation degree of each reference area, and acquiring a plurality of standard areas in all the target areas according to the difference between the gray fluctuation degree of each target area and the gray fluctuation degree mean value of the reference areas;
and obtaining the optimal filter kernel size according to the distribution of the abrupt change points in each standard region, filtering all the welding regions through the filter kernels with the optimal filter kernel size to obtain a plurality of images to be detected, and detecting welding defects of all the images to be detected.
Optionally, the clipping acquires the panel image therein, including the specific method that:
and inputting the acquired panel back image into a panel segmentation network after training, outputting to obtain a panel region, and cutting the panel region in the panel back image to obtain a panel image.
Optionally, the detecting obtains the mutation point in each welding area, including the specific method that:
obtaining the average value of the gray level difference value absolute values of each pixel point and eight neighborhood pixel points in each welding area, recording the average value as the mutation amplitude value of each pixel point, carrying out linear normalization on the mutation amplitude values of all the pixel points in all the welding areas, recording the obtained result as the mutation degree of each pixel point, and taking the pixel points with the mutation degree larger than a second preset threshold value as mutation points to obtain a plurality of mutation points in each welding area.
Optionally, the method for obtaining a plurality of abrupt connection lines in each welding area according to the center point, the abrupt points and the edges of the welding areas includes the following specific steps:
and connecting the central point of each welding area with each abrupt change point respectively, and extending the central point to the edge point of each welding area to obtain a plurality of abrupt change connecting lines of each welding area.
Optionally, the method for obtaining the gray scale change rate of each pixel point according to the gray scale value and the distribution of each pixel point on the abrupt connection includes the following specific steps:
taking any one welding area as a target welding area, taking any one abrupt change connecting line in the target welding area as a target abrupt change connecting line, and starting from a central point, and the first point on the target abrupt change connecting lineGray scale change rate of each pixel point +.>The calculation method of (1) is as follows:
wherein ,represents the center point of the target welding zone, +.>Representing the +.sup.th on the mutation line of interest>The number of pixels in a pixel is one,represent center point and->Gray level difference of each pixel point, +.>Represent center point and->Euclidean distance of individual pixel points.
Optionally, the method for obtaining the gray level change rate curve and the gray level change degree of each abrupt connection line according to the gray level change rate includes the following specific steps:
taking any one welding area as a target welding area, taking any one abrupt change connecting line in the target welding area as a target abrupt change connecting line, and acquiring the gray change rate of each pixel point on the target abrupt change connecting line; establishing a gray level change rate curve of a target abrupt connection line in a target welding area by taking the abscissa as the ordinal number of the pixel points from the central point and the ordinate as the gray level change rate;
and taking the variance of all gray level change rates except the center point on the gray level change rate curve as the gray level change degree of the target abrupt connection line.
Optionally, the acquiring a plurality of reference areas according to the gray entropy of the welding area in the cluster includes the following specific methods:
and respectively acquiring the average value of gray entropy of all the welding areas in the two clusters, and taking the welding area contained in one cluster with the smallest average value as a reference area to obtain a plurality of reference areas.
Optionally, the method for obtaining the gray scale fluctuation degree of each reference area includes the following specific steps:
each reference area is a welding area, and the gray level fluctuation degree of the reference area corresponding to the welding area is used as the gray level fluctuation degree of each reference area.
Optionally, the method for obtaining a plurality of standard regions in all the target regions according to the difference between the gray level fluctuation degree of each target region and the gray level fluctuation degree mean value of the reference region includes the following specific steps:
obtaining the average value of gray fluctuation degrees of all reference areas, dividing all target areas as classification standards, wherein the division results are standard areas and non-standard areas, and setting a classification variance function in the classification processThe specific expression of (2) is as follows:
wherein ,represents the number of standard regions in the division result, +.>Mean value of the difference absolute value of gray scale fluctuation degree of standard region and classification standard under the dividing result at this time, +.>The average value of the gray level fluctuation degree of the non-standard area and the absolute value of the difference value of the classification standard under the dividing result at the moment is represented;
when the classification variance function is maximum, the classification result of the target area is the best, and the target area corresponding to the class with the minimum average value of the gray level fluctuation degree of the standard area and the difference absolute value of the classification standard under the classification result is taken as the final standard area.
Optionally, the obtaining the optimal filter kernel size according to the distribution of the mutation points in each standard area includes the following specific methods:
wherein ,indicate->Filter kernel size of individual standard regions, +.>Indicate->Number of mutation points in each standard region, +.>Indicate->The>Coordinates of the mutation points->Indicate->The>Coordinates of the mutation points->Representing a downward rounding;
and acquiring the filter kernel size of each standard region, and taking the average value of the filter kernel sizes of all the standard regions as the optimal filter kernel size.
The beneficial effects of the invention are as follows: the gray level distribution characteristics of the welding areas under the influence of noise are obtained by quantifying the gray level change characteristics in different welding areas and the corresponding gray level change characteristics under the influence of the noise, so that a target area is determined; quantifying the difference of the gray level fluctuation degree of the obtained target region and the gray level fluctuation degree of the reference region, taking the reference region as a calculation basis, obtaining a standard region by taking the difference between the reference region and the reference region as a classification standard, and carrying out optimal estimation of the filter kernel size according to the standard region and the standard region; the problem that the quantized filter kernel cannot be suitable for other welding areas due to the fact that noise distribution characteristics in the welding area adopted when the optimal filter kernel size is quantized are not obvious is avoided; meanwhile, the denoising effect on the noise point is ensured.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the invention, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a schematic flow chart of a method for detecting a welding defect of a precision electronic component according to an embodiment of the invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, a flowchart of a method for detecting a welding defect of a precision electronic component according to an embodiment of the invention is shown, the method includes the following steps:
and S001, acquiring a back image of the panel welded by the electronic components by using a fixed camera, cutting to acquire the panel image, and dividing to acquire a plurality of welding areas in the panel.
The purpose of this embodiment is to detect the welding defect of the collected electronic component, so it is necessary to obtain a welding image first; the electronic component has a plurality of welding spots which are all arranged on the back of the panel, namely the welding defect needs to be detected on the back of the panel; therefore, firstly, the back image of the panel welded by the electronic components is collected, and the back image of the panel welded by the electronic components is collected by adopting a fixed camera assembly line type.
Specifically, the camera is fixed at the end position of the welding procedure, and the sampling frequency is kept to be matched with the running speed of the assembly line, so that the back image of the panel of each electronic component can be accurately acquired; dividing the acquired back images of the panels to construct a panel dividing network, adopting the existing DNN neural network, describing the embodiment by taking the deep LabV3 network as an example, taking the acquired back images of the panels as a training data set, manually marking the panel area as 1 and the other areas as 0; inputting the back images of each panel into a panel segmentation network one by one, and obtaining a trained panel segmentation network by adopting a cross entropy loss function; and acquiring a panel area according to the trained panel segmentation network, cutting the panel area to obtain panel images, and carrying out graying treatment on each panel image.
Further, because the gray value of the welding area is larger than that of other areas of the panel, in the embodiment, the panel image is subjected to threshold segmentation by adopting an OTSU threshold segmentation algorithm, and the part larger than the segmentation threshold is used as a welding part, so that the connected domains of a plurality of welding parts are obtained, and each connected domain is one welding area; after the welding areas are obtained, each panel image corresponds to a plurality of welding areas, and in this embodiment, the welding areas of any panel image are taken as examples, and the welding areas are all welding areas in the same panel image.
Thus, a plurality of welding areas in the electronic component are obtained.
Step S002, obtaining a center point and a mutation point in each welding area, obtaining a plurality of gray scale change rate curves corresponding to each welding area according to the center point, the mutation point and the welding area edges, obtaining gray scale fluctuation degree of each welding area according to the gray scale change rate curves, and determining a plurality of target areas according to the gray scale fluctuation degree.
Because of the characteristics of the solder material, the point with the largest gray value in the welding area is the center point of the solder and is marked as the center point of the welding area; meanwhile, if the welding area is a normal welding area, the corresponding gray level change is uniform, and the gray level change is greatly changed under the influence of noise; if the welding area is a defective virtual welding area, the corresponding gray level change is disordered, and the original disordered gray level change is disordered under the influence of noise; it is therefore necessary to extract a target region, i.e., a region where noise or defects are present, in a welding region according to the gray level variation, none of which is uniformly varied; the uneven gray level variation is mainly caused by abrupt points in the welding area, namely, gray level abrupt points, and gray level variation characteristics of the welding area can be quantified through the abrupt points.
Specifically, firstly, a pixel point with the maximum gray value in each welding area is obtained as a center point of the welding area; obtaining the gray level difference absolute value average value of each pixel and eight neighborhood pixels in each welding area, recording the gray level difference absolute value average value as the mutation amplitude value of each pixel, carrying out linear normalization processing on the mutation amplitude values of all pixels in all welding areas, recording the obtained result as the mutation degree of each pixel, giving out a second preset threshold value for mutation point judgment, calculating the second preset threshold value by adopting 0.85, and taking the pixel with the mutation degree larger than the second preset threshold value as the mutation point to obtain a plurality of mutation points in each welding area; taking any welding area as an example, connecting the central point of the welding area with each abrupt change point respectively, and extending to the edge point of the welding area to obtain a plurality of abrupt change connecting lines; from the center point, the first line of any abrupt connectionGray scale change rate of each pixel point +.>The calculation method of (1) is as follows:
wherein ,represents the center point of any one welding area, < +.>Indicating the +.o on any abrupt connection in the welded area>Pixels>Represent center point and->Gray level difference of each pixel point, +.>Represent center point and->The Euclidean distance of the individual pixel points; acquiring the gray scale change rate of each pixel point on the abrupt change connecting line in the welding area according to the method; establishing a gray scale change rate curve of the abrupt connection line in the welding region by taking the abscissa as the ordinal number of the pixel point from the central point and the ordinate as the gray scale change rate, wherein the abscissa of the central point is 0, and the>The abscissa of each pixel point is +.>The method comprises the steps of carrying out a first treatment on the surface of the Taking the variance of all gray scale change rates except the center point on the gray scale change rate curve as the gray scale change degree of the abrupt connection line; the gray level change rate of each pixel point in the welding area with the gray level uniformly changed is uniform, so that the variance is smaller, and the gray level change degree is smaller; the variance is larger and the gray level variation degree is larger when the gray level variation rate difference is larger in the welding area with disordered gray level variation.
Further, the gray level change degree of each abrupt connection line in the welding area is obtained according to the method, and the average value of the gray level change degrees of all abrupt connection lines in the welding area is used as the gray level fluctuation degree of the welding area; the gray level fluctuation degree of each welding area is obtained according to the method; in this case, the larger the gray scale fluctuation degree is, the larger the gray scale change degree in the welding region is, and the more disordered the gray scale change in the welding region is.
Further, the gray level fluctuation degrees of all the welding areas are subjected to linear normalization to give a first preset threshold value, the first preset threshold value is calculated by adopting 0.55, and the welding area with the normalized gray level fluctuation degree larger than the first preset threshold value is used as a target area; the gray scale variation in these target areas is uneven and chaotic.
Therefore, a plurality of target areas with uneven gray level change inside the welding area are obtained, and the part with even gray level change in the welding area is removed, so that the welding areas with even distribution are prevented from participating in the subsequent quantization of the size of the optimal filtering kernel, and the corresponding filtering kernel is not suitable for the welding areas with obvious distribution of other noise points due to the fact that the distribution of the noise points is not obvious.
Step S003, acquiring gray entropy of each welding area, clustering the welding areas according to the gray entropy to acquire a plurality of reference areas, acquiring gray fluctuation degree of each reference area, and acquiring a plurality of standard areas in all the target areas according to differences between gray fluctuation degree of each target area and gray fluctuation degree mean value of the reference areas.
It should be noted that, a welding area which can represent the noise distribution most and is less affected by other factors needs to be obtained in the target area, and the welding area is used as a standard area to obtain the optimal filter kernel size; therefore, firstly, a welding area which is less affected by noise is required to be obtained as a reference area, and the gray value in the welding area can be changed due to noise or defects, so that the reference area can be obtained by adopting gray entropy; the gray distribution difference in the normal welding area is smaller, the gray entropy is smaller, and even if the gray entropy is influenced by noise points, the gray entropy is smaller because only part of pixel points are suddenly changed; the gray level distribution difference in the virtual welding area is larger, the gray level entropy is larger, and when the virtual welding area is influenced by noise points, the gray level entropy is larger; by the difference between the gray level fluctuation degree of the reference area and the gray level fluctuation degree of the target area, the similarity between the gray level change of the target area and the gray level change of the reference area is judged according to the difference of the gray level fluctuation degrees, the smaller the difference is, the larger the similarity is, and the more likely the part causing the difference in the corresponding target area is a noise point, the target area can be used as a standard area.
Specifically, according to the plurality of welding areas obtained in step S001, a gray entropy of each welding area is obtained, wherein the gray entropy is calculated as the prior art, and the embodiment is not repeated; k-means clustering is carried out on all welding areas according to gray entropy of all welding areas, and the clustering purpose is to obtain two types of welding areas with smaller and larger gray entropy, so thatClustering is carried out, and the clustering distance adopts the difference value of gray entropy between two welding areas to obtain two clusters; respectively obtaining the average value of gray entropy of all welding areas in the two clusters, and taking the welding area contained in one cluster with the smallest average value as a reference area; and a plurality of welding areas with smaller gray entropy are obtained through clustering, and the areas can participate in the subsequent extraction of standard areas in the target area, so that the gray variation difference generated by the standard areas is most likely to be the difference caused by noise points.
Further, the reference regions also belong to the welding regions, the gray scale fluctuation degree of each welding region has been obtained in step S002, the gray scale fluctuation degree corresponding to the reference region is extracted, the average value of the gray scale fluctuation degrees of all the reference regions is obtained, and as a classification standard, all the target regions are classified by a method similar to the maximum inter-class variance algorithm, the classification result is a standard region and a non-standard region, wherein a classification variance function in the classification process is setThe specific expression of (2) is as follows:
wherein ,represents the number of standard regions in the division result, +.>Mean value of the difference absolute value of gray scale fluctuation degree of standard region and classification standard under the dividing result at this time, +.>The average value of the gray level fluctuation degree of the non-standard area and the absolute value of the difference value of the classification standard under the dividing result at the moment is represented; since the maximum inter-class variance algorithm is a dynamic segmentation, each segmentation will get a +.>The value of +.> and />The method comprises the steps of carrying out a first treatment on the surface of the When the classification variance function is maximum, the classification result of the target area is the best, and the target area corresponding to the class with the minimum average value of the gray level fluctuation degree of the standard area and the difference absolute value of the classification standard under the classification result is taken as the final standard area.
So far, a plurality of standard areas for quantifying the optimal filter kernel size are obtained; at this time, the difference of the standard area and the reference area in the gray level fluctuation degree is small, so that the distribution situation of the noise points can be well represented due to partial gray level change caused by the noise points, the optimal filter kernel size is estimated, the defect that the original false welding defect information is eliminated by using an oversized filter kernel is avoided, and the denoising effect on the noise points is ensured.
Step S004, obtaining optimal filter kernel sizes according to distribution of abrupt points in each standard area, filtering all welding areas through the filter kernels with the optimal filter kernel sizes to obtain a plurality of images to be detected, and detecting welding defects of all the images to be detected.
After the plurality of standard areas are obtained, the distribution of noise points in the welding area can be well quantified by each standard area, the mutation points in the standard area are determined according to the mutation points in each welding area determined in step S002, and the optimal filter kernel is constructed through the distribution of the mutation points in each standard area, so that the noise uniformly distributed through the optimal filter kernel can be accurately removed, and the accuracy of the defect detection result is improved.
Specifically, by the firstFor example, the filter kernel size of the standard region is obtained>The calculation method of (1) is as follows:
wherein ,indicate->Number of mutation points in each standard region, +.>Indicate->The>Coordinates of the mutation points->Indicate->The>Coordinates of the mutation points->Representing a downward rounding; the coordinate system takes the lower left corner of the panel image as a coordinate origin, the coordinate origin is rightward as a horizontal axis positive direction, and upward as a vertical axis positive direction, and one pixel is a unit; specially, when->When, i.e.)>The last mutation point in the standard region, at this time +.>Calculation was performed using the first mutation point, i.e. when +.>When (I)>Calculating; it should be noted that, the sequence of the mutation points in each standard region is ordered from left to right and from bottom to top; the filter kernel size of the standard region is determined through the average value of Euclidean distances of all adjacent two abrupt change points in the standard region, so that the filter kernel size can adapt to the standard region, and meanwhile, image information loss caused by filtering other parts of the panel due to overlarge filter kernel size is avoided.
Further, the filter kernel size of each standard area is obtained according to the method, and the average value of the filter kernel sizes of all the standard areas is used as the optimal filter kernel size so as to ensure that the filtering of all the welding areas does not affect the image information of other parts of the panel; it should be noted that, if the optimal filter kernel size needs to be ensured to be odd, the average value of the obtained filter kernel size needs to be odd-even judged, if the average value is odd, the average value is directly used as the optimal filter kernel size, and if the average value is even, the average value is subtracted by 1 and then used as the optimal filter kernel size.
Further, according to the obtained optimal filter kernel size, performing Gaussian filtering on all the welding areas obtained in the step S001 to obtain clear images of all the welding areas, dividing the clear images of each welding area through a minimum circumscribed rectangle to obtain a plurality of divided images, setting the gray value of part of the non-welding area in each image to be 0, and marking the obtained result as an image to be detected of each welding area; constructing a welding defect identification network, wherein the network adopts a DNN neural network, the embodiment adopts an InceptionV3 network structure as an example to describe, a historical welding image is used as a training data set, and a normal welding area in each welding image in the training data set is 0 and a virtual welding area with welding defects is 1 through manual marking; inputting each welding image in the training data set into a welding defect identification network, and using the training data set, obtaining a trained welding defect identification network by adopting a cross entropy loss function as a loss function; inputting each image to be detected into a trained welding defect recognition network, and obtaining a detection result of whether the welding defect occurs in each welding area according to an output result, wherein the normal indication of the welding area in the image to be detected is that the welding defect does not occur, and the indication of the virtual welding area occurs in the welding area is that the welding defect occurs.
Denoising a plurality of welding areas of each panel image and detecting welding defects according to the method, so as to obtain a detection result of the welding defects of each electronic component panel; thus, the detection of the welding defect of the precise electronic component is completed.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, alternatives, and improvements that fall within the spirit and scope of the invention.

Claims (10)

1. A method for detecting welding defects of a precision electronic component is characterized by comprising the following steps:
collecting a back image of a panel welded by an electronic component, cutting the back image of the panel to obtain a panel image, and dividing the panel image to obtain a plurality of welding areas in the panel;
taking the pixel point with the maximum gray value in each welding area as the center point of each welding area, detecting and obtaining mutation points in each welding area, obtaining a plurality of mutation connecting lines in each welding area according to the center point, the mutation points and the edges of the welding areas, obtaining the gray change rate of each pixel point according to the gray value and distribution of each pixel point on the mutation connecting lines, obtaining the gray change rate curve and the gray change degree of each mutation connecting line according to the gray change rate, taking the gray change degree average value of all mutation connecting lines in each welding area as the gray fluctuation degree of each welding area, and obtaining a target area according to the gray fluctuation degree;
acquiring the gray entropy of each welding area, clustering the welding areas according to the size of the gray entropy to obtain two clusters, acquiring a plurality of reference areas according to the gray entropy of the welding areas in the clusters, acquiring the gray fluctuation degree of each reference area, and acquiring a plurality of standard areas in all the target areas according to the difference between the gray fluctuation degree of each target area and the gray fluctuation degree mean value of the reference areas;
and obtaining the optimal filter kernel size according to the distribution of the abrupt change points in each standard region, filtering all the welding regions through the filter kernels with the optimal filter kernel size to obtain a plurality of images to be detected, and detecting welding defects of all the images to be detected.
2. The method for detecting the welding defect of the precision electronic component according to claim 1, wherein the cutting to obtain the panel image comprises the following specific steps:
and inputting the acquired panel back image into a panel segmentation network after training, outputting to obtain a panel region, and cutting the panel region in the panel back image to obtain a panel image.
3. The method for detecting the welding defect of the precision electronic component according to claim 1, wherein the detecting obtains the mutation point in each welding area, comprises the following specific steps:
obtaining the average value of the gray level difference value absolute values of each pixel point and eight neighborhood pixel points in each welding area, recording the average value as the mutation amplitude value of each pixel point, carrying out linear normalization on the mutation amplitude values of all the pixel points in all the welding areas, recording the obtained result as the mutation degree of each pixel point, and taking the pixel points with the mutation degree larger than a second preset threshold value as mutation points to obtain a plurality of mutation points in each welding area.
4. The method for detecting the welding defect of the precision electronic component according to claim 1, wherein the step of obtaining a plurality of abrupt connection lines in each welding area according to the center point, the abrupt points and the welding area edges comprises the following specific steps:
and connecting the central point of each welding area with each abrupt change point respectively, and extending the central point to the edge point of each welding area to obtain a plurality of abrupt change connecting lines of each welding area.
5. The method for detecting the welding defect of the precision electronic component according to claim 1, wherein the step of obtaining the gray scale change rate of each pixel point according to the gray scale value and the distribution of each pixel point on the abrupt connection line comprises the following specific steps:
taking any one welding area as a target welding area, taking any one abrupt change connecting line in the target welding area as a target abrupt change connecting line, and starting from a central point, and the first point on the target abrupt change connecting lineGray scale change rate of each pixel point +.>The calculation method of (1) is as follows:
wherein ,representing objectsCenter point of welding area, < >>Representing the +.sup.th on the mutation line of interest>Pixels>Represent center point and->Gray level difference of each pixel point, +.>Represent center point and->Euclidean distance of individual pixel points.
6. The method for detecting the welding defect of the precision electronic component according to claim 1, wherein the step of obtaining the gray scale change rate curve and the gray scale change degree of each abrupt connection line according to the gray scale change rate comprises the following specific steps:
taking any one welding area as a target welding area, taking any one abrupt change connecting line in the target welding area as a target abrupt change connecting line, and acquiring the gray change rate of each pixel point on the target abrupt change connecting line; establishing a gray level change rate curve of a target abrupt connection line in a target welding area by taking the abscissa as the ordinal number of the pixel points from the central point and the ordinate as the gray level change rate;
and taking the variance of all gray level change rates except the center point on the gray level change rate curve as the gray level change degree of the target abrupt connection line.
7. The method for detecting the welding defect of the precision electronic component according to claim 1, wherein the obtaining the plurality of reference areas according to the gray entropy of the welding area in the cluster comprises the following specific steps:
and respectively acquiring the average value of gray entropy of all the welding areas in the two clusters, and taking the welding area contained in one cluster with the smallest average value as a reference area to obtain a plurality of reference areas.
8. The method for detecting the welding defect of the precision electronic component according to claim 1, wherein the step of obtaining the gray scale fluctuation degree of each reference area comprises the following specific steps:
each reference area is a welding area, and the gray level fluctuation degree of the reference area corresponding to the welding area is used as the gray level fluctuation degree of each reference area.
9. The method for detecting welding defects of precision electronic components according to claim 1, wherein the obtaining a plurality of standard regions in all target regions according to the difference between the gray scale fluctuation degree of each target region and the gray scale fluctuation degree mean value of the reference region comprises the following specific steps:
obtaining the average value of gray fluctuation degrees of all reference areas, dividing all target areas as classification standards, wherein the division results are standard areas and non-standard areas, and setting a classification variance function in the classification processThe specific expression of (2) is as follows:
wherein ,represents the number of standard regions in the division result, +.>Mean value of the difference absolute value of gray scale fluctuation degree of standard region and classification standard under the dividing result at this time, +.>The average value of the gray level fluctuation degree of the non-standard area and the absolute value of the difference value of the classification standard under the dividing result at the moment is represented;
when the classification variance function is maximum, the classification result of the target area is the best, and the target area corresponding to the class with the minimum average value of the gray level fluctuation degree of the standard area and the difference absolute value of the classification standard under the classification result is taken as the final standard area.
10. The method for detecting the welding defect of the precision electronic component according to claim 1, wherein the obtaining the optimal filter kernel size according to the distribution of the abrupt change points in each standard region comprises the following specific steps:
wherein ,indicate->Filter kernel size of individual standard regions, +.>Indicate->Number of mutation points in each standard region, +.>Indicate->The>Coordinates of the mutation points->Represent the firstThe>Coordinates of the mutation points->Representing a downward rounding;
and acquiring the filter kernel size of each standard region, and taking the average value of the filter kernel sizes of all the standard regions as the optimal filter kernel size.
CN202311021529.7A 2023-08-15 2023-08-15 Welding defect detection method for precise electronic components Active CN116735612B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311021529.7A CN116735612B (en) 2023-08-15 2023-08-15 Welding defect detection method for precise electronic components

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311021529.7A CN116735612B (en) 2023-08-15 2023-08-15 Welding defect detection method for precise electronic components

Publications (2)

Publication Number Publication Date
CN116735612A true CN116735612A (en) 2023-09-12
CN116735612B CN116735612B (en) 2023-11-07

Family

ID=87901605

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311021529.7A Active CN116735612B (en) 2023-08-15 2023-08-15 Welding defect detection method for precise electronic components

Country Status (1)

Country Link
CN (1) CN116735612B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117094916A (en) * 2023-10-19 2023-11-21 江苏新路德建设有限公司 Visual inspection method for municipal bridge support
CN117291922A (en) * 2023-11-27 2023-12-26 浙江日井泵业股份有限公司 Visual detection method for defects of stainless steel multistage pump impeller
CN117372432A (en) * 2023-12-08 2024-01-09 深圳市希格莱特科技有限公司 Electronic cigarette surface defect detection method and system based on image segmentation
CN117455911A (en) * 2023-12-22 2024-01-26 广东胜高通信有限公司 Production test method and system for network cable crystal head

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020054293A1 (en) * 2000-04-18 2002-05-09 Pang Kwok-Hung Grantham Method of and device for inspecting images to detect defects
WO2004025567A2 (en) * 2002-09-12 2004-03-25 Nline Corporation System and method for acquiring and processing complex images
CN103793614A (en) * 2014-02-25 2014-05-14 河南理工大学 Catastrophe filter algorithm
WO2017101489A1 (en) * 2015-12-14 2017-06-22 乐视控股(北京)有限公司 Method and device for image filtering
KR20190088089A (en) * 2017-12-26 2019-07-26 세종대학교산학협력단 Apparatus and method for detecting defects on welding surface
CN114757949A (en) * 2022-06-15 2022-07-15 济宁市海富电子科技有限公司 Wire and cable defect detection method and system based on computer vision
CN115311270A (en) * 2022-10-11 2022-11-08 南通至顺聚氨酯材料有限公司 Plastic product surface defect detection method
CN115330784A (en) * 2022-10-13 2022-11-11 南通金百福纺织品有限公司 Cloth surface defect detection method
CN115457031A (en) * 2022-10-27 2022-12-09 江苏集宿智能装备有限公司 Method for identifying internal defects of integrated box based on X-ray
CN115588022A (en) * 2022-11-10 2023-01-10 合肥惠强新能源材料科技有限公司 Lithium battery isolation film quality detection system based on process index data
CN115880302A (en) * 2023-03-08 2023-03-31 杭州智源电子有限公司 Instrument panel welding quality detection method based on image analysis
CN116309579A (en) * 2023-05-19 2023-06-23 惠州市宝惠电子科技有限公司 Transformer welding seam quality detection method using image processing
WO2023134789A1 (en) * 2022-10-25 2023-07-20 苏州德斯米尔智能科技有限公司 Automatic inspection method for belt-type conveying device
CN116580024A (en) * 2023-07-12 2023-08-11 山东荣信集团有限公司 Coke quality detection method based on image processing

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020054293A1 (en) * 2000-04-18 2002-05-09 Pang Kwok-Hung Grantham Method of and device for inspecting images to detect defects
WO2004025567A2 (en) * 2002-09-12 2004-03-25 Nline Corporation System and method for acquiring and processing complex images
CN103793614A (en) * 2014-02-25 2014-05-14 河南理工大学 Catastrophe filter algorithm
WO2017101489A1 (en) * 2015-12-14 2017-06-22 乐视控股(北京)有限公司 Method and device for image filtering
KR20190088089A (en) * 2017-12-26 2019-07-26 세종대학교산학협력단 Apparatus and method for detecting defects on welding surface
CN114757949A (en) * 2022-06-15 2022-07-15 济宁市海富电子科技有限公司 Wire and cable defect detection method and system based on computer vision
CN115311270A (en) * 2022-10-11 2022-11-08 南通至顺聚氨酯材料有限公司 Plastic product surface defect detection method
CN115330784A (en) * 2022-10-13 2022-11-11 南通金百福纺织品有限公司 Cloth surface defect detection method
WO2023134789A1 (en) * 2022-10-25 2023-07-20 苏州德斯米尔智能科技有限公司 Automatic inspection method for belt-type conveying device
CN115457031A (en) * 2022-10-27 2022-12-09 江苏集宿智能装备有限公司 Method for identifying internal defects of integrated box based on X-ray
CN115588022A (en) * 2022-11-10 2023-01-10 合肥惠强新能源材料科技有限公司 Lithium battery isolation film quality detection system based on process index data
CN115880302A (en) * 2023-03-08 2023-03-31 杭州智源电子有限公司 Instrument panel welding quality detection method based on image analysis
CN116309579A (en) * 2023-05-19 2023-06-23 惠州市宝惠电子科技有限公司 Transformer welding seam quality detection method using image processing
CN116580024A (en) * 2023-07-12 2023-08-11 山东荣信集团有限公司 Coke quality detection method based on image processing

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
G. KRUMMENACHER ET AL: "Wheel Defect Detection With Machine Learning", IEEE TRANSACTIONS ON INTELLIGENT TRANSPORTATION SYSTEMS, vol. 19, no. 4, pages 1176 - 1187 *
JIANGLI CHEN ET AL: "An method for power lines insulator defect detection with attention feedback and double spatial pyramid", ELECTRIC POWER SYSTEMS RESEARCH, vol. 218, pages 109175 *
尹欣;孙新;秦东浩;: "小波空域去噪改进算法在焊接缺陷信号分析中的应用", 煤矿机械, vol. 32, no. 03, pages 255 - 257 *
赵霆;管声启;王鹏;: "一种基于目标特征挖掘的带钢缺陷图像分割方法", 计算机与现代化, no. 10, pages 60 - 63 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117094916A (en) * 2023-10-19 2023-11-21 江苏新路德建设有限公司 Visual inspection method for municipal bridge support
CN117094916B (en) * 2023-10-19 2024-01-26 江苏新路德建设有限公司 Visual inspection method for municipal bridge support
CN117291922A (en) * 2023-11-27 2023-12-26 浙江日井泵业股份有限公司 Visual detection method for defects of stainless steel multistage pump impeller
CN117291922B (en) * 2023-11-27 2024-01-30 浙江日井泵业股份有限公司 Visual detection method for defects of stainless steel multistage pump impeller
CN117372432A (en) * 2023-12-08 2024-01-09 深圳市希格莱特科技有限公司 Electronic cigarette surface defect detection method and system based on image segmentation
CN117372432B (en) * 2023-12-08 2024-02-09 深圳市希格莱特科技有限公司 Electronic cigarette surface defect detection method and system based on image segmentation
CN117455911A (en) * 2023-12-22 2024-01-26 广东胜高通信有限公司 Production test method and system for network cable crystal head
CN117455911B (en) * 2023-12-22 2024-05-10 广东胜高通信有限公司 Production test method and system for network cable crystal head

Also Published As

Publication number Publication date
CN116735612B (en) 2023-11-07

Similar Documents

Publication Publication Date Title
CN116735612B (en) Welding defect detection method for precise electronic components
CN116168026B (en) Water quality detection method and system based on computer vision
CN115222741B (en) Cable surface defect detection method
CN109410230B (en) Improved Canny image edge detection method capable of resisting noise
CN115272346A (en) PCB production process online detection method based on edge detection
CN116664559B (en) Machine vision-based memory bank damage rapid detection method
CN116205919B (en) Hardware part production quality detection method and system based on artificial intelligence
CN110472479B (en) Finger vein identification method based on SURF feature point extraction and local LBP coding
CN114219794B (en) Method and system for evaluating surface quality of shaving board based on machine vision
CN109003275B (en) Segmentation method of weld defect image
CN117237368B (en) Bridge crack detection method and system
CN114820625B (en) Automobile top block defect detection method
CN110555382A (en) Finger vein identification method based on deep learning and Wasserstein distance measurement
CN114882026B (en) Sensor shell defect detection method based on artificial intelligence
CN111598801B (en) Identification method for weak Mura defect
CN107590512A (en) The adaptive approach and system of parameter in a kind of template matches
CN114881960A (en) Feature enhancement-based cloth linear defect detection method and system
CN116416268A (en) Method and device for detecting edge position of lithium battery pole piece based on recursion dichotomy
CN113781413B (en) Electrolytic capacitor positioning method based on Hough gradient method
CN112258532B (en) Positioning and segmentation method for callus in ultrasonic image
CN112258536B (en) Integrated positioning and segmentation method for calluses and cerebellum earthworm parts
CN116777917B (en) Defect detection method and system for optical cable production
CN112950594A (en) Method and device for detecting surface defects of product and storage medium
CN114166849B (en) Method for detecting defects of printed carbon lines and moisture-sensitive film of humidity sensor
CN109949245B (en) Cross laser detection positioning method and device, storage medium and computer equipment

Legal Events

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