CN115330796B - Copper wire tinning defect identification method - Google Patents

Copper wire tinning defect identification method Download PDF

Info

Publication number
CN115330796B
CN115330796B CN202211255124.5A CN202211255124A CN115330796B CN 115330796 B CN115330796 B CN 115330796B CN 202211255124 A CN202211255124 A CN 202211255124A CN 115330796 B CN115330796 B CN 115330796B
Authority
CN
China
Prior art keywords
pixel point
pixel
value
undetermined
index
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.)
Active
Application number
CN202211255124.5A
Other languages
Chinese (zh)
Other versions
CN115330796A (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.)
Jiangsu Yuheng Electric Co ltd
Original Assignee
Jiangsu Yuheng Electric Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangsu Yuheng Electric Co ltd filed Critical Jiangsu Yuheng Electric Co ltd
Priority to CN202211255124.5A priority Critical patent/CN115330796B/en
Publication of CN115330796A publication Critical patent/CN115330796A/en
Application granted granted Critical
Publication of CN115330796B publication Critical patent/CN115330796B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30136Metal

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Quality & Reliability (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The application belongs to the technical field of data processing, and particularly relates to a method for identifying a tinning defect of a copper wire. The method comprises the following steps: according to each pixel point on the target surface image, obtaining each undetermined pixel point on the target surface image; obtaining a first judgment index of each pixel point to be determined according to the characteristic parameters of the local gray level co-occurrence matrix of each pixel point to be determined; acquiring characteristic brightness indexes of each pixel point to be determined; obtaining a second judging index of each undetermined pixel point according to the brightness characteristic index; obtaining structural distribution characterization values corresponding to the undetermined pixel points according to the characteristic values of the gradient change matrixes corresponding to the undetermined pixel points; obtaining tin plating defect judgment values of all the pixel points to be determined according to the first judgment index, the second judgment index and the structural distribution characterization value corresponding to the pixel points to be determined; and obtaining the tinning defect degree of the tinned copper to be detected according to the tinning defect judgment value. The application can improve the detection efficiency and the detection precision.

Description

Copper wire tinning defect identification method
Technical Field
The application relates to the technical field of data processing, in particular to a method for identifying a tinning defect of a copper wire.
Background
The flat copper wire and copper strip tinning process refers to a process of plating a thin layer of metal tin on the surface of a copper wire; the surface of copper exposed in the air for a long time can be oxidized to form an oxide film, which is also called as copper green, the conductivity of the copper green is poor, the resistance can be increased, the conductivity of a flat copper wire or a copper strip can be reduced, the tin plating of the surface of the flat copper wire or the copper strip can prevent the copper from undergoing oxidation-reduction reaction, the generation of the copper green is avoided, the heat dissipation can be increased, and the conductivity can be improved; meanwhile, the flat copper wire or the copper strip is plated with tin, so that the insulating rubber can be prevented from being sticky, the wire core is blackened and becomes brittle, the weldability is improved, and the obstacle avoidance effect between the flat copper wire or the copper strip and the insulating skin is improved. However, when tin plating on the surface of the flat copper wire or the copper strip is uneven or a tin plating defect occurs, the protection effect of the surface of the flat copper wire or the copper strip is reduced, oxidation phenomenon occurs in partial areas, the formation of copper green is also caused, the conductivity of the flat copper wire or the copper strip is reduced, and the service life is shortened, so that defect identification or defect detection on the tin plating of the flat copper wire or the copper strip is very important.
The existing method for carrying out defect identification or defect detection on the flat copper wire or copper strip tinning is generally based on manual work to realize defect identification on the flat copper wire or copper strip tinning, but the method is high in subjectivity and easy to cause false detection or missing detection, so that the accuracy of the method for carrying out defect identification or defect detection on the flat copper wire or copper strip tinning based on manual work is low.
Disclosure of Invention
The application provides a copper wire tinning defect identification method, which is used for solving the problem of lower accuracy in defect identification or defect detection of flat copper wire or copper strip tinning by the existing method, and adopts the following technical scheme:
the embodiment of the application provides a method for identifying a tinning defect of a copper wire, which comprises the following steps:
acquiring a target surface image of the tinned copper to be detected; the tinned copper comprises tinned copper strips and tinned flat copper wires;
fitting to obtain a first Gaussian model and a second Gaussian model corresponding to the target surface image and a Gaussian function value of the first Gaussian model and a Gaussian function value of the second Gaussian model corresponding to each pixel point on the target surface image according to each pixel point on the target surface image; according to the Gaussian function value of the first Gaussian model and the Gaussian function value of the second Gaussian model, each undetermined pixel point on the target surface image is obtained;
acquiring characteristic parameters of a local gray level co-occurrence matrix of each pixel point to be determined; obtaining a first judgment index of each pixel point to be determined according to the characteristic parameters of the local gray level co-occurrence matrix of each pixel point to be determined; acquiring characteristic brightness indexes of each pixel point to be determined; obtaining a second judging index of each undetermined pixel point according to the brightness characteristic index;
acquiring a gradient change matrix corresponding to each undetermined pixel point; obtaining structural distribution characterization values corresponding to the undetermined pixel points according to the characteristic values of the gradient change matrixes corresponding to the undetermined pixel points;
obtaining tin plating defect judgment values of all the pixel points to be determined according to the first judgment index, the second judgment index and the structural distribution characterization value corresponding to the pixel points to be determined; according to the tin plating defect judgment value, obtaining each tin plating defect pixel point in each pixel point to be determined; and obtaining the tinning defect degree of the tinned copper to be detected according to the tinning defect judgment value of each tinning defect pixel point.
Preferably, the method for obtaining each undetermined pixel point on the target surface image comprises the following steps:
for any pixel point on the target surface image:
if the Gaussian function value of the first Gaussian model corresponding to the pixel point is larger than the Gaussian function value of the second Gaussian model corresponding to the pixel point, marking the pixel point as a first category;
if the Gaussian function value of the first Gaussian model corresponding to the pixel point is equal to the Gaussian function value of the second Gaussian model corresponding to the pixel point, the pixel point is marked as a undetermined pixel point;
if the Gaussian function value of the first Gaussian model corresponding to the pixel point is smaller than the Gaussian function value of the second Gaussian model corresponding to the pixel point, the pixel point is marked as a second category;
counting the number of pixel points in the first category and the second category;
and taking the pixel points in the category with more pixel points as normal tinning pixel points, and marking each pixel point in the other category as undetermined pixel points.
Preferably, obtaining characteristic parameters of a local gray level co-occurrence matrix of each pixel point to be determined; the method for obtaining the first judgment index of each undetermined pixel point according to the characteristic parameters of the local gray level co-occurrence matrix of each undetermined pixel point comprises the following steps:
graying treatment is carried out on the target surface image, so that a target surface gray image corresponding to the target surface image is obtained; the pixel points on the target surface image and the target surface gray level image are in one-to-one correspondence;
for any pixel point to be determined on the target surface gray level image:
taking the undetermined pixel point as a center to obtain the neighborhood of the undetermined pixel pointThe gray level quantization is carried out on the gray values of the local neighborhood pixel points in the range, the local neighborhood pixel points are divided into 8 gray levels, and a corresponding gray level co-occurrence matrix is obtained and is recorded as a local gray level co-occurrence matrix;
calculating characteristic parameters corresponding to the local gray level co-occurrence matrix, wherein the characteristic parameters comprise texture contrast, entropy and energy values corresponding to the local gray level co-occurrence matrix;
obtaining texture contrast, entropy and energy values of a local gray level co-occurrence matrix corresponding to the tinned normal pixel points;
and obtaining a first judgment index of the pixel to be determined according to the texture contrast, the entropy and the energy value of the local gray level co-occurrence matrix corresponding to the normal tinned pixel and the texture contrast, the entropy and the energy value of the local gray level co-occurrence matrix corresponding to the pixel to be determined.
Preferably, the first determination index of the undetermined pixel point is calculated according to the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,for the first determination index of the undetermined pixel point,>for the texture contrast of the local gray level co-occurrence matrix corresponding to the undetermined pixel point, the +.>Entropy value of local gray level co-occurrence matrix corresponding to the undetermined pixel point is +.>For the energy value of the local gray level co-occurrence matrix corresponding to the undetermined pixel point, the +.>For tinning texture contrast of local gray level co-occurrence matrix corresponding to normal pixel point, +.>Entropy value of local gray level co-occurrence matrix corresponding to tinning normal pixel point is +.>For tinning the energy value of the local gray level co-occurrence matrix corresponding to the normal pixel point, max () is a maximum function.
Preferably, obtaining characteristic brightness indexes of each pixel point to be determined; the method for obtaining the second judging index of each undetermined pixel point according to the brightness characteristic index comprises the following steps:
HSV color space conversion is carried out on the target surface image, and brightness values of all undetermined pixel points are obtained; obtaining brightness values corresponding to normal tinned pixel points; obtaining brightness characteristic indexes of all the undetermined pixel points according to the brightness values of all the undetermined pixel points and the brightness values corresponding to the tinned normal pixel points;
for any pixel point to be determined on the target surface image, calculating the brightness characteristic index of the pixel point to be determined according to the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,a second determination index for the undetermined pixel point,>for the luminance value of the undetermined pixel, < >>For the brightness value corresponding to the tinned normal pixel point, < >>Is a model parameter;
obtaining a second judging index of the undetermined pixel point according to the brightness characteristic index of the undetermined pixel point; calculating a second judging index of the undetermined pixel point according to the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,and e is a natural constant as a second judgment index of the undetermined pixel point.
Preferably, a gradient change matrix corresponding to each pixel point to be determined is obtained; the method for obtaining the structural distribution characterization value corresponding to each undetermined pixel point according to the characteristic value of the gradient change matrix corresponding to each undetermined pixel point comprises the following steps:
for any pixel point i to be determined on the target surface gray level image:
operator for setting edge detection operator in horizontal directionSetting an operator of the edge detection operator in the horizontal direction +.>
Extracting gradient information from the undetermined pixel point i through two operators respectively:,/>wherein->In order for the convolution operation to be performed,is a neighborhood gray matrix corresponding to eight neighbors taking undetermined pixel point i as the center,/and>respectively the undetermined pixel point i in the horizontal direction and the vertical directionGradient amplitude>For the gradient angle of the undetermined pixel point i, < >>For the gray value of the undetermined pixel point i, x is the abscissa of the undetermined pixel point i, y is the ordinate of the undetermined pixel point i, +.>The horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Gray value of pixel of +.>The horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Is used for the gray value of the pixel point,the horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Is used for the gray value of the pixel point,sit across for target surface gray scale imageMarked as->The ordinate is +.>Gray value of pixel of +.>The horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Gray value of pixel of +.>The horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Gray value of pixel of +.>The horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Gray value of pixel of +.>The horizontal coordinate on the gray level image of the target surface isThe ordinate is +.>Gray values of the pixels of (a);
acquiring each gradient change characteristic value corresponding to the undetermined pixel point i, wherein the gradient change characteristic values corresponding to the undetermined pixel point i are respectively as follows:、/>wherein, the method comprises the steps of, wherein,
according to four gradient change characteristic values corresponding to the undetermined pixel point i, constructing a gradient change matrix of the undetermined pixel point i,/>Representing a gradient change matrix of the pixel point i to be determined;
then calculating the eigenvalue of the gradient change matrix corresponding to the undetermined pixel point i
Obtaining a structural distribution characterization value of the pixel point i to be determined according to the characteristic value of the gradient change matrix corresponding to the pixel point i to be determined; calculating a structural distribution characterization value of the undetermined pixel point i according to the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,representing the value for the structural distribution of the undetermined pixel point i,>and->And the characteristic value of the gradient change matrix corresponding to the pixel point i to be determined.
Preferably, tin plating defect judgment values of all the pixel points to be determined are obtained according to the first judgment index, the second judgment index and the structural distribution characterization value corresponding to the pixel points to be determined; according to the tin plating defect judgment value, obtaining each tin plating defect pixel point in each pixel point to be determined; obtaining the tin-plating defect degree starving method of the tin-copper to be detected according to the tin-plating defect judging value of each tin-plating defect pixel point, comprising the following steps:
for any pixel point i to be determined on the target surface gray level image:
obtaining a tin plating defect judgment value of the pixel point i to be determined according to the first judgment index, the second judgment index and the structural distribution characterization value of the pixel point i to be determined:
wherein, the liquid crystal display device comprises a liquid crystal display device,tin plating defect determination value for undetermined pixel point i +.>A first decision index for the undetermined pixel point i,>a second decision index for the undetermined pixel point i,>a structural distribution characterization value of the pixel point i to be determined;
when the tin plating defect judgment value of the pixel point i to be determined is higher than the judgment threshold value, the pixel point i to be determined is considered to be the tin plating defect pixel point;
then obtaining the tinning defect degree of the tinned copper to be detected according to the number of tinning defect pixel points on the target surface image of the tinned copper and the tinning defect judgment value of each tinning defect pixel point; the tin-plating defect degree of the tin-plated copper is calculated according to the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,for the detection of the degree of tin-plating defects of tin-plated copper, < >>For the number of tin-plated defective pixels on the target surface image,/->A tin plating defect judgment value for a pixel point of the u-th tin plating defect on the target surface image;
normalizing the tinning defect degree of the tinned copper to be detected;
when the tin plating defect degree of the tin-plated copper to be detected after the normalization treatment is higher than a threshold value, the tin plating effect of the tin-plated copper to be detected is considered to be poor.
The beneficial effects are that: firstly, obtaining a target surface image of tin-plated copper to be detected; the tinned copper comprises tinned copper strips and tinned flat copper wires; secondly, fitting according to each pixel point on the target surface image to obtain a first Gaussian model and a second Gaussian model corresponding to the target surface image and a Gaussian function value of the first Gaussian model and a Gaussian function value of the second Gaussian model corresponding to each pixel point on the target surface image; according to the Gaussian function value of the first Gaussian model and the Gaussian function value of the second Gaussian model, each undetermined pixel point on the target surface image is obtained; next, obtaining characteristic parameters of a local gray level co-occurrence matrix of each pixel point to be determined; obtaining a first judgment index of each pixel point to be determined according to the characteristic parameters of the local gray level co-occurrence matrix of each pixel point to be determined; acquiring characteristic brightness indexes of each pixel point to be determined; obtaining a second judging index of each undetermined pixel point according to the brightness characteristic index; then obtaining a gradient change matrix corresponding to each pixel point to be determined; obtaining structural distribution characterization values corresponding to the undetermined pixel points according to the characteristic values of the gradient change matrixes corresponding to the undetermined pixel points; finally, according to the first judging index, the second judging index and the structural distribution characterization value corresponding to each pixel to be determined, obtaining a tin plating defect judging value of each pixel to be determined; according to the tin plating defect judgment value, obtaining each tin plating defect pixel point in each pixel point to be determined; and obtaining the tinning defect degree of the tinned copper to be detected according to the tinning defect judgment value of each tinning defect pixel point. The method provided by the application is a method with higher automation degree, can overcome the problem of lower accuracy of the method for identifying defects or detecting defects of flat copper wires or copper strips based on manual work, namely, the method can improve the detection efficiency and the detection precision, so that the reliability is higher.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions and advantages of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments of the application, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a method for identifying a tin-plating defect of a copper wire according to the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments, and all other embodiments obtained by those skilled in the art based on the embodiments of the present application are within the scope of protection of the embodiments of the present application.
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.
The embodiment provides a method for identifying a tinning defect of a copper wire, which is described in detail as follows:
as shown in fig. 1, the method for identifying the tin plating defect of the copper wire comprises the following steps:
step S001, obtaining a target surface image of the tinned copper to be detected; the tin-plated copper comprises tin-plated copper strips and tin-plated flat copper wires.
The method for identifying the defects of the tinned copper strip or the tinned flat copper wire is based on image acquisition equipment to acquire image data of different angles of the tinned copper strip or the flat copper wire, the tinned copper strip comprises the tinned copper strip and the tinned flat copper wire, then a tinned copper feature analysis model is constructed and used for acquiring and analyzing feature parameters of surface pixel points of the tinned copper strip, and the tinned defect pixel points on the surface of the tinned copper strip are identified and extracted based on the extracted feature parameters to realize automatic identification of the defects of the tinned copper strip or the flat copper wire, so that the method provided by the embodiment is a method with higher automation degree, and the problem that the accuracy of the method for identifying the defects of the flat copper strip or the copper strip is lower based on manual work can be solved, namely the method can improve the detection efficiency and the detection precision, and therefore the reliability is higher.
The embodiment is to firstly acquire the surface image of the tin-plated copper to be detected through the image acquisition equipment, wherein the image acquisition equipment mainly comprises a camera, a light source, a placing table and the like, specific equipment operators can be deployed according to actual conditions, and the operators such as a camera visual angle, resolution, a shooting range and the like need to be set according to the actual conditions in the shooting process. In order to ensure accurate identification of tin-plating defects, the embodiment performs denoising operation on the surface image of tin-copper plating to be detected, avoids the influence of noise data on subsequent analysis, and performs sharpening treatment on the surface image to improve the definition of the image so as to identify and detect defective pixel points, so that the embodiment marks the surface image after denoising operation and sharpening treatment as a target surface image; graying treatment is carried out on the target surface image, so that a target surface gray image corresponding to the target surface image is obtained; the pixel points on the target surface image and the target surface gray scale image are in one-to-one correspondence.
The denoising operation and sharpening process in this embodiment are known in the art, and thus will not be described in detail.
Step S002, fitting to obtain a first Gaussian model and a second Gaussian model corresponding to the target surface image and a Gaussian function value of the first Gaussian model and a Gaussian function value of the second Gaussian model corresponding to each pixel point on the target surface image according to each pixel point on the target surface image; and obtaining each undetermined pixel point on the target surface image according to the Gaussian function value of the first Gaussian model and the Gaussian function value of the second Gaussian model.
The embodiment is used for analyzing the pixel points of the target surface image of the tinned copper to be detected, establishing a tinned copper wire characteristic analysis model, extracting characteristic parameters of the pixel points of the target surface of the tinned copper, and analyzing the tinned defects of the tinned copper to be detected so as to identify the tinned defect pixel points; the method comprises the following steps:
firstly, fitting to obtain a first Gaussian model and a second Gaussian model corresponding to a target surface image according to each pixel point on the target surface image, and obtaining a Gaussian function value of the first Gaussian model corresponding to each pixel point and a Gaussian function value of the second Gaussian model corresponding to each pixel point on the target surface image; for any pixel point: if the Gaussian function value of the first Gaussian model corresponding to the pixel point is larger than the Gaussian function value of the second Gaussian model corresponding to the pixel point, marking the pixel point as a first category; if the Gaussian function value of the first Gaussian model corresponding to the pixel point is equal to the Gaussian function value of the second Gaussian model corresponding to the pixel point, the pixel point is marked as a undetermined pixel point; if the Gaussian function value of the first Gaussian model corresponding to the pixel point is smaller than the Gaussian function value of the second Gaussian model corresponding to the pixel point, the pixel point is marked as a second category; counting the number of pixel points in the first category and the second category; normally, the number of normal pixels is large, so that the pixels in the category corresponding to the large number of the pixels are used as the normal tinning pixels, and each pixel in the other category is marked as a pending pixel; therefore, each undetermined pixel point on the target surface image is obtained through the process, and the undetermined pixel points are analyzed later.
Step S003, obtaining characteristic parameters of a local gray level co-occurrence matrix of each pixel to be determined; obtaining a first judgment index of each pixel point to be determined according to the characteristic parameters of the local gray level co-occurrence matrix of each pixel point to be determined; acquiring characteristic brightness indexes of each pixel point to be determined; obtaining a second judging index of each undetermined pixel point according to the brightness characteristic index;
next, the embodiment further analyzes the pixel to be determined to identify the pixel with the true tin plating defect; the method comprises the following steps:
(1) The process for obtaining the first judging index of each pixel point to be fixed comprises the following steps:
for any pixel point to be determined on the target surface gray level image: taking the undetermined pixel point as a center to obtain the neighborhood of the undetermined pixel pointThe local neighborhood pixel points in the range are subjected to gray level quantization, the gray level of the local neighborhood pixel points is divided into 8 gray levels, a corresponding gray level co-occurrence matrix is obtained and is marked as a local gray level co-occurrence matrix, and the local gray level co-occurrence matrix corresponding to the pixel points to be determined is obtained; calculating characteristic parameters corresponding to the local gray level co-occurrence matrix, wherein the characteristic parameters comprise texture contrast, entropy and energy values corresponding to the local gray level co-occurrence matrix; obtaining texture contrast, entropy and energy values of a local gray level co-occurrence matrix corresponding to the tinned normal pixel points; then according to the texture contrast, entropy and energy value of the local gray level co-occurrence matrix corresponding to the tinned normal pixel point and the local corresponding to the undetermined pixel pointObtaining a first judging index of the pixel point to be determined by texture contrast, entropy and energy of the partial gray level co-occurrence matrix; calculating a first judging index of the undetermined pixel point according to the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,for the first determination index of the undetermined pixel point,>for the texture contrast of the local gray level co-occurrence matrix corresponding to the undetermined pixel point, the +.>Entropy value of local gray level co-occurrence matrix corresponding to the undetermined pixel point is +.>For the energy value of the local gray level co-occurrence matrix corresponding to the undetermined pixel point, the +.>For tinning texture contrast of local gray level co-occurrence matrix corresponding to normal pixel point, +.>Entropy value of local gray level co-occurrence matrix corresponding to tinning normal pixel point is +.>For the energy value of the local gray level co-occurrence matrix corresponding to the tinning normal pixel point, max () is a maximum function; the larger the first judgment index function value is, the larger the difference between the local neighborhood distribution condition of the undetermined pixel point and the distribution condition of the normal tinning pixel point is, and the more likely the undetermined pixel point is the tinning defectAnd sinking the pixel points.
(2) The process of obtaining the second judging index of each pixel point to be fixed is as follows:
HSV color space conversion is carried out on the target surface image, and brightness values of all undetermined pixel points are obtained; obtaining brightness values corresponding to normal tinned pixel points; obtaining brightness characteristic indexes of all the undetermined pixel points according to the brightness values of all the undetermined pixel points and the brightness values corresponding to the tinned normal pixel points; for any pixel point to be determined on the target surface image, calculating the brightness characteristic index of the pixel point to be determined according to the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,a second determination index for the undetermined pixel point,>for the luminance value of the undetermined pixel, < >>For the brightness value corresponding to the tinned normal pixel point, < >>Is a model parameter; c is to avoid zero denominator, in this embodiment, c=0.5 is set;for the similarity between the brightness distribution condition of the local neighborhood range of the undetermined pixel point and the brightness condition of the normal pixel point, the value is 0,1]The brightness characteristic index represents the brightness difference degree between the pixel to be determined and the normal tinned pixel, and the larger the brightness difference degree is, the larger the difference between the pixel to be determined and the normal tinned pixel is considered;
then, according to the brightness characteristic index of the pixel to be determined, a second judging index of the pixel to be determined is obtained; calculating a second judging index of the undetermined pixel point according to the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,e is a natural constant as a second judging index of the pixel point to be determined; the larger the second judgment index function value is, the higher the possibility that the undetermined pixel point is the tinning defect pixel point is considered.
Step S004, obtaining a gradient change matrix corresponding to each undetermined pixel point; and obtaining structural distribution characterization values corresponding to the undetermined pixel points according to the characteristic values of the gradient change matrix corresponding to the undetermined pixel points.
The embodiment detects the self characteristic information of the pixel to be determined, namely, obtains the structural distribution characterization value corresponding to the pixel to be determined, and is used for characterizing the characteristic attribute of the pixel to further realize the identification of the pixel with the tin plating defect; the acquisition process of the structural distribution characterization value corresponding to each pixel to be determined comprises the following steps:
for any pixel point i to be determined on the target surface gray level image:
extracting gradient information of the undetermined pixel point i by adopting a Sobel edge detection operator, wherein the operators of the edge detection operator in the horizontal direction and the vertical direction in the embodiment are respectively as follows:,/>,/>for edge detection operator in horizontal direction operator, +.>An operator of the edge detection operator in the vertical direction; then extracting gradient information from the undetermined pixel point i through two operators respectively: />,/>Wherein->For convolution operation, ++>Is a neighborhood gray matrix corresponding to eight neighbors taking undetermined pixel point i as the center,/and>the gradient amplitude values of the undetermined pixel point i in the horizontal direction and the vertical direction are respectively +.>For the gradient angle of the undetermined pixel point i, < >>For the gray value of the undetermined pixel point i, x is the abscissa of the undetermined pixel point i, y is the ordinate of the undetermined pixel point i, +.>The horizontal coordinate of the gray level image of the target surface is +.>Ordinate isGray value of pixel of +.>The horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Gray value of pixel of +.>The horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Gray value of pixel of +.>The horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Gray value of pixel of +.>The horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Gray value of pixel of +.>Is the target surfaceThe abscissa on the gray level image is +.>The ordinate is +.>Gray value of pixel of +.>The horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Gray value of pixel of +.>The horizontal coordinate of the gray level image of the target surface is +.>The ordinate is +.>Gray values of pixels of (a). According to the method, gradient angles of eight adjacent pixel points of the pixel point to be determined are obtained: />And the method is used for analyzing the distribution disorder condition around the undetermined pixel points.
After gradient information of a pixel to be determined is acquired, in this embodiment, in order to improve recognition accuracy by considering that an edge detection operator performs gradient information detection and extraction to have inaccuracy, a neighborhood distribution feature attribute of the pixel to be determined i is accurately detected, and in this embodiment, a change condition of a gradient of the pixel is analyzed so as to accurately extract a distribution feature of the pixel to be determined, where the gradient change feature specifically is:obtaining a gradient change characteristic value corresponding to the pixel point i to be determined: />、/>Based on the four gradient change characteristic values corresponding to the extracted undetermined pixel point i, constructing a gradient change matrix +.>,/>Representing the gradient change matrix of the pixel point i to be determined, and the gradient change matrix can characterize the texture distribution characteristics of the pixel point i to be determined.
Then calculating the eigenvalue of the gradient change matrix corresponding to the undetermined pixel point iObtaining a structural distribution characterization value of the undetermined pixel point i: />Wherein->Representing the value for the structural distribution of the undetermined pixel point i,>and->Is the characteristic value of the gradient change matrix corresponding to the undetermined pixel point i, and +.>The change condition of the gradient of the pixel point i to be determined can be detected, and the larger the gradient change characterization value is, the more disordered the structural distribution at the pixel point i to be determined is.
Step S005, obtaining tin plating defect judgment values of all the pixel points to be determined according to the first judgment index, the second judgment index and the structural distribution characterization value corresponding to the pixel points to be determined; according to the tin plating defect judgment value, obtaining each tin plating defect pixel point in each pixel point to be determined; and obtaining the tinning defect degree of the tinned copper to be detected according to the tinning defect judgment value of each tinning defect pixel point.
The first judging index, the second judging index and the structural distribution characterization value of each pixel to be determined are obtained through the steps, and then the extraction and identification of the pixel with the tin plating defect are realized based on the first judging index, the second judging index and the structural distribution characterization value of each pixel to be determined; the method comprises the following steps:
for any pixel point i to be determined on the target surface gray level image:
obtaining a tin plating defect judgment value of the pixel point i to be determined according to the first judgment index, the second judgment index and the structural distribution characterization value of the pixel point i to be determined:
setting a judging threshold value to be 0.6, and when the tin plating defect judging value of the pixel point i to be determined is higher than the judging threshold value, considering the pixel point i to be determined as a tin plating defect pixel point; therefore, the tin plating defect judgment value of each to-be-determined pixel point can be obtained through the process, and each tin plating defect pixel point in each to-be-determined pixel point is obtained according to the tin plating defect judgment value of each to-be-determined pixel point, so that each tin plating defect pixel point on the target surface image of the to-be-detected tin-plated copper is obtained.
Then obtaining the tinning defect degree of the tinned copper to be detected according to the number of tinning defect pixel points on the target surface image of the tinned copper and the tinning defect judgment value of each tinning defect pixel point; the tin-plating defect degree of the tin-plated copper is calculated according to the following formula:
wherein, the liquid crystal display device comprises a liquid crystal display device,for the detection of the degree of tin-plating defects of tin-plated copper, < >>For the number of tin-plated defective pixels on the target surface image,/->A tin plating defect judgment value for a pixel point of the u-th tin plating defect on the target surface image; the method comprises the steps of carrying out normalization treatment on the tinning defect degree of the tinning copper to be detected, ensuring that the value is (0, 1), setting the threshold value of the preset tinning defect degree to be 0.5, and when the tinning defect degree of the tinning copper to be detected is higher than the threshold value, considering that the tinning effect of the tinning copper to be detected is poorer, the more serious the existing defect is, and carrying out tinning processing on the tinning copper surface again to ensure the tinning effect of the tinning copper surface.
Firstly, acquiring a target surface image of tin-plated copper to be detected; the tinned copper comprises tinned copper strips and tinned flat copper wires; secondly, fitting according to each pixel point on the target surface image to obtain a first Gaussian model and a second Gaussian model corresponding to the target surface image and a Gaussian function value of the first Gaussian model and a Gaussian function value of the second Gaussian model corresponding to each pixel point on the target surface image; according to the Gaussian function value of the first Gaussian model and the Gaussian function value of the second Gaussian model, each undetermined pixel point on the target surface image is obtained; next, obtaining characteristic parameters of a local gray level co-occurrence matrix of each pixel point to be determined; obtaining a first judgment index of each pixel point to be determined according to the characteristic parameters of the local gray level co-occurrence matrix of each pixel point to be determined; acquiring characteristic brightness indexes of each pixel point to be determined; obtaining a second judging index of each undetermined pixel point according to the brightness characteristic index; then obtaining a gradient change matrix corresponding to each pixel point to be determined; obtaining structural distribution characterization values corresponding to the undetermined pixel points according to the characteristic values of the gradient change matrixes corresponding to the undetermined pixel points; finally, according to the first judging index, the second judging index and the structural distribution characterization value corresponding to each pixel to be determined, obtaining a tin plating defect judging value of each pixel to be determined; according to the tin plating defect judgment value, obtaining each tin plating defect pixel point in each pixel point to be determined; and obtaining the tinning defect degree of the tinned copper to be detected according to the tinning defect judgment value of each tinning defect pixel point. The method provided by the embodiment is a method with higher automation degree, can overcome the problem of lower accuracy of a method for identifying defects or detecting defects of flat copper wires or copper strips based on manual work, namely, the method can improve detection efficiency and detection accuracy, so that reliability is higher.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the application and are intended to be included within the scope of the application.

Claims (6)

1. The method for identifying the tinning defects of the copper wire is characterized by comprising the following steps:
acquiring a target surface image of the tinned copper to be detected; the tinned copper comprises tinned copper strips and tinned flat copper wires;
fitting all pixel points in the target surface image to obtain a first Gaussian model and a second Gaussian model, and obtaining a plurality of undetermined pixel points and a plurality of tinned normal pixel points according to the magnitude relation between the Gaussian function value of the first Gaussian model and the Gaussian function value of the second Gaussian model of each pixel point;
acquiring characteristic parameters of a local gray level co-occurrence matrix of each pixel to be determined and characteristic parameters of a local gray level co-occurrence matrix of each tinned normal pixel according to a target surface gray level image corresponding to the target surface image; obtaining a first judgment index of each pixel to be determined according to the characteristic parameters of the local gray level co-occurrence matrix of each pixel to be determined and the characteristic parameters of the local gray level co-occurrence matrix of each tinned normal pixel; acquiring brightness values of all the undetermined pixel points and brightness values of all the tinned normal pixel points according to the HSV image of the target surface image, acquiring brightness characteristic indexes of all the undetermined pixel points according to the brightness values of all the undetermined pixel points and the brightness values corresponding to all the tinned normal pixel points, and acquiring second judging indexes of all the undetermined pixel points according to the brightness characteristic indexes;
acquiring gradient information corresponding to each undetermined pixel point, and constructing a gradient change matrix corresponding to each undetermined pixel point based on the gradient information; obtaining corresponding characteristic values according to the gradient change matrix corresponding to each undetermined pixel point, and obtaining corresponding structural distribution characterization values according to the characteristic values of each undetermined pixel point;
obtaining tin plating defect judgment values of all the pixel points to be determined according to the first judgment index, the second judgment index and the structural distribution characterization value corresponding to the pixel points to be determined; obtaining each tin plating defect pixel point in each pixel point to be determined according to the tin plating defect determination value; according to the tin plating defect judgment value of each tin plating defect pixel point, obtaining the tin plating defect degree of the tin-copper to be detected;
the method for acquiring each undetermined pixel point and each tinned normal pixel point comprises the following steps:
for any pixel point on the target surface image:
if the Gaussian function value of the first Gaussian model corresponding to the pixel point is larger than the Gaussian function value of the second Gaussian model corresponding to the pixel point, marking the pixel point as a first category;
if the Gaussian function value of the first Gaussian model corresponding to the pixel point is equal to the Gaussian function value of the second Gaussian model corresponding to the pixel point, the pixel point is marked as a undetermined pixel point;
if the Gaussian function value of the first Gaussian model corresponding to the pixel point is smaller than the Gaussian function value of the second Gaussian model corresponding to the pixel point, the pixel point is marked as a second category;
counting the number of pixel points in the first category and the second category;
and taking the pixel points in the category with more pixel points as normal tinning pixel points, and marking each pixel point in the other category as undetermined pixel points.
2. The method for identifying a tin-plated defect of a copper wire according to claim 1, wherein the obtaining the first determination index of each pixel to be determined according to the characteristic parameter of the local gray level co-occurrence matrix of each pixel to be determined and the characteristic parameter of the local gray level co-occurrence matrix of each normal pixel to be tin-plated comprises:
for any pixel point to be fixed on a target surface gray level image, the target surface gray level image corresponds to the pixel point on the target surface image one by one:
taking the undetermined pixel point as a center, acquiring a local neighborhood pixel point within a 9 multiplied by 9 range of the undetermined pixel point neighborhood, carrying out gray level quantization on the gray value of the local neighborhood pixel point, dividing the gray level into 8 gray levels, obtaining a corresponding gray level co-occurrence matrix, and marking the gray level co-occurrence matrix as a local gray level co-occurrence matrix;
calculating characteristic parameters corresponding to the local gray level co-occurrence matrix, wherein the characteristic parameters comprise texture contrast, entropy and energy values corresponding to the local gray level co-occurrence matrix;
obtaining texture contrast, entropy and energy values of a local gray level co-occurrence matrix corresponding to the tinned normal pixel points;
and obtaining a first judgment index of the pixel to be determined according to the texture contrast, the entropy and the energy value of the local gray level co-occurrence matrix corresponding to the normal tinned pixel and the texture contrast, the entropy and the energy value of the local gray level co-occurrence matrix corresponding to the pixel to be determined.
3. The method for identifying a tin-plating defect of a copper wire according to claim 2, wherein the first determination index of the pixel to be determined is calculated according to the following formula:
wherein P is i 1 Con is a first judgment index of the undetermined pixel point i i Texture contrast, ent, of the local gray level co-occurrence matrix corresponding to the undetermined pixel point i i Entropy value of local gray level co-occurrence matrix corresponding to the undetermined pixel point i is Asm i For the energy value of the local gray level co-occurrence matrix corresponding to the undetermined pixel point i, con 0 For tinning texture contrast, ent of local gray level co-occurrence matrix corresponding to normal pixel point 0 Entropy value of local gray level co-occurrence matrix corresponding to tinning normal pixel point, asm 0 For the energy value of the local gray level co-occurrence matrix corresponding to the tinning normal pixel point, max () is a maximum function; i is the undetermined pixel point.
4. The method for identifying a tin-plating defect of a copper wire according to claim 1, wherein the obtaining the brightness characteristic index of each of the to-be-determined pixels according to the brightness value of each of the to-be-determined pixels and the brightness value corresponding to each of the normal tin-plated pixels, and the obtaining the second determination index of each of the to-be-determined pixels according to the brightness characteristic index, comprises:
for any undetermined pixel point on the target surface image, calculating the brightness characteristic index of the undetermined pixel point according to the following formula:
wherein VC i As the brightness characteristic index of the undetermined pixel point i, V i For the brightness value of the undetermined pixel point i, V 0 The brightness value corresponding to the normal tinned pixel points is represented by C, which is a model parameter; i is a pixel point to be determined;
and constructing an exponential function by taking the negative number of the brightness characteristic index of the pixel to be determined as a power exponent and taking a natural constant e as a base, and acquiring a second judging index of the pixel to be determined according to the exponential function, wherein the second judging index is added with the exponential function to be 1.
5. The method for identifying the tin-plating defect of the copper wire according to claim 1, wherein the method for acquiring the structural distribution characterization value of each undetermined pixel point comprises the following steps:
for any undetermined pixel point i on the target surface gray scale image:
setting an operator G of an edge detection operator in a horizontal direction x Setting an operator G of an edge detection operator in the horizontal direction y
Extracting gradient information from the undetermined pixel point i through two operators respectively: wherein, is a convolution operation,is a neighborhood gray matrix corresponding to eight neighbors taking undetermined pixel point i as the center,/and>respectively the gradient amplitude values of the undetermined pixel point i in the horizontal direction and the vertical direction, theta i G is the gradient angle of the undetermined pixel point i i (x, y) is the gray value of the undetermined pixel point i, x is the abscissa of the undetermined pixel point i, y is the ordinate of the undetermined pixel point i, g i (x-1, y+1) is the gray value, g, of the pixel point with x-1 on the abscissa and y+1 on the ordinate on the gray image of the target surface i (x-1, y) is the gray value, g, of the pixel point with x-1 on the abscissa and y on the ordinate of the gray image of the target surface i (x-1, y-1) is a target tableGray value g of pixel point with x-1 abscissa and y-1 ordinate on plane gray image i (x, y+1) is the gray value, g, of the pixel point with x-axis and y+1-axis on the gray image of the target surface i (x, y-1) is the gray value, g, of the pixel point with the abscissa x and the ordinate y-1 on the gray image of the target surface i (x+1, y+1) is the gray value, g, of the pixel point with x+1 on the abscissa and y+1 on the ordinate on the gray image of the target surface i (x+1, y) is the gray value, g, of the pixel point with x+1 on the abscissa and y on the ordinate on the gray image of the target surface i (x+1, y-1) is the gray value of the pixel point with x+1 on the abscissa and y+1 on the ordinate on the gray image of the target surface;
acquiring each gradient change characteristic value corresponding to the undetermined pixel point i, wherein the gradient change characteristic values corresponding to the undetermined pixel point i are respectively as follows:wherein (1)>
According to four gradient change characteristic values corresponding to the undetermined pixel point i, constructing a gradient change matrix of the undetermined pixel point iGrad i Representing a gradient change matrix of the pixel point i to be determined;
calculating two eigenvalues of the pixel point i to be determined according to the gradient change matrix, calculating the square sum of the two eigenvalues, and squaring the square sum to obtain the structural distribution characterization value of the pixel point i to be determined.
6. The method for identifying tin-plating defects of copper wires according to claim 1, wherein the method for obtaining the tin-plating defect degree of the tin-plated copper wires to be detected comprises the following steps:
for any undetermined pixel point on the target surface gray scale image: presetting three model parameters as the power index of a first judging index, the power index of a second judging index and the power index of a structural distribution characteristic value respectively to obtain a first index function, a second index function and a structural index function;
calculating the product of the first index function, the second index function and the structural index function as a tin plating defect judgment value of the pixel point to be determined; when the tin plating defect judgment value of the pixel to be determined is larger than a preset judgment threshold value, the pixel to be determined is the tin plating defect pixel; acquiring the number of all tinning defect pixel points on the target surface image; taking a tin plating defect determination value of each tin plating defect pixel point as a power exponent, and constructing a tin plating exponent function by taking a natural constant e as a base number;
and taking the result of the 1-minus-tin-plating index function as a first value, taking the result of the 1-plus-tin-plating index function as a second value, and obtaining the ratio of the first value to the second value corresponding to each tin-plating defect pixel point, wherein the sum of the ratios corresponding to all the tin-plating defect pixel points on the target surface image is the tin-plating defect degree.
CN202211255124.5A 2022-10-13 2022-10-13 Copper wire tinning defect identification method Active CN115330796B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211255124.5A CN115330796B (en) 2022-10-13 2022-10-13 Copper wire tinning defect identification method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211255124.5A CN115330796B (en) 2022-10-13 2022-10-13 Copper wire tinning defect identification method

Publications (2)

Publication Number Publication Date
CN115330796A CN115330796A (en) 2022-11-11
CN115330796B true CN115330796B (en) 2023-10-10

Family

ID=83913895

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211255124.5A Active CN115330796B (en) 2022-10-13 2022-10-13 Copper wire tinning defect identification method

Country Status (1)

Country Link
CN (1) CN115330796B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115601368B (en) * 2022-12-16 2023-05-16 山东天意高科技有限公司 Sheet metal part defect detection method for building material equipment
CN116805313B (en) * 2023-08-21 2023-12-01 山东大拇指喷雾设备有限公司 Defect detection method for sprayer nozzle

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114943739A (en) * 2022-07-26 2022-08-26 山东三微新材料有限公司 Aluminum pipe quality detection method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109872304B (en) * 2019-01-17 2022-12-02 京东方科技集团股份有限公司 Image defect detection method and device, electronic device and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114943739A (en) * 2022-07-26 2022-08-26 山东三微新材料有限公司 Aluminum pipe quality detection method

Also Published As

Publication number Publication date
CN115330796A (en) 2022-11-11

Similar Documents

Publication Publication Date Title
CN115330796B (en) Copper wire tinning defect identification method
CN115170576B (en) Aluminum pipe surface defect detection method based on machine vision
CN115619793B (en) Power adapter appearance quality detection method based on computer vision
CN116721107B (en) Intelligent monitoring system for cable production quality
CN114792316B (en) Method for detecting spot welding defects of bottom plate of disc brake shaft
CN116563280B (en) Composite copper heat dissipation bottom plate processing detection method and system based on data analysis
CN115965623A (en) Surface flaw detection method and system in transformer production
CN114581446B (en) Battery core abnormity detection method and system of laminated battery
CN115029704B (en) Intelligent control method and device for stainless steel pickling process
CN115359047A (en) Abnormal defect detection method for intelligent welding of PCB (printed circuit board)
CN116503348A (en) Method and equipment for detecting alignment degree of cathode and anode plates of battery core of coiled lithium battery
CN116152242A (en) Visual detection system of natural leather defect for basketball
CN117152129B (en) Visual detection method and system for surface defects of battery cover plate
CN116993725B (en) Intelligent patch information processing system of flexible circuit board
CN117437238A (en) Visual inspection method for surface defects of packaged IC
CN111126371B (en) Coarse pointer dial reading method based on image processing
CN117351017A (en) Visual defect detection method for photovoltaic steel structure component
CN116152234A (en) Template end face defect identification method based on image processing
CN113744269B (en) Method and device for detecting welding quality of cylindrical battery cell, electronic equipment and storage medium
CN115439319A (en) Exposed detection method for electric slide wire protection device
CN114881952A (en) Casting defect area detection and edge accurate segmentation method
CN114677428A (en) Power transmission line icing thickness detection method based on unmanned aerial vehicle image processing
CN115170476A (en) Printed circuit board defect detection method based on image processing
CN113506290A (en) Method and device for detecting defects of line insulator
CN111523583A (en) Method for automatically identifying and classifying equipment nameplate photos by using unmanned aerial vehicle

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