CN113689432B - Detection method for identifying special point-like defects - Google Patents

Detection method for identifying special point-like defects Download PDF

Info

Publication number
CN113689432B
CN113689432B CN202111252331.0A CN202111252331A CN113689432B CN 113689432 B CN113689432 B CN 113689432B CN 202111252331 A CN202111252331 A CN 202111252331A CN 113689432 B CN113689432 B CN 113689432B
Authority
CN
China
Prior art keywords
clustering
sample
data
class
value
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
CN202111252331.0A
Other languages
Chinese (zh)
Other versions
CN113689432A (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.)
Changzhou Weiyizhi Technology Co Ltd
Original Assignee
Changzhou Weiyizhi Technology 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 Changzhou Weiyizhi Technology Co Ltd filed Critical Changzhou Weiyizhi Technology Co Ltd
Priority to CN202111252331.0A priority Critical patent/CN113689432B/en
Publication of CN113689432A publication Critical patent/CN113689432A/en
Application granted granted Critical
Publication of CN113689432B publication Critical patent/CN113689432B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a detection method for identifying special point defects, which comprises the steps of acquiring black point and pockmark defect data detected by a defect detection device after scanning and identification of an industrial camera, and taking the black point and pockmark defect data as sample data; carrying out center standardization processing on the sample data, removing unit limitation among characteristic physical quantities in the sample data, and converting the sample data into dimensionless pure numerical data; clustering sample data by using a fuzzy C-means clustering method; evaluating the clustering result using the interval statistics; and taking different clustering center number C values as the fuzzy C mean clustering numbers, judging the class with the sample size of 1 in the class C as the black point defect after clustering is finished, and judging the class with the sample size of more than 1 in the class C as the pockmarked point defect. The method improves the accuracy of detecting the black spot and pockmark defects by the equipment on the premise of not changing the existing industrial camera scanning mode, and has the advantages of saving time and labor, reducing project cost and improving defect detection efficiency.

Description

Detection method for identifying special point-like defects
Technical Field
The invention relates to the technical field of special defect detection, in particular to a detection method for identifying special point defects.
Background
In the existing industrial quality inspection technology, a workpiece is usually fixed on an inspection machine, an industrial camera scans and identifies the workpiece according to a specific track in different dimensions of visual fields (the industrial camera can only identify an abnormality but cannot determine the cause of the abnormality), and a defect detection device detects the types of the scanned and identified defects, wherein most of the defects can be correctly identified and the types of the defects can be detected.
However, due to the fixed moving track of the industrial camera, some specific dense but discontinuous defects are respectively scanned and identified by the industrial camera into a plurality of similar other defects. In the industrial quality inspection standard, the pockmark defect belongs to a dense but discontinuous defect type, and the pockmark defect consists of a plurality of small point-shaped defects and appears in an aggregated state or in a flaky state. An industrial camera often identifies a single pockmark defect as a plurality of small punctate defects in a blocking manner, and under the influence, a defect detection device can wrongly judge the small punctate defects as a plurality of black spot defects with close distances, namely the defect detection device wrongly judges the originally single pockmark defect as a plurality of black spot defects with close distances, so that a detection result has a deviation with an actual industrial quality inspection standard.
The existing solution is to adopt a manual checking method to review the special point defects identified by the industrial camera one by one and manually mark and identify inaccurate defects again, so that the method consumes a large amount of manpower, increases project cost and is difficult to improve efficiency.
Disclosure of Invention
The present invention is directed to solving at least one of the problems of the prior art.
Therefore, the invention provides a detection method for identifying special point defects, which improves the accuracy of equipment for detecting black point and pockmark defects on the premise of not changing the scanning mode of the existing industrial camera, and has the advantages of saving time and labor, reducing project cost and improving defect detection efficiency.
The detection method for identifying the special point-like defects according to the embodiment of the invention comprises the following steps:
step 1, acquiring black dot and pockmark defect data detected by a defect detection device after scanning and identification of an industrial camera, and taking the black dot and pockmark defect data as sample data;
step 2, carrying out center standardization processing on the sample data, removing unit limits among characteristic physical quantities in the sample data, and converting the sample data into dimensionless pure numerical data;
step 3, clustering sample data by using a fuzzy C-means clustering method;
and 4, evaluating the clustering result by using interval statistics: calculating the Euclidean distance square sum of samples in each class after clustering, and using the Euclidean distance square sum as the class compactness
Figure 755312DEST_PATH_IMAGE001
To indicate the degree of intra-class compactness
Figure 960028DEST_PATH_IMAGE001
The calculation formula of (2) is:
Figure 158928DEST_PATH_IMAGE002
wherein,
Figure 765490DEST_PATH_IMAGE003
representing the kth cluster center;
Figure 195072DEST_PATH_IMAGE004
and
Figure 949402DEST_PATH_IMAGE005
is class k
Figure 889676DEST_PATH_IMAGE003
The sample of (1);
Figure 413061DEST_PATH_IMAGE006
to represent
Figure 515009DEST_PATH_IMAGE004
And
Figure 756635DEST_PATH_IMAGE005
the euclidean distance between;
Figure 235021DEST_PATH_IMAGE007
wherein,
Figure 46201DEST_PATH_IMAGE008
representing a cluster number ofKInterval statistics of time;
Figure 646947DEST_PATH_IMAGE009
to representNumber of cluster centers in a cluster;
Figure 47972DEST_PATH_IMAGE010
is that
Figure 392366DEST_PATH_IMAGE011
(iii) a desire;
Figure 562447DEST_PATH_IMAGE011
to represent
Figure 271777DEST_PATH_IMAGE001
The logarithm of (d);
step 5, taking different clustering center numbers C as fuzzy C mean clustering numbers, wherein C belongs to [1, n ], n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1; repeating the step 3 and the step 4, thus obtaining n Gap values, and selecting the C value with the maximum Gap value as the optimal clustering number of the fuzzy C mean value to carry out fuzzy C mean value clustering; and after the clustering is finished, judging the class with the sample size of 1 in the class C as the black spot defect, and judging the class with the sample size of more than 1 in the class C as the pockmark defect.
The method has the advantages that the method is cooperated with the defect detection device and is superposed behind the defect detection device, the execution efficiency is improved under the condition that the dynamic requirements of an industrial field are met, the training cost and the influence of the existing industrial camera movement track and the defect detection device are reduced, the special defects are independently processed by adopting the detection method for identifying the special point defects, the method does not need to consume a large amount of labor, the accuracy is high, the method is particularly suitable for the condition of large sample quantity, and the method can assist in finishing the accurate detection and division of the defects of multiple projects and multiple defects.
Further specifically, in the above technical solution, in the 4 th step,
Figure 658634DEST_PATH_IMAGE001
the smaller, the
Figure 541139DEST_PATH_IMAGE003
The smaller the intra-class distance of this class, the more compact the clustering(ii) a The larger the Gap value, the better the clustering effect at this cluster number.
More specifically, in the above technical solution, in the 5 th step, the value set of C is 2, 3, 4, … …, n × 2/3, where n represents the number of data samples, n is a positive integer greater than or equal to 1, n × 2/3 is rounded upward, and the 3 rd step and the 4 th step are repeated, so as to obtain (n × 2/3-1) Gap values, where n × 2/3 is rounded upward.
Further specifically, in the above technical solution, in step 1, consistency check, missing value and abnormal value processing are performed on the sample data set, whether data is missing is checked, if data is missing, the data is deleted, whether a numerical value is within a range of an actual physical quantity value is checked, and if the numerical value is out of the range, the data is deleted.
More specifically, in the above technical means, in the 2 nd step, a characteristic physical quantity sequence is subjected to
Figure 831306DEST_PATH_IMAGE013
Carrying out normalization conversion, wherein n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1, and the calculation formula of the center normalization processing is as follows:
Figure 711537DEST_PATH_IMAGE014
wherein,
Figure 149472DEST_PATH_IMAGE015
representing the characteristic physical quantity after central standardization conversion;
Figure 773351DEST_PATH_IMAGE016
to be a value range of [1, n]A positive integer of (d);
Figure 980342DEST_PATH_IMAGE017
represents a characteristic physical quantity;
Figure 532939DEST_PATH_IMAGE018
representing an ith value of a characteristic physical quantity;
Figure 395853DEST_PATH_IMAGE019
a mean value representing a characteristic physical quantity sequence z;
Figure 620161DEST_PATH_IMAGE020
represents the standard deviation;
the center-normalized sequence of certain characteristic physical quantities is
Figure 884920DEST_PATH_IMAGE022
Removal of standard deviation
Figure 841375DEST_PATH_IMAGE020
Is a characteristic physical quantity of 0.
More specifically, in the above technical solution, the mean value of the characteristic physical quantity sequence z
Figure 253902DEST_PATH_IMAGE019
The calculation formula of (2) is:
Figure 718119DEST_PATH_IMAGE023
wherein n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1;
Figure 837385DEST_PATH_IMAGE018
representing the ith value of a characteristic physical quantity.
More specifically, in the above technical solution, the standard deviation
Figure 292637DEST_PATH_IMAGE020
The calculation formula of (2) is:
Figure 864564DEST_PATH_IMAGE024
wherein n represents the number of data samples and n is 1 or moreA positive integer;
Figure 430674DEST_PATH_IMAGE018
representing an ith value of a characteristic physical quantity;
Figure 670026DEST_PATH_IMAGE019
represents the mean value of the characteristic physical quantity sequence z.
Further specifically, in the above technical solution, in step 3, a weight is given to each sample and each cluster, the class to which the weight of each sample is the largest is classified, the range of the weight is [0,1], the closer to 1 the sample is, the larger the weight is, the closer to 0 the sample is, the smaller the weight is, and the number m of clusters and the number C of cluster centers of the clusters need to be determined before the sample data is clustered by the fuzzy C-means clustering method, where m is a positive integer with the range of [1, ∞).
Further specifically, in the above technical solution, the clustering method specifically includes the following steps:
3.1, randomly generating a weight matrix of n × C
Figure 729468DEST_PATH_IMAGE025
Step 3.2, calculatejIndividual cluster center
Figure 851007DEST_PATH_IMAGE026
Step 3.3, recalculating the weight matrix U, which is recorded as
Figure 158492DEST_PATH_IMAGE027
tIs shown astPerforming secondary iteration;
3.4, calculating the error sum of squares of the iteration, and when the error sum of squares is relatively small, achieving a better clustering result;
step 3.5, repeating the step 3.1, the step 3.2, the step 3.3 and the step 3.4, and iteratively calculating the clustering center
Figure 314667DEST_PATH_IMAGE026
And weight matrix
Figure 49405DEST_PATH_IMAGE028
Sum of squares of errors calculated iteratively up to t +1 th iteration
Figure 595923DEST_PATH_IMAGE029
Sum of squares of errors calculated from the t-th iteration
Figure 940055DEST_PATH_IMAGE030
When the results are almost the same, taketC clustering centers and n x C weight matrix in the secondary iteration according to thetAnd determining the attribution type of each sample by the weight matrix after the secondary iteration according to the maximum membership principle in the fuzzy set.
Drawings
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of the detection method of the present invention;
FIG. 2 is a flow chart of clustering;
FIG. 3 is a schematic diagram of a defect captured by an industrial camera and identified by an algorithm;
FIG. 4 is a diagram illustrating fuzzy C-means clustering results when the C value of the clustering center number is equal to 2;
FIG. 5 is a diagram illustrating the fuzzy C-means clustering results when the C value is equal to 3;
FIG. 6 is a diagram illustrating the fuzzy C-means clustering results when the C value is equal to 4;
fig. 7 is a graph of Gap value distribution for fuzzy C-means clustering with different C-value of the cluster center number.
Detailed Description
In order to make the technical problems, technical solutions and advantageous effects solved by the present invention more clearly apparent, the present invention is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1 and fig. 2, the detection method for identifying a special point-like defect of the present invention includes the following steps:
step 1, acquiring black point and pockmark defect data detected by a defect detection device after scanning and identification of an industrial camera, taking the black point and pockmark defect data as sample data, wherein the sample data does not have a label for distinguishing defect types because a detection result of the defect detection device cannot be completely relied, only keeping sample characteristic physical quantity, carrying out consistency check on the sample data set, processing missing values and abnormal values, checking whether the data is missing or not, deleting the data if the data is missing, checking whether a numerical value is in an actual characteristic physical quantity value range or not, and deleting the data if the numerical value is out of the range.
Step 2, carrying out center standardization processing on the sample data, removing unit limits among the characteristic physical quantities in the sample data, and converting the sample data into dimensionless pure numerical data so as to be convenient for comparison and weighting among different characteristic physical quantities; for a certain characteristic physical quantity sequence
Figure 950736DEST_PATH_IMAGE013
Carrying out normalization conversion, wherein n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1, and the calculation formula of the center normalization processing is as follows:
Figure 856375DEST_PATH_IMAGE014
(1)
wherein,
Figure 952507DEST_PATH_IMAGE015
representing the characteristic physical quantity after central standardization conversion;
Figure 601794DEST_PATH_IMAGE016
to be a value range of [1, n]A positive integer of (d);
Figure 404665DEST_PATH_IMAGE017
represents a characteristic physical quantity;
Figure 543523DEST_PATH_IMAGE018
representing an ith value of a characteristic physical quantity;
Figure 566099DEST_PATH_IMAGE019
a mean value representing a characteristic physical quantity sequence z;
Figure 81394DEST_PATH_IMAGE020
represents the standard deviation;
mean value of characteristic physical quantity sequence z
Figure 738771DEST_PATH_IMAGE019
The calculation formula of (2) is:
Figure 986213DEST_PATH_IMAGE023
(2)
wherein n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1;
Figure 56937DEST_PATH_IMAGE018
representing the ith value of a characteristic physical quantity.
Standard deviation of
Figure 48027DEST_PATH_IMAGE020
The calculation formula of (2) is:
Figure 887807DEST_PATH_IMAGE024
(3)
wherein n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1;
Figure 804685DEST_PATH_IMAGE018
representing an ith value of a characteristic physical quantity;
Figure 300388DEST_PATH_IMAGE019
represents the mean value of the characteristic physical quantity sequence z.
The center-normalized sequence of certain characteristic physical quantities is
Figure 891907DEST_PATH_IMAGE031
Removal of standard deviation
Figure 523876DEST_PATH_IMAGE020
Characteristic physical quantity of 0, standard deviation
Figure 378700DEST_PATH_IMAGE020
A value of 0 indicates that the characteristic physical quantity has the same performance (the value remains unchanged) on each piece of data in the data set, and the characteristic physical quantity is a redundant characteristic and is subjected to deletion processing.
And 3, clustering the sample data by using a fuzzy C-means clustering method, wherein the principle is that each sample and each cluster are endowed with a weight (the weight represents the degree of the designated sample belonging to the cluster), the class with the largest weight of each sample belongs to the class, the weight is in a value range of [0,1], the closer to 1, the larger the weight is, and the closer to 0, the smaller the weight is. Before carrying out fuzzy C-means clustering on sample data, the cluster number (cluster number in cluster) m and the cluster center number C of the cluster need to be determined, wherein m is a positive integer with the value range of [1, ∞ ], but the parameter of the cluster number m is usually set to be 2. Firstly, selecting the number m =2 of clusters and the number C =2 of cluster centers to perform fuzzy C-means clustering. The clustering method comprises the following specific steps:
3.1, randomly generating a weight matrix of n × C
Figure 158437DEST_PATH_IMAGE025
(ii) a Since the sample data has been processed by center standardization, the weight matrix
Figure 10372DEST_PATH_IMAGE032
In (2) is distributed at [0,1]]To (c) to (d); n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1; c represents the clustering center number, the value range is [2,p]is a positive integer of (a) to (b),pis the characteristic number of sample data, andpis a positive integer greater than or equal to 1;
Figure 762428DEST_PATH_IMAGE025
the middle U represents a weight matrix and,
Figure 584890DEST_PATH_IMAGE025
0 in the value indicates that the weight matrix value is an initial random value, namely the 0 th iteration; weight matrix
Figure 789607DEST_PATH_IMAGE027
The formula of (1) is as follows:
Figure 926190DEST_PATH_IMAGE033
(4)
wherein,
Figure 31287DEST_PATH_IMAGE034
is shown astA second iteration, andt∈[0,∞);
Figure 962334DEST_PATH_IMAGE035
a first cluster center representing a first sample;
Figure 716663DEST_PATH_IMAGE036
a second cluster center representing the first sample;
Figure 391358DEST_PATH_IMAGE037
a third cluster center representing the first sample;
Figure 914743DEST_PATH_IMAGE038
a c-th cluster center representing a first sample;
Figure 282271DEST_PATH_IMAGE039
a first cluster center representing a second sample;
Figure 963044DEST_PATH_IMAGE040
a second cluster center representing a second sample;
Figure 238168DEST_PATH_IMAGE041
a third cluster center representing a second sample;
Figure 819322DEST_PATH_IMAGE042
a c-th cluster center representing a second sample;
Figure 92171DEST_PATH_IMAGE043
a first cluster center representing a third sample;
Figure 821093DEST_PATH_IMAGE044
a second cluster center representing a third sample;
Figure 837590DEST_PATH_IMAGE045
a third cluster center representing a third sample;
Figure 771786DEST_PATH_IMAGE046
a c-th cluster center representing a third sample;
Figure 543433DEST_PATH_IMAGE047
a first cluster center representing an nth sample;
Figure 431755DEST_PATH_IMAGE048
a second cluster center representing an nth sample;
Figure 251943DEST_PATH_IMAGE049
a third cluster center representing the nth sample;
Figure 604427DEST_PATH_IMAGE050
the c-th cluster center of the n-th sample is represented.
Step 3.2, calculatejIndividual cluster center
Figure 484658DEST_PATH_IMAGE026
Figure 922593DEST_PATH_IMAGE026
The calculation formula of (2) is:
Figure 776499DEST_PATH_IMAGE052
(5)
wherein,
Figure 186751DEST_PATH_IMAGE026
is shown asjThe center of each cluster is determined by the center of each cluster,j∈[1,p],pis the characteristic number of sample data, andpis a positive integer greater than or equal to 1;
Figure 300201DEST_PATH_IMAGE053
is shown asiThe number of the samples is one,i∈[1,n]n represents the number of data samples, and n is a positive integer greater than or equal to 1;
Figure 163115DEST_PATH_IMAGE054
representing a sample
Figure 387423DEST_PATH_IMAGE053
Belong to the firstjThe weight of each cluster center;
Figure 386603DEST_PATH_IMAGE055
representing a sample
Figure 107172DEST_PATH_IMAGE053
Belong to the firstjDegree of membership (i.e. weight) of individual cluster centersmThe power of the next power;
Figure 519698DEST_PATH_IMAGE054
is obtained from the value matrix U;
Figure 485380DEST_PATH_IMAGE056
representing the number of clusters (number of clusters in a cluster); wherein,
Figure 666963DEST_PATH_IMAGE057
(6)
step 3.3, recalculating the weight matrix U, which is recorded as
Figure 794319DEST_PATH_IMAGE027
tIs shown astPerforming secondary iteration; weight matrix
Figure 694142DEST_PATH_IMAGE027
The weight calculation method comprises the following steps:
Figure 499604DEST_PATH_IMAGE059
(7)
wherein,
Figure 299326DEST_PATH_IMAGE054
representing a sample
Figure 624128DEST_PATH_IMAGE053
Belong to the firstjThe weight of each cluster center;
Figure 993930DEST_PATH_IMAGE060
representing the number of cluster centers;
Figure 822208DEST_PATH_IMAGE026
is shown asjThe center of each cluster is determined by the center of each cluster,j∈[1,p],pis the characteristic number of sample data, andpis a positive integer greater than or equal to 1;
Figure 619263DEST_PATH_IMAGE061
is shown askThe center of each cluster is determined by the center of each cluster,k∈[1,p],pis the characteristic number of sample data, andpis a positive integer greater than or equal to 1;
Figure 165782DEST_PATH_IMAGE062
representing a sample
Figure 339274DEST_PATH_IMAGE053
To the firstjEuclidean distance of individual cluster centers;
Figure 786174DEST_PATH_IMAGE063
representing a sample
Figure 754130DEST_PATH_IMAGE053
To the firstkEuclidean distance of individual cluster centers; by a samplegAnd a samplehFor example, the Euclidean Distance (Euclidean Distance) calculation method is as follows:
Figure 787945DEST_PATH_IMAGE064
(8)
wherein,pis the characteristic number of sample data, andpis a positive integer greater than or equal to 1;
Figure 437232DEST_PATH_IMAGE065
is shown as
Figure 302420DEST_PATH_IMAGE065
The characteristics of the device are as follows,
Figure 378960DEST_PATH_IMAGE065
∈[1,p],
Figure 962389DEST_PATH_IMAGE065
is a positive integer;
Figure 645393DEST_PATH_IMAGE066
representing a sample
Figure 630666DEST_PATH_IMAGE067
To the sample
Figure 878108DEST_PATH_IMAGE068
The Euclidean distance of (c);
step 3.4, calculating the Sum of squares of Errors (SSE for short) of the iteration, and when the Sum of squares of Errors is relatively small, achieving a better clustering result; the equation for the sum of the squares of the errors is:
Figure DEST_PATH_IMAGE069
(9)
wherein,
Figure 886515DEST_PATH_IMAGE055
representing a sample
Figure 877605DEST_PATH_IMAGE053
Belong to the firstjDegree of membership (i.e. weight) of individual cluster centersmThe power of the next power;
Figure 717385DEST_PATH_IMAGE062
representing a sample
Figure 634263DEST_PATH_IMAGE053
To the firstjEuclidean distance of individual cluster centers.
Step 3.5, repeating the step 3.1, the step 3.2, the step 3.3 and the step 3.4, and iteratively calculating the clustering center
Figure 926704DEST_PATH_IMAGE026
And weight matrix
Figure 721485DEST_PATH_IMAGE028
Is iterated to
Figure 353455DEST_PATH_IMAGE029
And
Figure 5016DEST_PATH_IMAGE030
the results of (a) are almost the same,
Figure 988015DEST_PATH_IMAGE029
denotes the t-thThe sum of the squared errors calculated for +1 iterations,
Figure 383225DEST_PATH_IMAGE070
representing the sum of squared errors calculated in the t-th iteration, takingtC clustering centers and n x C weight matrix in the secondary iteration according to thetAnd determining the attribution type of each sample by the weight matrix after the secondary iteration according to the maximum membership principle in the fuzzy set. This allows the class to which each sample in the sample dataset belongs to be determined at cluster center C = 2.
Step 4, evaluating a clustering result by using Gap statistical quantity: calculating the Euclidean distance square sum of samples in each class after clustering, and using the Euclidean distance square sum as the class compactness
Figure 371166DEST_PATH_IMAGE001
To indicate the degree of intra-class compactness
Figure 459207DEST_PATH_IMAGE001
The calculation formula of (2) is:
Figure DEST_PATH_IMAGE071
(10)
wherein,
Figure 663924DEST_PATH_IMAGE003
representing the kth cluster center;
Figure 800507DEST_PATH_IMAGE004
and
Figure 141490DEST_PATH_IMAGE005
is class k
Figure 400433DEST_PATH_IMAGE003
The sample of (1);
Figure 590980DEST_PATH_IMAGE006
to represent
Figure 327992DEST_PATH_IMAGE004
And
Figure 789061DEST_PATH_IMAGE005
the euclidean distance between;
Figure 218905DEST_PATH_IMAGE001
the smaller, the
Figure 132634DEST_PATH_IMAGE003
The smaller the intra-class distance of the class is, the more compact the clustering is;
Figure 611020DEST_PATH_IMAGE007
(11)
wherein,
Figure 254491DEST_PATH_IMAGE008
representing a cluster number ofKInterval statistics of time;
Figure 22946DEST_PATH_IMAGE009
representing the number of cluster centers in the cluster;
Figure 751868DEST_PATH_IMAGE010
is that
Figure 768365DEST_PATH_IMAGE011
(iii) a desire;
Figure 266343DEST_PATH_IMAGE011
to represent
Figure 710093DEST_PATH_IMAGE001
The logarithm of (d); the larger the Gap value, the better the clustering effect at this cluster number.
Calculating a Gap value when the current fuzzy C-means clustering used in the sample data is of type 2 (K = C = 2).
Step 5, taking different clustering center numbers C as fuzzy C mean clustering numbers, wherein C belongs to [1, n ], n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1; repeating the step 3 and the step 4, thus obtaining n Gap values, and selecting the C value with the maximum Gap value as the optimal clustering number of the fuzzy C mean value to carry out fuzzy C mean value clustering; and after the clustering is finished, judging the class with the sample size of 1 in the class C as the black spot defect, and judging the class with the sample size of more than 1 in the class C as the pockmark defect. It should be noted that, when the optimal clustering number is not determined, the value of C may be any value within [1, n ]; when C = 1, it means that all samples are of the same class; when C = n, it means that all samples are each one type; both of the two types belong to very extreme examples, and hardly help the judgment result; in order to improve the working efficiency, the clustering numbers of [2, n × 2/3] are selected and evaluated respectively, specifically, the value set of C is 2, 3, 4, … … and n × 2/3, wherein n represents the number of data samples, n is a positive integer greater than or equal to 1, n × 2/3 is rounded upwards, the 3 rd step and the 4 th step are repeated, and then (n 2/3-1) Gap values are obtained, wherein n × 2/3 is rounded upwards.
The defects of the black points and the pockmarks are very similar, and the difference is that the black points are a single block of defect, and the pockmarks are a plurality of blocks of black point-like defects which are compact but possibly discontinuous, and are gathered together, so that the category of the clustered sample amount not being 1 belongs to the pockmarks and accords with the form of the pockmarks, and the special point-like defects of the pockmarks can be detected.
See fig. 3, a certain workpiece portion is photographed using an industrial camera. The white rectangular frame is a defect marked one by the industrial camera and is recognized as a black point defect by the defect detection device. It can be clearly seen in the figure that the defect part subjected to labeling processing is difficult to accurately judge the type of the defect due to the reason that the cameras label one by one. The left area with one defect tightly clustered is a pock defect (industrial quality inspection standard), and the remaining three defects in the picture are black defects (industrial quality inspection standard). The pockmarked defects which are originally a whole piece are marked and processed separately, which may cause deviation of the detection result.
Referring to fig. 4, 5, and 6, when C = 4, the category of the fuzzy C-means clustering result where the samples are greater than 1 is a pockmark defect, and the category of the sample number 1 is a black spot defect. This indicates that when the fuzzy C-means clustering method is classified into 4 types, black spots and pockmark defects can be distinguished.
See fig. 7, which is a graph illustrating the Gap values of the fuzzy C-means clusters when C is equal to 2, 3, 4, and 5, respectively. As is obvious from the figure, when the cluster number is 2, the Gap value is between 0.35 and 0.4; when the cluster number is 3, the Gap value is 0.45; when the cluster number is 4, the Gap value is between 0.55 and 0.6; when the number of clusters is 5, the Gap value is 0.45. Obviously, when C =2, the clustering effect is poor; when C = 4, the clustering effect exhibits a relatively good state, and the Gap value is the highest. Therefore, the data are selected to be clustered into 4 classes, and the sample size of each clustered class conforms to the distribution form of black point and pockmark defects. The detection method for identifying the special point defects can effectively improve the accuracy of detecting the black point and pockmark defects by the equipment on the premise of not changing the scanning mode of the existing industrial camera, and overcomes the limitation that the shooting result of the industrial camera is checked manually at the present stage.
The method is cooperated with a defect detection device, is superposed behind the defect detection device, improves the execution efficiency under the condition of meeting the dynamic requirement of an industrial field, reduces the moving track of the existing industrial camera and the training cost and the influence of the defect detection device, adopts a detection method for identifying the special point defects to independently process the special defects, does not need to consume a large amount of labor, has high accuracy, is particularly suitable for the condition of large sample quantity, and can assist in finishing the accurate detection and division of the defects of multiple projects and multiple defects.
The detection method for identifying the special point defects fully meets the condition that the detection of the black point and pockmark defects is inaccurate due to the specific moving track of the industrial field camera and the large defect detection device. Under the condition that the existing moving track of the camera cannot be changed, the expression form of the black point defect is very similar to that of a part of pockmark defects, and the defect detection device is difficult to distinguish the defects when the defects are compared independently. Therefore, the detection method for identifying the special point-like defects is introduced, each defect marked by the camera is used as one piece of data, and the data are used for fuzzy C-means clustering with different types of numbers. And selecting the category number with better clustering effect for clustering by taking the Gap value as an evaluation standard, wherein each category is a defect after clustering is finished, the category number with the data volume of 1 is a black point defect, and the category number with the data volume of more than 1 is a pock point defect, so that the purpose of classifying the black point and the pock point defects is achieved. The method greatly reduces the training cost and influence of the existing defect detection device, and improves the accuracy and the execution efficiency of the industrial field on the premise of not damaging the defect detection device.
The above description is only for the preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art should be considered to be within the technical scope of the present invention, and the technical solutions and the inventive concepts thereof according to the present invention are equivalent to or changed within the technical scope of the present invention.

Claims (9)

1. A detection method for identifying special point-like defects is characterized by comprising the following steps:
step 1, acquiring black dot and pockmark defect data detected by a defect detection device after scanning and identification of an industrial camera, and taking the black dot and pockmark defect data as sample data;
step 2, carrying out center standardization processing on the sample data, removing unit limits among characteristic physical quantities in the sample data, and converting the sample data into dimensionless pure numerical data;
step 3, clustering sample data by using a fuzzy C-means clustering method;
and 4, evaluating the clustering result by using interval statistics: calculating the Euclidean distance square sum of samples in each class after clustering, and using the Euclidean distance square sum as the class compactness
Figure 111056DEST_PATH_IMAGE001
To representDegree of like internal tightness
Figure 939335DEST_PATH_IMAGE001
The calculation formula of (2) is:
Figure 923340DEST_PATH_IMAGE002
wherein,
Figure 532176DEST_PATH_IMAGE003
representing the kth cluster center;
Figure 643352DEST_PATH_IMAGE004
and
Figure 654033DEST_PATH_IMAGE005
is class k
Figure 811869DEST_PATH_IMAGE003
The sample of (1);
Figure 908001DEST_PATH_IMAGE006
to represent
Figure 557288DEST_PATH_IMAGE004
And
Figure 609427DEST_PATH_IMAGE005
the euclidean distance between;
Figure 748284DEST_PATH_IMAGE007
wherein,
Figure 269395DEST_PATH_IMAGE008
representing a cluster number ofKInterval statistics of time;
Figure 519111DEST_PATH_IMAGE009
representing the number of cluster centers in the cluster;
Figure 691335DEST_PATH_IMAGE010
is that
Figure 1094DEST_PATH_IMAGE011
(iii) a desire;
Figure 9501DEST_PATH_IMAGE011
to represent
Figure 249859DEST_PATH_IMAGE001
The logarithm of (d);
step 5, taking different clustering center numbers C as fuzzy C mean clustering numbers, wherein C belongs to [1, n ], n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1; repeating the step 3 and the step 4, thus obtaining n Gap values, and selecting the C value with the maximum Gap value as the optimal clustering number of the fuzzy C mean value to carry out fuzzy C mean value clustering; and after the clustering is finished, judging the class with the sample size of 1 in the class C as the black spot defect, and judging the class with the sample size of more than 1 in the class C as the pockmark defect.
2. The detection method for identifying special point-like defects according to claim 1, wherein: in the 4 th step, the first step is carried out,
Figure 89639DEST_PATH_IMAGE001
the smaller, the
Figure 507982DEST_PATH_IMAGE003
The smaller the intra-class distance of the class is, the more compact the clustering is; the larger the Gap value, the better the clustering effect at this cluster number.
3. The detection method for identifying special point-like defects according to claim 1, wherein: in the 5 th step, the value set of C is 2, 3, 4, … …, n × 2/3, wherein n represents the number of data samples, n is a positive integer greater than or equal to 1, n × 2/3 is rounded up, and the 3 rd step and the 4 th step are repeated, so that (n × 2/3-1) Gap values are obtained, wherein n × 2/3 is rounded up.
4. The detection method for identifying special point-like defects according to claim 1, wherein: in step 1, the sample data set is subjected to consistency check, missing values and abnormal values are processed, whether data are missing or not is checked, if the data are missing, the data are deleted, whether the numerical value is within the range of the actual characteristic physical quantity measuring value is checked, and if the numerical value is beyond the range, the data are deleted.
5. The detection method for identifying special point-like defects according to claim 1, wherein: in step 2, a characteristic physical quantity sequence is measured
Figure 800423DEST_PATH_IMAGE012
Carrying out normalization conversion, wherein n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1, and the calculation formula of the center normalization processing is as follows:
Figure DEST_PATH_IMAGE013
wherein,
Figure 615162DEST_PATH_IMAGE014
representing the characteristic physical quantity after central standardization conversion;
Figure 309448DEST_PATH_IMAGE015
to be a value range of [1, n]A positive integer of (d);
Figure 147960DEST_PATH_IMAGE016
represents a characteristic physical quantity;
Figure 193277DEST_PATH_IMAGE017
representing an ith value of a characteristic physical quantity;
Figure 526169DEST_PATH_IMAGE018
a mean value representing a characteristic physical quantity sequence z;
Figure 74962DEST_PATH_IMAGE019
represents the standard deviation;
the center-normalized sequence of certain characteristic physical quantities is
Figure 349954DEST_PATH_IMAGE020
Removal of standard deviation
Figure 616988DEST_PATH_IMAGE019
Is a characteristic physical quantity of 0.
6. The detection method for identifying special point-like defects according to claim 5, wherein: mean value of characteristic physical quantity sequence z
Figure 753571DEST_PATH_IMAGE018
The calculation formula of (2) is:
Figure 156871DEST_PATH_IMAGE021
wherein n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1;
Figure 602764DEST_PATH_IMAGE017
representing the ith value of a characteristic physical quantity.
7. The detection method for identifying special point-like defects according to claim 5, wherein: standard deviation of
Figure 357094DEST_PATH_IMAGE019
The calculation formula of (2) is:
Figure 31789DEST_PATH_IMAGE022
wherein n represents the number of data sample quantities, and n is a positive integer greater than or equal to 1;
Figure 555174DEST_PATH_IMAGE017
representing an ith value of a characteristic physical quantity;
Figure 174899DEST_PATH_IMAGE018
represents the mean value of the characteristic physical quantity sequence z.
8. The detection method for identifying special point-like defects according to claim 1, wherein: in the step 3, a weight is given to each sample and each cluster, the class to which the weight of each sample is the largest belongs is determined, the value range of the weight is between [0,1], the closer to 1, the larger the weight is, the closer to 0, the smaller the weight is, and the cluster number m and the cluster center number C of the cluster need to be determined before the sample data is clustered by the fuzzy C-means clustering method, wherein m is a positive integer with the value range of [1, ∞).
9. The detecting method for identifying special point-like defects according to claim 8, wherein: the clustering method comprises the following specific steps:
3.1, randomly generating a weight matrix of n × C
Figure 150945DEST_PATH_IMAGE023
Step 3.2, calculatejIndividual cluster center
Figure 629331DEST_PATH_IMAGE024
Step 3.3,Recalculate the weight matrix U, note as
Figure 459752DEST_PATH_IMAGE025
tIs shown astPerforming secondary iteration;
3.4, calculating the error sum of squares of the iteration, and when the error sum of squares is relatively small, achieving a better clustering result;
step 3.5, repeating the step 3.1, the step 3.2, the step 3.3 and the step 3.4, and iteratively calculating the clustering center
Figure 794919DEST_PATH_IMAGE024
And weight matrix
Figure 461523DEST_PATH_IMAGE026
Sum of squares of errors calculated iteratively up to t +1 th iteration
Figure 540338DEST_PATH_IMAGE027
Sum of squares of errors calculated from the t-th iteration
Figure 225266DEST_PATH_IMAGE028
When the results are almost the same, taketC clustering centers and n x C weight matrix in the secondary iteration according to thetAnd determining the attribution type of each sample by the weight matrix after the secondary iteration according to the maximum membership principle in the fuzzy set.
CN202111252331.0A 2021-10-27 2021-10-27 Detection method for identifying special point-like defects Active CN113689432B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111252331.0A CN113689432B (en) 2021-10-27 2021-10-27 Detection method for identifying special point-like defects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111252331.0A CN113689432B (en) 2021-10-27 2021-10-27 Detection method for identifying special point-like defects

Publications (2)

Publication Number Publication Date
CN113689432A CN113689432A (en) 2021-11-23
CN113689432B true CN113689432B (en) 2022-02-08

Family

ID=78588251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111252331.0A Active CN113689432B (en) 2021-10-27 2021-10-27 Detection method for identifying special point-like defects

Country Status (1)

Country Link
CN (1) CN113689432B (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPWO2018225406A1 (en) * 2017-06-08 2020-04-09 コニカミノルタ株式会社 Method for determining arrangement of surface defect inspection apparatus, apparatus, program, and recording medium
CN110987970A (en) * 2019-10-26 2020-04-10 惠州高视科技有限公司 Object surface defect detection system and detection method

Also Published As

Publication number Publication date
CN113689432A (en) 2021-11-23

Similar Documents

Publication Publication Date Title
CN113989279B (en) Plastic film quality detection method based on artificial intelligence and image processing
CN109977808B (en) Wafer surface defect mode detection and analysis method
CN115351598A (en) Numerical control machine tool bearing detection method
CN113838054B (en) Mechanical part surface damage detection method based on artificial intelligence
CN111242123B (en) Power equipment fault diagnosis method based on infrared image
CN107085846B (en) Workpiece surface defect image identification method
CN111080691A (en) Infrared hot spot detection method and device for photovoltaic module
CN114723704A (en) Textile quality evaluation method based on image processing
CN113537321B (en) Network flow anomaly detection method based on isolated forest and X mean value
CN117115148B (en) Chip surface defect intelligent identification method based on 5G technology
CN116091504A (en) Connecting pipe connector quality detection method based on image processing
CN112561875A (en) Photovoltaic cell panel coarse grid detection method based on artificial intelligence
CN117455917B (en) Establishment of false alarm library of etched lead frame and false alarm on-line judging and screening method
CN116778520B (en) Mass license data quality inspection method
CN117252840B (en) Photovoltaic array defect elimination evaluation method and device and computer equipment
CN113689432B (en) Detection method for identifying special point-like defects
CN117593499A (en) Hydropower station electromechanical equipment fault identification method based on distributed routing inspection strategy
CN113808129A (en) Effective detection method for confusable defects
CN112132823A (en) Photovoltaic cell image local uneven illumination processing method based on artificial intelligence
CN113780488A (en) Scratching and scratching defect detection method based on position polymerization degree
CN115761211A (en) Petrochemical enterprise pump room equipment temperature monitoring method and device based on RGB image and thermal imaging coupling
CN112508946A (en) Cable tunnel abnormity detection method based on antagonistic neural network
CN112529835A (en) Image splicing tampering detection and positioning method based on source camera identification
CN117523324B (en) Image processing method and image sample classification method, device and storage medium
CN117690846B (en) Visual detection method, device and equipment for solar silicon wafer and storage medium

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