CN107977961A - Textile flaw detection method based on peak value coverage values and composite character - Google Patents

Textile flaw detection method based on peak value coverage values and composite character Download PDF

Info

Publication number
CN107977961A
CN107977961A CN201711188212.7A CN201711188212A CN107977961A CN 107977961 A CN107977961 A CN 107977961A CN 201711188212 A CN201711188212 A CN 201711188212A CN 107977961 A CN107977961 A CN 107977961A
Authority
CN
China
Prior art keywords
mrow
msub
value
calculating
grid
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201711188212.7A
Other languages
Chinese (zh)
Other versions
CN107977961B (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 University
Original Assignee
Changzhou University
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 University filed Critical Changzhou University
Priority to CN201711188212.7A priority Critical patent/CN107977961B/en
Publication of CN107977961A publication Critical patent/CN107977961A/en
Application granted granted Critical
Publication of CN107977961B publication Critical patent/CN107977961B/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
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/40Analysis of texture
    • G06T7/41Analysis of texture based on statistical description of texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20081Training; Learning
    • 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/30124Fabrics; Textile; Paper

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Probability & Statistics with Applications (AREA)
  • Image Analysis (AREA)

Abstract

The present invention provides a kind of textile flaw detection method based on peak value coverage values and composite character, this method analyzes the Pixel of Digital Image half-tone information based on flat textile surface under lighting source, divide the image into the grid for non-overlapping copies, calculate the IRM of each grid, HOG, GLCM and Gabor characteristic value, textile surface flaw is automatically positioned according to feature Distribution value.The present invention is especially suitable for the textile surface flaw being automatically identified in the textile flat surfaces gray-scale image that is gathered under steady illumination light source.

Description

Textile flaw detection method based on peak coverage value and mixed characteristics
Technical Field
The invention relates to the technical field of textile flaw detection, in particular to a textile flaw detection method based on a peak coverage value and a mixed characteristic.
Background
The traditional manual identification accuracy of textile flaws is only 60-75% (see the documents: K.Srinivasan, P.H.Datotor, P.Radhakrishnaiah, et al. FDAS: a Wireless-based frame work analysis of defects in woven textiles structures, J.Text.Inst.83(1992) 431-. Digital image samples of flat textile surfaces (hereinafter referred to as textile images) belong to two-dimensional textures which have been proven to be generated according to a Pattern arrangement method defined by 17 Wallpaper groups (see the documents: h.y.t.ngan, g.k.h.ping, n.h.c.yung.motion-based detection for patterned fabric, patterned recognition (2008) 1878-. Most automatic detection methods for textile defects can only process textile images of the type p1 in wallpaper groups (see document: h.y.t.ngan, g.k.h.pang, n.h.c.yung.automatic textile defect detection-apparatus, Image and vision computing 29(7) (2011), and only a few methods can process textile images other than the type p1 (see document: h.y.t.ngan, g.k.h.p.p.n, n.h.c.yung.motion-based textile defect detection for patterned fabric, Pattern recognition 1878-) (1894), such as Wavelet pre-processing-based reference Image difference methods (see document-preprocessing defect detection for patterned fabric, cloth defect detection-apparatus, g.73. g.g. graphics, g.t.t. Pat. 73. g.73. g.g.g. graphics, g.k.73. g.g. method for detecting textile defects in wallpaper groups) (see document: g.g.g.y.t. g.4, g.g.g.g. 4, graphics, map detection, g.4, map, g.73. c.g. 4, map detection, map, hereinafter abbreviated as BB) (see literature: h.y.t.ngan, g.k.h.pang, Novel method for patterned fibrous infection using bollinger bases, opt.eng.45(8) (2006) 087202-1-087202-15), regula band method (regular bases, hereinafter abbreviated as RB) (see: h.y.t.ngan, g.k.h.pang, regulated apparatus for patterned texture analysis, IEEE trans.autom.sci.eng.6(1) (2009) 131-: tsang, H.Y.T.Ngan, G.K.H.Pang, textile installation based on the extrusion method, Pattern recognit.51(2016) 378-), etc. Although these methods can handle textile images other than p1, their computational methods are mostly based on a manually selected grid-like pattern (hereinafter referred to as a grid). For example, WGIS requires manual selection of the size and texture of a grid, and BB, RB and ER require manual definition of the grid size. These a priori knowledge reduce to some extent the automation of the machine to identify textile defects.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: in order to improve the automation degree of machine identification of textile flaws, the invention provides a textile flaw detection method based on peak coverage values and mixed characteristics.
For clarity of presentation, reference will now be made in detail to some of the symbols and concepts related to the present invention.
Representing a set of positive integers.Representing a set of integers including zero.Representing a set of positive real numbers including zero.Representing a set of real numbers including zero.Indicates the number of elements asThe real vector of (2).Representing a set of complex numbers.Indicates the number of elements asThe complex vector of (2). T denotes a matrix or vector transpose.Represents a real matrix of n x m size, wherein Represents a real matrix of k × n × m size, whereinIf it isAnd isThen A isi,:Represents the ith row of matrix A, A:,jRepresenting the jth column of matrix a.
If it isAnd isThen A isl,:,:Denotes that in A the size is nX m of the first layer matrix, Al,i,:Denotes the ith row of the l-th layer matrix of size n × m in A, Al,:,jRepresents the jth column of the l-th layer matrix of size n × m in a.
Presentation ratioSmall maximum integers, e.g.
{aiDenotes an element a determined by an index iiA set of constituents or a multiple set.
| S | represents the number of elements in the set S, and if S is a vector, | S | represents the number of elements included in the vector, | S | is referred to as a vector length.
avg (S) or mean (S): and calculating the mean value of the set or the multiple set S, wherein elements of S are real numbers.
std (S): and calculating the standard deviation of the set or the multiple set S, wherein the elements of S are real numbers.
med (S): and (4) calculating median values of the set or the multiple set S, wherein elements of S are real numbers.
mod (S): and calculating the mode of the multiple set S, wherein the elements of S are real numbers.
max (S) denotes finding the maximum value of an element of a set or multiple sets S, e.g. max (I)c) Represents IcThe maximum gray value of the middle pixel.
max (s [ condition ]) indicates finding eligibleIs measured.
min (S) denotes finding the minimum of an element of a set or multiple set S, e.g. min (I)c) Represents IcThe minimum gray value of the middle pixel.
arg maxsf(s) represents s in the range of values of the variable s within the domain of definition of the function f, such that the function f(s) takes the maximum value.
arg minsf(s) represents s in the range of values of the variable s within the domain of definition of the function f, such that the function f(s) takes the minimum value.
arg maxsf1(s),f2(s) is expressed in function f1And f2In the value range of the variable s in the intersection of the definition domains, so that the function f1(s) and f2(s) s is taken as the maximum value.
Representing the variable s within the domain of the function f(s)1And s2S in such a range that the function f(s) takes the maximum value1And s2
arg modi({ai}) represents the corresponding multiple set { aiMode ({ a) } mode mod ({ a)i}).
dimx(I) Representing the total number of lines, dim, of the two-dimensional image Iy(I) Indicates the total number of columns of I.
Image origin: the position in the image where the pixel row-column index starts is assumed to be in the upper left corner of the image and has the value (1, 1).
I (x, y) denotes a pixel value having a row-column index (x, y) in the two-dimensional image I. Line indexStarting from the original point of the image and increasing downwards by taking 1 as step length, wherein x is more than or equal to 1 and is less than or equal to dimx(I) (ii) a Column indexStarting from the original point of the image and increasing rightward by taking 1 as a step length, and y is more than or equal to 1 and less than or equal to dimy(I)。
Image boundary: with line index dimx(I) Row and column index dimy(I) The column (c).
Cartoon component I of textile imagec: applying a Relative Total Variation (RTV) model (Xu L., Yan Q., Xia Y., Jia J., Structure Extraction from Texture vision Relative Variation, ACMTransductions on Graphics 31(6)2012 Articule 139) to a grayed textile image I to generate a grayed image I with clear edges and fuzzy Texture based on Ic,IcCalled the textile image cartoon component.
Binary textile image Itc: binarization of I Using the Bradley method (Bradley D., Roth G., adaptive thresholding Using the Integrated Image, Journal of Graphics Tools 12(2) 200713-21)cAnd according to step 1.1, binarized IcAnd denoising, and deleting the abnormal area binary object to obtain a binary image, wherein the foreground pixel value is 1, and the background pixel value is 0.
Binary object centroid: i istcAnd the average value of the line indexes and the average value of the column indexes of the foreground pixel image contained in the binary object.
Representing vectors concatenated in operand order, e.g. scalar v11 and vector v2=[2 3]T,For scalar s1=8,s2=1,s3=5,For vector v1=[2 3]T,v2=[5 0 4]T
Representing element-by-element vector multiplication, e.g. vector v1=[5 0.9 4]T,v2=[1 0 1]TThen, then
Wherein a is the ratio of a to b,
graph index (i)r,ic): after the image is divided into non-overlapping grids, each grid has a unique grid row index i according to the arrangement position of the grid in the imagerAnd a unique grid index icThe index of the upper left grid in the image is (1,1), the index of the right grid next to the grid is (1,2), the index of the lower grid next to the grid with the index of (1,1) is (2,1), and so on.Indicates a grid index of (i)r,ic) In the drawing grid of (1), wherein L1,1Referred to as the first frame.
Grid pixel index: the grid is made up of pixels, so the grid is an image, and the definition of the origin of the image and the row-column index of the pixels also applies to the grid pixel index.
Size of the grid: the grid includes a number of rows and a number of columns of pixels.
The type of the texture of the graph is as follows: the kind of grid texture is generated based on grid segmentation and the textile gray scale image, the image centered as in fig. 6 generates 5 × 7 grids according to the grid segmentation, and 35 grids can be classified into 3 classes according to the texture of the grids.
A grid matrix: the matrix is in the unit of a grid, that is, each element in the matrix is a grid. Each image as in fig. 7 contains 2 × 2 cells, corresponding to a 2 × 2 cell matrix, i.e. the index of the element in the matrix is the same as the cell index.
Characteristic matrix: and calculating the characteristic vector of each element in the grid matrix by using a characteristic extraction method, and forming the matrix by taking the characteristic vector as a unit, namely, each element in the matrix is the characteristic vector of one grid, and the index of the element in the matrix is the same as the index of the corresponding grid in the grid matrix.
Training a sample set: n sub-pictures I1,I2…INThe resolution of the image is the same, the types and the number of the grid textures generated by all the images according to the grid segmentation are the same, if the types and the number of the grid textures are the sameAnd under the condition of not considering factors influencing image sampling, such as shape distortion, illumination change and the like, the ith sub-image IiMiddle gridAndandhas the same texture and L1,1,L2,1…Lt,1Are different in texture, whereinFor example, four images I as shown in FIG. 71,I2,I3And I4According to the grid segmentation, each image generates 4 grids, the grids of the four images only have 2 texture types and are arranged in a full mannerThe above conditions are satisfied. I isiReferred to as training samples. The training samples are full images, the training sample set only contains full images, and the full images only appear in the training sample set.
Testing a sample set: similar to the training sample set, all images have the same resolution, and the types and the number of the texture of the image generated according to the image grid segmentation are the same, the arrangement mode of each image grid is consistent with that described in the training sample set definition, and different from the training sample set, the images in the test sample set contain irregular areas which have random positions and the texture does not belong to the texture type of the image grid, and the areas are defined as flaws. The images in the test sample set are called test samples, the test samples are provided with images, and the images in the test sample set are provided with images.
The feature extraction method name ordered set T: representation feature extraction method f1,f2…f|T|E.g., T ═ { HOG, LBP }, then | T | ═ 2 and f1Denotes the HOG method, f2The LBP method is shown.
On the basis of the above definition, the technical scheme adopted by the invention for solving the technical problems is as follows: a textile flaw detection method based on peak coverage values and blending features comprises two stages: a training phase and a testing phase. In the training stage, a picture is segmented according to a series of flawless textile images (hereinafter referred to as flawless images) and parameters required by flaw identification are calculated; and in the testing stage, carrying out pattern segmentation on a set of textile image according to the parameters obtained in the training stage, judging whether the pattern contains flaws or not, and finally marking the pattern containing flaws.
The training phase comprises three steps: step 1, calculating graph division parameters, step 2, training sample graph division, and step 3, calculating test stage parameters. The test phase comprises two steps: step 4, testing sample grid segmentation, and step 5, identifying flaws. The overall flow of the two stages is shown in figure 1. The method of the invention assumes that the textile image has the following characteristics: the grid being arranged transversely to the direction of the rows of images, relative to the rows and columns of the textile image, and according to the patternThe column directions are arranged longitudinally; in IcIn (2), part of the grid has a geometrical shape and has a significant difference in gray level from the background pixels.
Step 1, calculating a graph division parameter. This step comprises three sub-steps, step 1.1 background pixel projection, step 1.2 calculating the peak coverage value and step 1.3 calculating the ideal size of the grid.
Step 1.1, calculating cartoon components of a gray level image I of a textile according to an RTV model, binarizing the cartoon components by using a Bradley method, denoising the binarized cartoon components by morphological corrosion and expansion operation, and obtaining the binarized I by using a Moore-Neighbor tracking algorithmcCalculating the area of the binary object in the binary cartoon component, and deleting the area not in the interval ((1- α) · m)a,(1+α)·ma) Binary object of (where maIs a binary object area median value,and 0 < α < 1) obtaining a binaryzation textile image Itc. Calculation of ItcThe background pixel number of each line is arranged according to the ascending order of the line index to obtain the background pixel line projectionArranging the background pixel number of each column in ascending order according to the column index to obtain the background pixel row projection
Step 1.2 calculates the peak coverage value. Calculating the projection of the rows of pixels of the background of a grey-scale image I of a textileAt the peak value of (2), the peak value is atThe indexes in the sequence are arranged in an ascending order to obtain a peak value sequenceFor prTo middlePeak valueCalculated according to the following formulaCoverage value of
Similarly, calculatePeak sequence ofComputingWhereinCalculating prOrdered set of medium peak coverage valuesThe medium elements are arranged in descending order according to size; for theTo (1)An element Satisfy in a sequence of peaksIs/are as followsThe ordered set is called the firstPeak value of stageFirst, theThe elements in the level peak are as followsThe indexes in (1) are arranged in an ascending order; for the firstThe peak value of each stage is calculated in the range of the previous peak valueThe median of the absolute values is calculatedAnd the number of occurrences thereofComposition setComposition setMiddle element value groupSimilarly, according toAndcomputing satisfactionIs/are as followsOrdered set ofLevel peak value' Calculate the firstFront and back elements in the level peakThe absolute value of the difference between the indexes in (1) and the median value thereofAnd number of occurrences of median valueForm a multiple setForm a multiple setMiddle element value group
Step 1.3 calculates the ideal size of the grid. I on training sample set1,I2…INThe ith ofTraining sample IiCalculating I according to step 1.2iIs/are as followsprpcAndcomputingValue setIiIdeal number of lines ofIs defined by the following formula.
Where δ is the Dirac delta function (Dirac delta function).I.e. m isA member of (1), IiIdeal number of columns ofCalculation andsimilarly, it is sufficient to replace the term with the subscript r in the above formula with the corresponding term with the subscript c, for exampleIs replaced byThe ideal size of the grid is defined asMedian ofAndmedian of
Step 2 for training sample set I1,I2…INAnd carrying out graph grid segmentation. For the ith training sample IiThis step comprises three substeps: step 2.1 background pixel projection, step 2.2 calculation of initial segmentation position and step 2.3 calculation of final segmentation position.
The calculation process of step 2.1 comprises step 1.1 and step 1.2.
Step 2.2 calculates the initial segmentation position. For the ith training sample IiCalculated according to step 2.1Andcalculating what is defined in step 1.2Andandandcalculated according to step 1.3Andcalculated by the following formulaThe most frequently occurringPeak value of stage
Similarly, can calculateThe most frequently occurringStep-peak, i.e. replacing the term with subscript r in the above formula by the corresponding term with subscript c, e.g.Is replaced bySuppose thatThere is a string of consecutive peaks in the stage peaks and each peak is at the previous peakThe absolute value of the difference between the indexes in (1) is close toThe series of peaks is atThe index in (1) is defined as the line initial division position SrThe peak value of the string is atThe indices in the level peaks conform to the following definition.
Wherein d isj+kIs shown asTwo peaks indexed j + k and j + k-1 in the level peaksThe absolute value of the difference between the medium indices,and 0 < β < 1 as parameter, row initial segmentation position ScRelated toAndis defined byAndsimilarly, it is sufficient to replace the term with the subscript r in the above formula with the corresponding term with the subscript c, for exampleIs replaced byAnd d isj+kAt this time, it representsTwo peaks indexed j + k and j + k-1 in the level peaksAbsolute value of the difference between the medium indices parameter β pairsAndthe calculation of (2) is general.
Step 2.3 calculate the final segmentation position, i.e. the line segmentation positionAnd column division positionFor the ith training sample IiAndare respectively the I calculated in step 2.2iLine initial dividing position SrAnd column initial division position Sc. Will be provided withThe elements in (1) are arranged in ascending order of size, and the minimum element in the elements is foundAnd maximum elementFour predicted positions are calculated as followsAnd
obtaining I by step 1.1iBinary textile imageAnd updated according to the following three conditionsAnd
in the first case: if it isComputingThe middle row index x satisfiesAverage value of the two-valued object centroidAndthe middle row index x satisfiesAverage value of the two-valued object centroidThenIs added asAnd become a new elementRecalculation by definitionAnd
in the second case: if it isComputingThe middle row index x satisfies2 ofMean value of the centroid of the value objectThenIs added asAnd become a new elementRecalculation by definition
In the third case: if it isThe calculation is terminated.
Repeating the calculation of the three cases untilAnduntil no further change occurs. Similarly, the update is performed in the following three cases And
in the first case: if it isComputingThe middle row index x satisfiesAverage value of the two-valued object centroidAndthe middle row index x satisfiesAverage value of the two-valued object centroidThenIs added asAnd become a new elementRecalculation by definitionAnd
in the second case: if it isComputingThe middle row index x satisfiesAverage value of the two-valued object centroidThenIs added asAnd become a new elementRecalculation by definition
In the third case: if it isThe calculation is terminated.
Repeating the calculation of the three cases untilAnduntil no further change occurs, at which pointThe calculation of (2) is ended.Is calculated similarlyThat is to say, theThe elements in (1) are arranged in ascending order of size, and the minimum element in the elements is foundAnd maximum elementAccording toAndupdating three cases involvedAndi.e. replacing the superscript r of each of the three cases by c, e.g.Is replaced byWhile replacing x in the inequality and formula by y, e.g.Is replaced byAccording toAndupdating three cases involvedAndi.e. replacing the superscript r of each of the three cases by c, e.g.Is replaced byWhile replacing x in the inequality and formula by y, e.g.Is replaced byAccording toAndrespectively include row and column indices, IiThe division is performed according to the row and the column where the indexes are located, and the rectangular area obtained by the division is a graph grid, which is defined as follows.
WhereinAndan index indicating the position of the grid arranged in I.
And 3, calculating parameters of the test stage. The step includes three substeps, namely step 3.1 calculating the grid period, step 3.2 calculating the ideal statistical value of each feature of the grid and step 3.3 calculating the ideal statistical value threshold of each feature.
Step 3.1 calculate the grid period. For training sample set I1,I2…INTo (1)A training sample IiAccording to step 1 and step 2, the method can obtainAndaccording toAndwill IiDivided into m × n gridsCalculation of I Using the HOG feature extraction methodiDrawing gridAnd the feature vector index is made the same as its corresponding grid index. ComputingAnd the ithrThe Euclidean distances of all the grids in the row are arranged in ascending order according to the column index of the grid involved in calculation, and then a distance vector can be formed. For theWill be provided withCorresponding distance vector in icIn ascending order to obtain the ithrAn n distance matrix of rows. For theWill be the ithrN × n distance matrix corresponding to rows by irIn ascending order to obtain IiRow distance matrix ofSimilarly, I can be calculatediColumn distance matrix ofFor vector Performing Fourier transform to obtainThe period and the frequency spectrum of (c). According to(And) And calculating a period median value and a spectrum median value, namely an image line period and an image line spectrum. Similarly, I can be constructediColumn distance matrix ofAnd calculates the image column period and the image column frequency spectrum. According to I1,I2…INCalculating N image line periods and corresponding N image line spectra, and calculating the median of the image line spectraFind out higher thanThe image line periods corresponding to the image line frequency spectrum of (2), and calculating the median of the image line periodsRepeating the same steps for the image column period and the image column frequency spectrum to obtain the median value of the image column frequency spectrumAnd median of image column periodIf it isOrOrThen t is taken to be 1, otherwise by comparisonAndthe value of t is determined by the corresponding frequency spectrum size, namely: if it isThen t is takenOtherwise t gets
And 3.2, calculating an ideal statistical value of each characteristic of the chart lattice. This step includes four substeps: step 3.2.1 calculates the feature statistics, step 3.2.2 calculates the feature statistics ranking, step 3.2.3 calculates the stable feature elements, step 3.2.4 calculates the ideal statistics.
Step 3.2.1 calculating feature statistics, according to the steps3.1 computing training sample set I1,I2…INThe grid period t. For the ith training sample IiSegmentation I according to step 2iGet the chart gridFeature extraction method f with | T | pieces (T is a feature extraction method name ordered set) input as a two-dimensional gray image matrix and output as a one-dimensional real vector1,f2…f|T|Calculation of IiDrawing gridFeature vector ofBased on fjIs defined as fjCharacteristic element number F ofj. According to the assumed conditions and the grid period t, IiMiddle gridAnd andis the same as L1,1,L2,1…Lt,1Are different in texture, wherein l1There are therefore t classes of lattices with different textures andclass diagram is in the ithrRow and (i)r+l1t) the column indexes of the rows are the same, so that the k-th type grids with the same column index can be indexed by the rows and columnsAnd forming a grid matrix in ascending order. For the kth class of lattices, there are at most t lattice matrices C1,C2…CtCalculating the k-th class of cells from the cells comprising the cell matrix based on fjI of (A)iCharacteristic statistics ofAnd
whereinIndicating that the cell L is the ithtMatrix of individual gridsAny of the elements of (a) or (b),representation is based on fjIs arranged in the grid matrixIth in the feature vector of all elements (grids)FMultiple sets of elements (real numbers), whereinAnd 1 is not less than iF≤FjWhen opt is replaced by mean, std, max, or min, thenDefine the correspondingAnd
and 3.2.2, calculating characteristic statistic value sequencing. Computing training sample I1,I2…INBased on fjIs/are as followsThe Euclidean distance average d (j) of (1), which is defined as follows.
For f1,f2…f|T|The corresponding d (1), d (2) … d (| T |) can be obtained. Extraction method f for kth type of graph texture and jth featurej(i.e., fixed indices k and j), according to I1,I2…INStep 3.2.1 can generate NApplying K-means algorithm (hereinafter referred to as clustering algorithm) to NClustering is carried out, the class parameter of the clustering algorithm is set as t, and t class centers are obtainedFor theCalculating the distance fromClass label u corresponding to nearest class center*
If it isWhereinThe class center with the most elements in the classes generated by the t clustering algorithms is represented, and the feature statistic value determined by the index (i, j, k) and the index (i, j, k) are exchanged*) The determined feature statistic, where k*The definition is as follows.
For all fixed combinations of indices k and j, for eachRepeat the aboveu*Andis calculated and judgedIf true, repeat k*And the index (i, j, k) and the feature statistics determined by the index (i, j, k) are exchanged*) The determined feature statistics. According to the definition of d (j), calculating the training sample I again1,I2…INBased on fjIs/are as followsTo obtain a corresponding f1,f2…f|T|D ' (1), d ' (2) … d ' (| T |). If d (j) is greater than or equal to d' (j)If both are true, the feature statistic value exchange result is retained, otherwise, the feature statistic value sequence is restored to the state at the end of the step 3.2.1.
Step 3.2.3 calculate the stable characteristic elements. Extraction method f for kth type of graph texture and jth featurej(i.e., fixed indices k and j), according to the above steps and I1,I2…INCalculated N numberTo (1) aAn elementAndi th of (1)FAn elementThe k-th class of lattice textures can be computed based on fjCharacteristic vector of (i)FStable value s of individual element(j,k)(iF) It is defined as follows.
Will s(j,k)(iF) By index iFThe ascending order is arranged to obtain the k-th class of lattice texture based on fjIs a vector of stable values s(j,k). If the parameter nfRepresents a predefined minimum feature vector length, then when nf<FjWhen established, an Adaptive K-means algorithm (Adaptive K-means) algorithm (Jia L., Liang J., Fabric defect analysis based on Adaptive clustering segmentation, Journal of the Franklin Institute 354(13) (2017), 5694-(j,k)(1),s(j,k)(2)…s(j,k)(Fj) Clustering is carried out, if the categories generated by the self-adaptive clustering algorithm are numbered according to positive integers from 1 in sequence, the ithFA stable value s(j,k)(iF) The number of the belonged category is marked as Ls(iF) Then the numbers define a set Ls. If the minimum feature number of the preset parameter is definedThe class k lattice texture is based on fjCharacteristic vector of (i)FStability of each elementThe definition is as follows.
Representing the top n obtained by arranging the classes generated by the adaptive clustering algorithm in descending order of the number of elementsfA set of numbers for each category. Will be provided withBy index iFThe ascending order is arranged to obtain the k-th class of lattice texture based on fjStability vector ofThe above is repeated for all fixed combinations of indices k and jAnd (4) calculating.
And 3.2.4, calculating an ideal statistical value. Extraction method f for kth type of graph texture and jth featurej(i.e., fixed indices k and j), according to the above steps and I1,I2…INCan calculateAndvector vectoring through adaptive clustering algorithm Clustering, if the categories generated by the adaptive clustering algorithm are numbered according to positive integers from 1 and the ith vectorThe number of the category is recorded asThen these number definition setsFor the first Class k, class k texture based on fjIdeal statistical value ofThe definition is as follows.
Representing patterns belonging to class k based on fjI th of (1)uSub-unitAverage value of mean value in feature statistics of the graph-like lattice texture. The above is repeated for all fixed combinations of indices k and jAnd (4) calculating.
Step 3.3 calculates the ideal statistical threshold for each feature. According to the training sample set and the steps, the j-th feature extraction method f can be calculatedjClass k lattice texture ofuIdeal statistical value of individual subclass lattice texture(i.e., fixed indices j, k, and i)u). For any training sample, the graph lattice L generated by step 2 is determined according to the feature vector fj(L) calculating the sum of ideal statistical indices k and k according to the following formula
For theThere may be a plurality of L whose ideal statistical value index satisfies k x k andthese grids form a setWhen in useWhen the method is established, the ith type of graph texture based on the jth feature extraction method can be calculated according to the following formulauMaximum distance of individual subclass lattice textureI.e. the ideal statistical value threshold.
For indices j, k, and iuAll fixed combinations of (1), repeating the aboveAnd (4) calculating.
Step 4, testing sample grid segmentation. Repeating the calculations of steps 2.1 to 2.3 for a given test sample, with the difference that the training samples involved in the calculation are replaced by test samples, resulting in the row segmentation locations of the test samplesAnd column division positionAnd according toAndthe test sample is divided into grids.
And 5, identifying flaws. For arbitrary chart of test sampleAccording to the feature extraction method f1,f2…f|T|Computing feature vectors For fjCalculated feature vectorCalculating the ideal statistics index k x and from step 3.2 and step 3.3 Andif it isThenOtherwise, the mark is flawed, otherwise, the mark is flawless. When all the grids are based on fjIs marked end, each defective cell L is checkedl8 limb areaMarking of interior panes, if there are any, of absenceThen judgeWhether it is true, if so, markingTo have flaws and makeAnd d is calculated as followsl+1Continuing to checkMarking the inner picture grid and repeating the steps until dl+1Is composed of
Wherein the threshold coefficient0<γ≤1,L1Representation is based on fjThe resulting frame of the fantasy chart is finalized. When the dynamic threshold isAnd then, the row and column indexes of the pixels contained in all the frames with the blank are the detection results.
The invention has the beneficial effects that: the invention provides a textile flaw detection method based on peak coverage values and mixed characteristics. The invention is particularly suitable for automatically identifying textile surface flaws in a digital image of the gray scale of the textile flat surface acquired under a stable illumination light source.
Drawings
The invention is further illustrated by the following figures and examples.
FIG. 1 is a general flow diagram of a textile defect detection method of the present invention based on peak coverage values and blend characteristics; FIG. 2 is a schematic flow chart of step 1.1 of the textile defect detection method of the present invention based on peak coverage and blend features; FIG. 3 is a schematic flow chart of the calculation of column initial segmentation position of step 1.2 in the textile defect detection method based on peak coverage value and blend feature of the present invention; FIG. 4 is a schematic flow chart of the calculated column final split position of step 2.3 in the textile defect detection method of the present invention based on peak coverage and blend features; FIG. 5 is a schematic flow chart of the calculated frame period of step 3.1 of the textile defect detection method of the present invention based on peak coverage and blend features; FIG. 6 is a schematic flow chart of feature statistics for each gray scale image of the flawless textiles; FIG. 7 is a schematic illustration of calculating a feature statistics ranking; FIG. 8 is a schematic sequencing flow diagram; FIG. 9 is a schematic flow chart of the calculation of ideal statistical threshold values for features; FIG. 10 is a flowchart illustrating a defect identification process; FIG. 11 is a flowchart of the step 1.1 background pixel projection algorithm; FIG. 12 is a flowchart of the algorithm for calculating the peak coverage value of step 1.2; FIG. 13 is a flowchart of the algorithm for calculating the ideal size of the grid at step 1.3; FIG. 14 is a flowchart of the algorithm for calculating the background pixel projection and coverage values at step 2.1; FIG. 15 is a flowchart of the algorithm for calculating the initial segmentation location at step 2.2; FIG. 16 is a flowchart of the algorithm for calculating the final segmentation location at step 2.3; FIG. 17 is a flowchart of the step 3.1 calculation grid period algorithm; FIG. 18 is a flowchart of the algorithm A.1 for computing a feature matrix algorithm; FIG. 19 is a flow chart of the algorithm A.2 calculate distance algorithm; FIG. 20 is a flow chart of the algorithm A.3 calculate signal period algorithm; FIG. 21 is a flowchart of the algorithm for calculating feature statistics at step 3.2.1; FIG. 22 is a flow chart of the algorithm for calculating feature statistic ranking at step 3.2.2; FIG. 23 is a flowchart of the step 3.2.3 algorithm for calculating stable feature elements; FIG. 24 is a flowchart of the algorithm for calculating the ideal statistic at step 3.2.4; FIG. 25 is a flowchart of the ideal statistics threshold algorithm for step 3.3 for calculating features; FIG. 26 is a flowchart of the step 4 test sample grid segmentation algorithm; FIG. 27 is a flow chart of a step 5 fault identification algorithm.
Detailed Description
The present invention will now be described in detail with reference to the accompanying drawings. This figure is a simplified schematic diagram, and merely illustrates the basic structure of the present invention in a schematic manner, and therefore it shows only the constitution related to the present invention.
The implementation mode of the computing method is completed by writing a computer program, and a custom algorithm related to a specific implementation process is described by pseudo codes. The program input is a grayed textile image and the program output is a set of panels containing defects. Embodiments of the present invention include five steps, the first three steps being a training phase and the last two steps being a testing phase.
The training phase comprises the steps of:
step 1: calculating parameters required by the grid segmentation according to the series of blank images so as to determine the ideal size of the grid;
step 2: carrying out lattice segmentation on the training sample set according to the ideal size of the lattice obtained in the step 1 to obtain a training sample lattice;
and step 3: calculating the feature vectors of the training sample lattices generated by the lattice segmentation in the step 2 by adopting a feature extraction method, thereby calculating the lattice period of the defect images in the training sample set, ideal statistical values of all the features of the lattices and ideal statistical value thresholds;
the testing phase comprises the following steps:
and 4, step 4: carrying out pattern segmentation on a given test sample according to the method in the step 2 to obtain a test sample pattern;
and 5: and (4) calculating the feature vector, the chart period, the ideal statistical value and the ideal statistical value threshold of each feature of the chart of the test sample according to the method in the step (3), and comparing the calculation result with the ideal statistical value threshold to identify the defective chart.
The order and logical relationship of the method are shown in detail in fig. 1.
These five steps are explained below.
1. Training phase
In the training stage, parameters required by the graph segmentation are calculated according to a series of gray images of the flawless textiles, and then the parameters required by the testing stage are calculated by performing the graph segmentation on the flawless images. The training phase comprises three steps: step 1: calculating a graph division parameter, and step 2: and (3) segmenting the training sample graph, and calculating the parameters of the testing stage. The graph grid segmentation method provided by the invention segments the graph grid through the steps 2.1 to 2.3 according to the parameters obtained in the step 1.3.
Step 1 is used for calculating graph cell segmentation parameters, and specifically includes three substeps, namely step 1.1: background pixel projection; step 1.2: calculating a peak coverage value; step 1.3: and calculating the ideal size of the grid.
Step 1.1, see FIG. 2 for a detailed flow. For a gray level image I of a textile, calculating a cartoon component I according to an RTV modelcFrom the Bradley method to obtain IcFig. 2 shows a schematic diagram of the pixel threshold value calculated by the Bradley method in the binarization process, i.e. IcThe method calculates a local threshold value for each pixel, and obtains a binary I according to the pixel local threshold value binary Ic. Binarized IcNoise reduction is achieved by morphological erosion and dilation operations, and then denoised binarization I is obtained using a Moore-Neighbor tracing algorithm (from Jia L., Liang J., Fabric design analysis based on anisotropic visualization, Journal of the Franklin Institute 354(13 (2017)) 5694-cThe area of the binary object, namely the number of foreground pixels of the binary object, is calculated according to the binary object in (1), namely the 8-connected foreground pixel area. Obtaining an area median value m according to the area distribution of the binary objectaAll areas are not in the interval ((1- α) · m)a,(1+α)·ma) From binary I to binary IcObtaining a binaryzation textile image I by intermediate deletiontcParameter manually specified, value rangeThe circumference is equal to or more than 0 and equal to or less than α and equal to or less than 1, α is taken as 0.6, and I is calculatedtcThe background pixel number of each line in the projection image is arranged in ascending order according to the line index to obtain the background pixel line projectionCalculation of ItcThe background pixel number of each column in the image is arranged according to the ascending order of the column indexes to obtain the projection of the background pixel columnThe one-dimensional waveform in FIG. 2 isAndstep 1 the algorithm flow is detailed in figure 11.
Step 1.2, the flow is detailed in fig. 3, for a two-dimensional textile gray scale image, the initial segmentation position includes a row initial segmentation position and a column initial segmentation position, fig. 3 only shows a conceptual flow of calculating the column initial segmentation position, and the calculation process of the row initial segmentation position is similar to that of the column initial segmentation position. According toCalculating the peak value (i.e. theIncreasing to decreasing, or decreasing to increasing values, e.g. dark dots of the one-dimensional waveform of fig. 2, and pressed atThe indexes of the medium peak values are arranged in an ascending order to obtain a peak value sequenceFor prTo middlePeak valueComputingCoverage value ofWhich is defined as follows.
In the concept of a method for monitoring the temperature of a human body,is shown in prFromBoth sides start to prHead and tail move without encountering a motion larger thanThe number of peaks passed before the peak of (2) is shown in fig. 3, and the peaks having the same coverage value are represented by triangles having the same color. Similarly, calculatePeak sequence ofAnd calculateWherein1≤ipc
For prOr pcThe coverage value often takes a finite integer value, p as shown in FIG. 3cValues of 0, 1,2, 4, 11 and 27. Pressing down the coverage valueSequencing to obtain a coverage value setFor example of FIG. 3According to the firstValue of individual coverage valuepcMiddle coverage valuePeak value ofIs referred to as the firstStage peak value, firstPeak value of stage is atThe indexes in (1) are arranged in ascending order. Calculate the firstAdjacent ones of the stage peaks areI.e. each peak is at the index spacing d from the previous peakAbsolute value of difference between indexes in) to calculate median value of index spacingAnd itNumber of occurrencesFor theEach element in the set has median values of adjacent index spacing and occurrence frequency thereof, and the values of the median values form a setSimilarly, calculateAndstep 1.2 the algorithm flow is detailed in fig. 12.
Step 1.3 calculates the ideal size of the grid. According to training samples I in the training sample set1,I2…INCan calculate the ithSample IiIs/are as followsAndthen IiIdeal number of lines ofThe definition is as follows.
Where δ is the Dirac delta function (Dirac delta function). Ideal number of columns of IIs defined bySimilarly, only need to beIn the definition, an item with a subscript r may be replaced by a corresponding item with a subscript c, e.g.Is replaced byThe ideal size of the grid is defined asMedian ofAndmedian ofStep 1.3 the algorithm flow is detailed in fig. 13.
The calculation process of step 2.1 comprises step 1.1 and step 1.2. Step 2.1 the algorithm flow is detailed in fig. 14.
Step 2.2 calculates the initial segmentation position, the flow is detailed in fig. 3. For the ith training sample IiCalculated according to step 2.1Andcalculating what is defined in step 1.2Andandandcalculated according to step 1.3Andcalculated by the following formulaThe most frequently occurringPeak value of stage
WhereinAndrespectively representing projection according to background pixel linesThe set of coverage value values calculated by the peak sequence of (1)Median value of index spacing of level peaks, noNumber of occurrences of median value in index interval of level peaks and all level peaks: (Peak values corresponding to all elements of) is determined.Is calculated bySimilarly, only need to beIn the definition, an item with a subscript r may be replaced by a corresponding item with a subscript c, e.g.Is replaced by
Suppose thatThere is a string of consecutive peaks in the stage peaks and each peak is at the previous peakThe absolute value of the difference between the indexes in (1) is close toThe series of peaks is atThe index in (1) is defined as the line initial division position SrThe peak value of the string is atThe indices in the level peaks conform to the following definition.
Wherein d isj+kIs shown asTwo peaks indexed j + k and j + k-1 in the level peaksThe absolute value of the difference between the medium indices,and 0 < β < 1 as parameter, the method takes β ═ 0.1, row initial segmentation position ScRelated toAndis defined byAndsimilarly, it is sufficient to replace the term with the subscript r in the above formula with the corresponding term with the subscript c, for exampleIs replaced byAnd d isj+kAt this time, it representsTwo peaks indexed j + k and j + k-1 in the level peaksAbsolute value of the difference between the medium indices parameter β pairsAndthe calculation of (2) is general. Step 2.2 the algorithm flow is detailed in fig. 15.
Step 2.3 the flow is detailed in FIG. 4, which shows only the calculated column division positionConceptual flow of (1), line segmentation positionThe calculation process of (2) is similar. Due to disturbances such as imperfections and noise, S is usuallyrAnd ScCovering only part of the image (i.e. line S)rIs less than 80% of all image line indexes or ScThe image column index between the minimum and maximum values of S accounts for 80% of all the image column indexes, and 80% is not included in both cases), so that the extension S is requiredrAnd Sc. For the ith training sample IiAnd ScAre respectively the I calculated in step 2.2iS ofrAnd Sc. Will be provided withThe elements in (1) are arranged in ascending order of size, and the minimum element in the elements is foundAnd maximum elementTo be provided withCalculating the deviation S for the step size1And SAnd the predicted positions of the lines close to the image boundary are calculated as followsAnd
obtaining I by step 1.1iBinary textile imageAnd updated according to the following three conditionsAnd
in the first case: if it isComputingThe middle column index y satisfiesAverage value of the two-valued object centroidAndthe middle column index y satisfiesAverage value of the two-valued object centroidThenIs added asAnd become a new elementRecalculation by definitionAnd
in the second case: if it isComputingThe middle column index y satisfiesAverage value of the two-valued object centroidThenIs added asAnd become a new elementRecalculation by definition
In the third case: if it isThe calculation is terminated.
Repeating the calculation of the three cases untilAnduntil no further change occurs. Similarly, the update is performed in the following three cases And
in the first case: if it isComputingThe middle column index y satisfiesAverage value of the two-valued object centroidAndthe middle column index y satisfiesAverage value of the two-valued object centroidThenIs added asAnd become a new elementRecalculation by definitionAnd
in the second case: if it isComputingThe middle column index y satisfiesAverage value of the two-valued object centroidThenIs added asAnd become a new elementRecalculation by definition
In the third case: if it isThe calculation is terminated.
Repeating the calculation of the three cases untilAnduntil no further change occurs, at which pointThe calculation of (2) is ended.Is calculated similarlyThat is to say, theThe elements in (1) are arranged in ascending order of size, and the minimum element in the elements is foundAnd maximum elementAccording toAndupdating three cases involvedAndi.e. replacing the superscript c of each of the three cases by r, e.g.Is replaced byWhile substituting y in the inequality and formula by x, e.g.Is replaced byAccording toAndupdating three cases involvedAndi.e. replacing the superscript c of each of the three cases by r, e.g.Is replaced byWhile substituting y in the inequality and formula by x, e.g.Is replaced byAccording toAndrespectively include row and column indices, IiThe division is performed according to the row and the column where the indexes are located, and the rectangular area obtained by the division is a graph grid, which is defined as follows.
WhereinAndan index indicating the position of the grid arranged in I. For example, the lower left corner of FIG. 2, where the upper left corner is labeled L1,1,L1,1The right adjacent grid is L1,2,L1,1The next lower grid is L2,1And so on. Drawing gridIs composed ofAnd comprisesThe columns of (a) determine the grid boundaries. Step 2.3 the algorithm flow is detailed in fig. 16.
And 3, calculating parameters of the test stage. The step includes three substeps, namely step 3.1 calculating the grid period, step 3.2 calculating the ideal statistical value of each feature of the grid and step 3.3 calculating the ideal statistical value threshold of each feature.
Step 3.1 the process of calculating the grid period is detailed in figure 5. According to a training sample set I1,I2…INAnd step 1.3 can calculate the number of rows of the ideal size of the gridSum column numberThen the step 2 dividesA training sample IiTo obtain IiM × n grids. Suppose in IiEvery other in every row and every column of the gridThe texture of two grids of each grid is the same, and the minimum value of the t' value is called a grid period t. E.g. when t is 1, IiAll the grids have the same texture; when t is 2, IiThe texture of every other cell is the same. Classified by the texture of the grid, then IiThere are t types of lattice textures. I was calculated using the HOG (Dalal, N., Triggs B., Historgrams of organized Gradients for HumanDetection, IEEE Compout. Soc. Conf. on Compout. Vision and Pattern Recognition 1 (2005)) feature extraction method (hereinafter referred to as HOG method)iAnd arranging the characteristic vectors corresponding to the grids according to the arrangement mode of the grids, namely, enabling the characteristic vector indexes to be the same as the corresponding grid indexes. For IiDrawing gridComputingAnd the ithrThe Euclidean distances of all the grids in the row are arranged in ascending order according to the column index of the grid involved in calculation, and then a distance vector can be formed. Thus fixing the ithrEach grid in a row, according to the ithrAll grids of a row can calculate a distance vector, and the distance vectors are arranged according to the fixed grid column indexes related to the calculation in an ascending order to obtain the result based on the ithrN × n distance matrix of rows, the distance matrix being arranged by irIn ascending order to obtain IiRow distance matrix ofSimilarly, I can be calculatediColumn distance matrix ofWill vectorFast Fourier Transform (FFT) is performed as a one-dimensional signal to obtain a signalIs defined as IiThe line period and line frequency spectrum of (1) are calculated1M is less than or equal to m and l is less than or equal to 13N is less than or equal to nAnd calculating a line period median value and a line frequency spectrum median value, wherein the obtained median values are respectively defined as an image line period and an image line frequency spectrum. Similarly, according to the column distance matrix D(c)Can calculate IiAnd calculating a corresponding image column period and image column spectrum. FIG. 5 shows1,I2…INA conceptual two-dimensional scattergram of the line period and the line spectrum, and a conceptual two-dimensional scattergram of the column period and the column spectrum. According to I1,I2…INCalculating N image line periods and corresponding N image line spectra, and calculating the median of the image line spectraFind out higher thanThe image line periods corresponding to the image line frequency spectrum of (2), and calculating the median of the image line periodsRepeating the same steps for the image column period and the image column frequency spectrum to obtain the median value of the image column frequency spectrumAnd median of image column periodIf it isOrOrThen t is taken to be 1, otherwise by comparisonAndthe corresponding frequency spectrum determines the value of t, namely: if it isThen t is takenOtherwise t getsStep 3.1 the algorithm flow is detailed in fig. 17, fig. 18 shows the algorithm a.1 flow, fig. 19 shows the algorithm a.2 flow, and fig. 20 shows the algorithm a.3 flow.
Step 3.2 comprises four substeps: step 3.2.1 calculates the feature statistics, step 3.2.2 calculates the feature statistics ranking, step 3.2.3 calculates the stable feature elements, step 3.2.4 calculates the ideal statistics.
Step 3.2.1 calculate feature statistics for each gray level image of the blank textile, as shown in detail in fig. 6. Calculating a training sample set I according to the steps1,I2…INThe grid period t of (2) is the arrangement rule of the grids with the same texture. For the firstSide defect image IiIt can be divided into t-type grids with different textures, irGo to the firstClass Chart and the (i) thr+ t) the index values of the columns of the cells are the same, thus the index values can be in IiOnly the grids of the same generic class are accessed, and for the k-th class of grids, the ithrLine, item (i)r+ t) line, i (i) thr+2t) rows …, may form a matrix called a grid matrix, which may exist up to t, i.e., C, for the kth class of grids1,C2…Ct. As shown in fig. 6, when t is 3, the 3 rd type grid has 3 matrices: c1Composed of type 3 panels in rows 1 and 4 (i.e., rows 1+ t), C2Composed of type 3 panels, line 2, line 5, C3Consisting of a type 3 grid on line 3. Feature extraction method f assuming that there are | T | inputs as a two-dimensional grayscale image matrix and outputs as one-dimensional real vectors1,f2…f|T|These feature extraction methods generate feature vectors of the same length for input images of the same number of rows and columns, then IiMiddle gridCan be according to f1,f2…f|T|Calculating | T | eigenvectors If IiAll grid sizes are according to I1,I2…INThe minimum number of rows n of pixels in the middle gridrAnd the minimum number of columns ncMaking adjustments, i.e. retaining only lines 1 to n in the gridrAnd rows 1 to ncPixels of a column, then IiTwo in any gridAndbased on Are of the same length, i.e. the feature vectors ofThis is based on fjIs defined as fjCharacteristic element number F ofj. For IiThe kth type of the middle drawing lattice can be based on the drawing lattice matrix C of the drawing lattice1,C2…CtThe calculation is based onjIs the mean value of each element in the feature vectorStandard deviation ofMaximum valueAnd minimum valueThese 4 values are defined as IiIs defined by the following formula.
WhereinIndicating that the cell L is the ithtMatrix of individual gridsAny of the elements of (a) or (b),whereinRepresentation is based on fjIs arranged in the grid matrixIth in the feature vector of all elements (grids)FMultiple sets of individual elements (real numbers), when opt is replaced by mean, std, max, or min, thenDefine the correspondingAndstep 3.2.1 the algorithm flow is detailed in fig. 21.
Step 3.2.2 calculate feature statistics ranking, shown in detail in FIG. 7, for L illustrating the images of the training's absentee1,1And (4) texture difference. Though I1,I2…INAre the same training sample set, but the definition of the training sample set does not guarantee the first frame L in each sample1,1Are the same. Training as shown in fig. 7A training sample set containing 4 pairs of images I1,I2,I3And I4In which I3Middle L1,1Is different from the texture of the first grid in the other samples. If the texture of the first grid of all training samples is different then the feature statistics calculated in step 3.2.1 need to be reordered. As shown in FIG. 8, the training sample set contains training samples I1,I2,I3,I4And I5In which I4L of1,1The texture of the first of the other samples is different, resulting in feature statistics that are ordered differently from the other samples. If the first lattice texture of all training samples is the same, then the ordering is meaningless. To detect whether ordering is necessary, a training sample I is calculated1,I2…INBased on fjIs/are as follows The Euclidean distance average d (j) of (1), which is defined as follows.
For f1,f2…f|T|Correspondingly, d '(1), d' (2) … d (| T |) can be obtained, correspondingly, after the sorting is finished, d '(1), d' (2) … d '(| T |) can be calculated again according to the above formula, the average values of the front and rear groups of distances are compared, if d (j) is more than or equal to d' (j) is equal to or less than 1 and less than or equal to | T |, the sorting result is retained, and if not, the state before the sorting is recovered. The sequencing process is shown in fig. 8. N for a kth class of lattice texturesApplying the K-means algorithm (Jia L., Liang J., Fabric defect based on anisotropic analysis segmentation, Journal of the Franklin institute 354(13), (2017)5694-Hereinafter referred to as clustering algorithm) to be clustered, the class parameter of the clustering algorithm is set as t, and t class centers are obtainedFor theCalculating the distance fromClass label u corresponding to nearest class center*
If it isWhereinThe center of the class with the largest number of elements in the t classes is represented, and the feature statistic value determined by the index (i, j, k) is exchanged with the index (i, j, k)*) The determined feature statistic, where k*The definition is as follows.
For all fixed combinations of indices k and j, for eachRepeat the aboveu andis calculated and judgedIf true, repeat k*And the index (i, j, k) and the feature statistics determined by the index (i, j, k) are exchanged*) The determined feature statistics. Step 3.2.2 the algorithm flow is detailed in fig. 22.
Step 3.2.3 calculate the stable characteristic elements. According to training sample set I1,I2…INThe t kinds of grid texture can be calculated based on fjFor the Nxt group of feature statistics ofClass-to-lattice texture according to whichTo (1) a An elementAndi th of (1)FAn elementWherein FjIs composed ofThe number of characteristic elements of (1) can be calculated, the k-th class of the lattice texture can be calculated based on fjCharacteristic vector of (i)FStable value s of individual element(j,k)(iF) It is defined as follows.
Will s(j,k)(iF) By index iFThe ascending order is arranged to obtain the k-th class of lattice texture based on fjIs a vector of stable values s(j,k). If the parameter nfRepresenting a predefined minimum eigenvector length, method nfValue of nfWhen n is 8f<FjWhen established, the K-th class graph texture is based on f using an Adaptive K-means algorithm (Jia L., Liang J., Fabric layout based on Adaptive clustering), Journal of the Franklin institute 354(13), (2017)5694-jF of (A)jClustering the stable values, if the categories generated by the self-adaptive clustering algorithm are numbered in sequence according to positive integers from 1 and the ith valueFA stable value s(j,k)(iF) The number of the category is marked as Ls(iF) Then the numbers define a set Ls. If the minimum feature number of the preset parameter is definedThe class k lattice texture is based on fjCharacteristic vector of (i)FStability of each elementThe definition is as follows.
Where delta is the dirac delta function,representing the top n obtained by arranging the categories generated by the self-adaptive clustering algorithm according to the descending order of the number of elements contained in the categoriesfA set of numbers for each category. Will be provided withBy index iFThe ascending order is arranged to obtain the k-th class of lattice texture based on fjStability vector ofThe above is repeated for all fixed combinations of indices k and jAnd (4) calculating. Step 3.2.3 the algorithm flow is detailed in fig. 23.
And 3.2.4, calculating an ideal statistical value. For training sample set I1,I2…INTo (1) aClass-k lattice texture, which can be calculated according to step 3.2.3 based onStability vector ofVector vectoring through adaptive clustering algorithmClustering is carried out, if the categories generated by the adaptive clustering algorithm are numbered in sequence according to positive integers from 1, and the number isAn individual vectorThe number of the category to which it belongs is notedThen these number definition setsIn practical situations, it may happenClose situation, thus defining parametersIf U is(j,k)>nKThen clustering is performed again, the method nKValue of nK5. For the firstClass k, class k texture based on fjIdeal statistical value ofThe definition is as follows.
Representing patterns belonging to class k based on fjI th of (1)uAverage value of mean values in feature statistics of individual sub-class lattice textures. The above is repeated for all fixed combinations of indices k and jAnd (4) calculating. Step 3.2.4 the algorithm flow is detailed in figure 24.
Step 3.3 calculates the ideal statistical threshold for each feature, as shown in detail in fig. 9. For training sample set I1,I2…INAccording to step 3.2.4, the firstThe graph-like texture is based onI th of (1)u(1≤iu≤U(j,k)) Ideal statistical value of individual subclass lattice textureFor any lattice L generated from the lattice segmentation for any training sample, the computation may be based on fjCharacteristic vector f ofj(L) and the Euclidean distance between the (L) and all ideal statistical values, and finding out the index k of the ideal statistical value corresponding to the minimum distance*Andthe definition is as follows.
Thus, the texture is based on f for class k latticesjI th of (1)uIdeal statistical value of individual subclass lattice textureThere may be multiple bins and bin related k*Andandindexes k and i ofuThe same, these grids form a setWhen in useWhen it is established, it can be calculatedFeature vector of middle graph andmaximum distance ofSeparation deviceThe definition is as follows.
For indices j, k, and iuAll fixed combinations of (1), repeating the aboveAnd (4) calculating.I.e. the ideal statistical threshold, the calculation process is shown in fig. 9. In fig. 9, the left side is the gray level image of the textile with the completed grid segmentation, the image comprises 2 types of grid textures, and for any grid in the imageAccording to f1,f2…f|T|Calculate | T | eigenvectors of the latticeFor the jth feature vectorCalculating k*Andthe result is represented by an image containing gray patches at corresponding grid positions, where the dark gray patches represent small distances and the numbers on each patch are k in order from left to right*Andfor theCorresponding indexk and iuDelete the correspondingStep 3.3 the algorithm flow is detailed in figure 25.
(2) Testing phase
And on the basis of the parameters obtained in the training stage, a test stage is used for carrying out flaw detection and positioning on one image in the test sample set. The test phase comprises two steps: step 4 test sample grid segmentation and step 5 flaw identification.
Step 4, testing sample grid segmentation. Repeating the calculations of steps 2.1 to 2.3 for a given test sample, with the difference that the training samples involved in the calculation are replaced by test samples, resulting in the row segmentation locations of the test samplesAnd column division positionAnd according toAndthe test sample is divided into grids. The step 4 algorithm flow is shown in detail in fig. 26.
And 5, identifying the defects, wherein the process is shown in the attached figure 10. For a given textile grey scale image I, the grid of I is generated by step 4, for any grid in IAccording to the feature extraction method f1,f2…f|T|ComputingOf | T | feature vectorsFor the base based onFeature vector ofCalculate the ideal statistic index k defined in step 3.3*Andand comparing the eigenvalue distancesAndsize of (1), ifThenOtherwise, the mark is flawed, otherwise, the mark is flawless.
When all the grids are based on fjIs marked end, each defective cell L is checkedl8 limb areaMarking of interior panes, if there are any, of absenceThen compareAnd a dynamic threshold value dlSize of (1), ifThenMark as defective and orderAnd d is calculated as followsl+1Continuing to checkMarking the inner graph and repeating the steps until the newly calculated dynamic threshold value is
WhereinGamma is more than 0 and less than or equal to 1, the value of the method is that gamma is 0.93,L1representation is based on fjThe resulting frame of the fantasy chart is finalized. When the dynamic threshold isAnd then, the row and column indexes of the pixels contained in all the frames with the blank are the detection results. The step 5 algorithm flow is shown in detail in fig. 27.
The high efficiency experiment of the invention proves that:
the flaw detection effect evaluation of the method of the present invention used 247 images of 24-bit color textiles with a pixel size of 256 × 256, which were provided by the industrial automation laboratory of the electrical and electronic engineering systems of hong kong university, and these images were converted into 8-bit grayscale images in the experiment. These images include three patterns: dot images, box images and star images, wherein the dot images include 30 non-defective and 30 defective images; the box-shaped image includes 30 framesNo defect and 26 defective images; the star images included 25 non-defective and 25 defective images. The defective images of the three patterns all included 5 types of defects: broken ends (hooks end), holes (hole), webbing (net), thick stripes (thick bar) and thin stripes (thin bar), the specific number of each defect type is detailed in the first column of tables 1 to 3, wherein the dot image further includes 1 type of defect line segments (Knots). All the defect images have a defect reference map (ground-route image) of the same size, and the defect reference map is a 2-value image, where 1 represents a defect and 0 represents a background. Algorithms for comparison include WGIS, BB, RB and ER, the parameter settings of which are the same as in the literature (Jia L., Liang J., textile impact based on the detected information segmentation, Journal of the Franklin Institute 354(13), (2017) 5694-. The method of the invention is based on the parameter selection of the data set as follows: minimum number of features nfClass number limit n of 8KThe threshold coefficient γ is 0.93, T { "IRM", "HOG", "GLCM", "Gabor" }.
The indices used for evaluation include True Positive (TP), False Positive (FPR), True Positive Rate (TPR), False Positive Rate (FPR), Positive Predictive Value (PPV), and Negative Predictive Value (NPV). TPR measures the proportion of pixels which represent flaws in the flaw reference image and are correctly calibrated as flaws by the algorithm, FPR measures the proportion of pixels which represent background in the flaw reference image and are wrongly calibrated as flaws by the algorithm, PPV measures the proportion of flaws in the flaw reference image in the flaws output by the algorithm, and NPV measures the proportion of background in the flaw reference image in the background output by the algorithm. For TPR, PPV and NPV, the index value is larger as better, and for FPR, the smaller as better. Relevant mathematical definitions can be found in the literature (M.K.Ng, H.Y.T.Ngan, X.Yuan, et al, Patterned fibrous analysis and visualization by the method of imaging composition, IEEETranss.Autom.Sci.Eng.11 (3) (2014) 943-. The method of the present invention, index calculation method of WGIS, BB, RB and ER, is the same as that of the literature (Jia L., Liang J., textile impact based on immunological analysis, Journal of the Franklin Institute 354(13), (2017) 5694-5738). The experimental hardware platform is a notebook computer with processors of Intel CoreTMi7-3610QM230-GHz and 8.00GB memory, and the software is Windows 10 and Maltabb 8.4.
Table 1 lists the defect detection results of the dot pattern image, wherein the index value of each row for marking the defect type is the index average value of the calculation results of the corresponding method for all the test samples of the defect type. According to the summary column in Table 1, both the inventive method and RB have the highest ACC (0.96), but the TPR (0.70) is higher than RB (0.44) for the inventive method, and the FPR for both methods is 0.01. The global TPR and FPR for BB are highest and the global FPR for WGIS is also higher. Since high FPR is derived from false positive pixels (i.e., pixels that do not represent a defect are mistakenly identified as pixels representing a defect), there are many false positive pixels for BB and WGIS. The TPR (0.72) of the knots, webbing and holes of the inventive method is close to the optimum value (0.84) in table 1 for the different defect types. Compared with BB, the broken end, group stripe and fine stripe TPR of the method are lower, but the TPR is higher than that except BB, and the FPR is lower. In conclusion, the method of the present invention has an optimal ACC and a better TPR, while its FPR is very close to the optimal value.
TABLE 1 Point image Defect detection results
Table 2 lists the box image defect detection results, wherein the index value of each row for marking the defect type is the index average value of the calculation results of the corresponding method for all test samples of the defect type. According to summary of Table 2, the global ACC (0.98) of the method of the present invention is very close to the optimum (0.99) and has the highest global TPR (0.76), which is much higher than the second highest global TPR (0.54) of WGIS, but the global FPR of WGIS is high. The TPR of the method of the present invention is optimized for each defect type except for coarse streaks. For coarse streaks, the TPR of the process of the invention is also optimal in processes where the FPR is lower than the WGIS. In particular, the hole TPR (0.85) and the textured TPR (0.65) of the method of the present invention are much higher than the sub-optimal hole TPR (0.10) and textured TPR (0.31). In conclusion, the method of the invention achieves the global optimal TPR and the suboptimal global ACC, the global FPR of the method is very close to the optimal value, and meanwhile, the method of the invention is particularly suitable for detecting the defects of holes and reticulate patterns of box-shaped images.
TABLE 2 Box image Defect detection results
Table 3 lists the star image defect detection results, wherein the index value of each row marked with the defect type is the index average of the results of all test samples of the defect type calculated by the corresponding method. According to the summary of Table 3, the global ACC, TPR, PPV and NPV of the method of the present invention are all optimized, and the global FPR (0.01) is close to the optimal value (0.0). The global TPR (0.95) of the method of the present invention is much higher than the sub-optimal value (0.43), and accordingly, except for the coarse stripes, the various types of defective TPR of the method of the present invention are almost 2 times the corresponding sub-optimal value. In addition to the texture and the macrofringe, the present method FPR is optimal for each type of defect FPR, while both the texture and the macrofringe FPR are 0.01, which is very close to the optimal value (0). Based on the optimal value and the suboptimal value FPR of each type of TPR in the method, each type of ACC is optimal. In summary, the method of the present invention has overwhelmingly optimal ACC and TPR for all flaw types, while FPR is very close to the sub-optimal value, compared to other methods. Therefore, the method of the invention is particularly suitable for any type of defect in the star images.
TABLE 3 Star image Defect detection results
In light of the foregoing description of preferred embodiments in accordance with the invention, it is to be understood that numerous changes and modifications may be made by those skilled in the art without departing from the scope of the invention. The technical scope of the present invention is not limited to the contents of the specification, and must be determined according to the scope of the claims.

Claims (6)

1. A textile flaw detection method based on peak coverage values and mixed characteristics is characterized by comprising the following steps: the method comprises a training stage and a testing stage; in the training stage, parameters required by picture segmentation are calculated according to a series of flawless textile gray level images (hereinafter referred to as flawless images), and then the picture segmentation is carried out on the flawless images and the parameters required by flaw identification in the testing stage are calculated; a testing stage, namely performing graph division on a set of textile image according to the parameters obtained in the training stage, judging whether the graph contains flaws or not, and finally marking the graph containing the flaws;
the training phase comprises the steps of:
step 1: calculating parameters required by the grid segmentation according to the series of blank images so as to determine the ideal size of the grid;
step 2: carrying out lattice segmentation on the training sample set according to the ideal size of the lattice obtained in the step 1 to obtain a training sample lattice;
and step 3: calculating the feature vectors of the training sample lattices generated by the lattice segmentation in the step 2 by adopting a feature extraction method, thereby calculating the lattice period of the defect images in the training sample set, ideal statistical values of all the features of the lattices and ideal statistical value thresholds;
the testing phase comprises the following steps:
and 4, step 4: carrying out pattern segmentation on a given test sample according to the method in the step 2 to obtain a test sample pattern;
and 5: and (4) calculating the feature vector, the chart period, the ideal statistical value and the ideal statistical value threshold of each feature of the chart of the test sample according to the method in the step (3), and comparing the calculation result with the ideal statistical value threshold to identify the defective chart.
2. The method of claim 1 for textile defect detection based on peak coverage and blend features, wherein: the step 1 specifically comprises the following steps:
step 1.1: background pixel projection, calculating cartoon components of a gray level image I of a textile according to an RTV model, binarizing the cartoon components by using a Bradley method, denoising the binarized cartoon components by morphological corrosion and expansion operation, and obtaining the binarized I by using a Moore-Neighbor tracking algorithmcCalculating the area of the binary object in the binary cartoon component, and deleting the area not in the interval ((1- α) · m)a,(1+α)·ma) Binary object of (where maIs a binary object area median value,and 0 < α < 1) to obtain twoValued textile image Itc(ii) a Calculation of ItcThe background pixel number of each line is arranged according to the ascending order of the line index to obtain the background pixel line projectionArranging the background pixel number of each column in ascending order according to the column index to obtain the background pixel row projection
Step 1.2: calculating the peak value coverage value, calculating the background pixel row projection of the textile gray level image IThe peak value is projected on the background pixel line according to the peak valueThe indexes in the sequence are arranged in an ascending order to obtain a peak value sequenceFor prTo middlePeak valueCalculated according to the following formulaCoverage value of
Projected with background pixel rowsCoverage value ofThe calculation method is the same, the items of the lower corner marks r in the formula are replaced by the corresponding items with the lower corner marks c, and the calculation is carried outPeak sequence ofComputingWhereinCalculating prOrdered set of medium peak coverage valuesThe medium elements are arranged in descending order according to size; for theTo (1)An element Satisfy in a sequence of peaksIs/are as followsThe ordered set is called the firstPeak value of stageFirst, theThe elements in the level peak are as followsThe indexes in (1) are arranged in an ascending order; for the firstThe peak value of each stage is calculated in the range of the previous peak valueThe median of the absolute values is calculatedAnd the number of occurrences thereof Composition setComposition setMiddle element value groupSimilarly, according toAnd pcComputing satisfactionIs/are as followsOrdered set ofLevel peak value'Calculate the firstFront and back elements in the level peakThe absolute value of the difference between the indexes in (1) and the median value thereofAnd number of occurrences of median value Form a multiple setForm a multiple setMiddle element value group
Step 1.3: calculating the ideal size of the grid, I for the training sample set1,I2…INThe ith ofTraining sample IiCalculating I according to step 1.2iIs/are as followsprpcAnd computingValue setIiIdeal number of lines ofIs defined by the formula:
where δ is the Dirac delta function (Dirac delta function),Iiideal number of columns ofCalculation andsimilarly, it is sufficient to replace the term with the subscript r in the above formula with the corresponding term with the subscript c, for exampleIs replaced byThe ideal size of the grid is defined asMedian ofAndmedian of
3. The method of claim 2, wherein the step of detecting textile defects comprises: the step 2 specifically comprises the following steps:
step 2.1: background pixel projection, wherein the calculation process comprises a step 1.1 and a step 1.2;
step 2.2: calculating an initial segmentation position for the ith training sample IiCalculated according to step 2.1Andcalculating what is defined in step 1.2Andandandcalculated according to step 1.3Andcalculated by the following formulaThe most frequently occurringPeak value of stage
In the same way, can calculateThe most frequently occurringThe level peak value, namely replacing the item with the lower corner mark r in the above formula with the corresponding item with the lower corner mark c;
step 2.3: calculating the final segmentation position, i.e. the line segmentation positionAnd column division positionFor the ith training sample IiAndare respectively the I calculated in step 2.2iLine initial dividing position SrAnd column initial division position Sc(ii) a Will be provided withThe elements in (1) are arranged in ascending order of size, and the minimum element in the elements is foundAnd maximum elementFour predicted positions are calculated as followsAnd
according toAndrespectively include row and column indices, IiAnd dividing the rectangular area into a grid according to the rows and the columns of the indexes, wherein the rectangular area obtained by the division is defined as the following:
<mrow> <msub> <mi>L</mi> <mrow> <msub> <mi>i</mi> <mi>r</mi> </msub> <mo>,</mo> <msub> <mi>i</mi> <mi>c</mi> </msub> </mrow> </msub> <mo>=</mo> <mo>{</mo> <mi>I</mi> <mrow> <mo>(</mo> <mi>x</mi> <mo>,</mo> <mi>y</mi> <mo>)</mo> </mrow> <mo>|</mo> <msubsup> <mi>S</mi> <msub> <mi>i</mi> <mi>r</mi> </msub> <mrow> <mo>(</mo> <mi>r</mi> <mo>)</mo> </mrow> </msubsup> <mo>&lt;</mo> <mi>x</mi> <mo>&lt;</mo> <msubsup> <mi>S</mi> <mrow> <msub> <mi>i</mi> <mi>r</mi> </msub> <mo>+</mo> <mn>1</mn> </mrow> <mrow> <mo>(</mo> <mi>r</mi> <mo>)</mo> </mrow> </msubsup> <mo>,</mo> <msubsup> <mi>S</mi> <msub> <mi>i</mi> <mi>c</mi> </msub> <mrow> <mo>(</mo> <mi>c</mi> <mo>)</mo> </mrow> </msubsup> <mo>&lt;</mo> <mi>y</mi> <mo>&lt;</mo> <msubsup> <mi>S</mi> <mrow> <msub> <mi>i</mi> <mi>c</mi> </msub> <mo>+</mo> <mn>1</mn> </mrow> <mrow> <mo>(</mo> <mi>c</mi> <mo>)</mo> </mrow> </msubsup> <mo>,</mo> <mo>}</mo> </mrow>
wherein,and an index indicating the position of the grid arranged in I.
4. The method of claim 3 for textile defect detection based on peak coverage and blend features, wherein: step 3, calculating the parameters of the test stage specifically comprises the following steps:
step 3.1 calculate the grid period for training sample set I1,I2…INTo (1)A training sample IiAccording to step 1 and step 2, the method can obtainAndaccording toAndmixing O withiDivided into m × n grids Calculation of I Using the HOG feature extraction methodiDrawing gridAnd making the index of the feature vector the same as the index of the corresponding picture lattice; calculation of IiRow distance matrix ofSum column distance matrixFor vectorPerforming Fourier transform to obtainThe period and frequency spectrum of (c); according to(And) Calculating a period median value and a spectrum median value, namely an image line period and an image line spectrum; similarly, I can be constructediColumn distance matrix ofCalculating an image column period and an image column frequency spectrum; according to I1,I2…INN image line periods and corresponding N can be calculatedCalculating the median of the image line spectrumFind out higher thanThe image line periods corresponding to the image line frequency spectrum of (2), and calculating the median of the image line periodsRepeating the same steps for the image column period and the image column frequency spectrum to obtain the median value of the image column frequency spectrumAnd median of image column periodIf it isOrOrThen t is taken to be 1, otherwise by comparisonAndthe value of t is determined by the corresponding frequency spectrum size, namely: if it isThen t is takenOtherwise t gets
Step 3.2, calculating ideal statistical values of all the characteristics of the chart; first, segment I according to step 2iGet the chart gridAnd step 3.1 computing a training sample set I1,I2…INThe grid period T of (a) is a feature extraction method f that inputs a two-dimensional grayscale image matrix through | T | pieces (T is an ordered set of feature extraction method names) and outputs a one-dimensional real vector1,f2…f|T|Calculation of IiDrawing gridFeature vector ofThen calculate the k-th class of lattice based on fjI of (A)iCharacteristic statistics of And
<mrow> <msubsup> <mi>r</mi> <mrow> <mi>o</mi> <mi>p</mi> <mi>t</mi> </mrow> <mrow> <mo>(</mo> <mi>i</mi> <mo>,</mo> <mi>j</mi> <mo>,</mo> <mi>k</mi> <mo>)</mo> </mrow> </msubsup> <mo>=</mo> <mfrac> <mn>1</mn> <mi>t</mi> </mfrac> <munder> <mo>&amp;Sigma;</mo> <mrow> <mn>1</mn> <mo>&amp;le;</mo> <msub> <mi>i</mi> <mi>t</mi> </msub> <mo>&amp;le;</mo> <mi>t</mi> </mrow> </munder> <mfenced open = "[" close = "]"> <mtable> <mtr> <mtd> <mrow> <mi>o</mi> <mi>p</mi> <mi>t</mi> <mrow> <mo>(</mo> <msub> <mrow> <mo>{</mo> <msub> <mi>f</mi> <mrow> <mi>j</mi> <mo>,</mo> <mn>1</mn> </mrow> </msub> <mrow> <mo>(</mo> <mi>L</mi> <mo>)</mo> </mrow> <mo>}</mo> </mrow> <mrow> <mi>L</mi> <mo>&amp;Element;</mo> <msub> <mi>C</mi> <msub> <mi>i</mi> <mi>t</mi> </msub> </msub> </mrow> </msub> <mo>)</mo> </mrow> </mrow> </mtd> </mtr> <mtr> <mtd> <mrow> <mi>o</mi> <mi>p</mi> <mi>t</mi> <mrow> <mo>(</mo> <msub> <mrow> <mo>{</mo> <msub> <mi>f</mi> <mrow> <mi>j</mi> <mo>,</mo> <mn>2</mn> </mrow> </msub> <mrow> <mo>(</mo> <mi>L</mi> <mo>)</mo> </mrow> <mo>}</mo> </mrow> <mrow> <mi>L</mi> <mo>&amp;Element;</mo> <msub> <mi>C</mi> <msub> <mi>i</mi> <mi>t</mi> </msub> </msub> </mrow> </msub> <mo>)</mo> </mrow> </mrow> </mtd> </mtr> <mtr> <mtd> <mtable> <mtr> <mtd> <mo>.</mo> </mtd> </mtr> <mtr> <mtd> <mo>.</mo> </mtd> </mtr> <mtr> <mtd> <mo>.</mo> </mtd> </mtr> </mtable> </mtd> </mtr> <mtr> <mtd> <mrow> <mi>o</mi> <mi>p</mi> <mi>t</mi> <mrow> <mo>(</mo> <msub> <mrow> <mo>{</mo> <msub> <mi>f</mi> <mrow> <mi>j</mi> <mo>,</mo> <msub> <mi>F</mi> <mi>j</mi> </msub> </mrow> </msub> <mrow> <mo>(</mo> <mi>L</mi> <mo>)</mo> </mrow> <mo>}</mo> </mrow> <mrow> <mi>L</mi> <mo>&amp;Element;</mo> <msub> <mi>C</mi> <msub> <mi>i</mi> <mi>t</mi> </msub> </msub> </mrow> </msub> <mo>)</mo> </mrow> </mrow> </mtd> </mtr> </mtable> </mfenced> </mrow>
whereinIndicating that the cell L is the ithtMatrix of individual gridsAny of the elements of (a) or (b),representation is based on fjIs arranged in the grid matrixIth in the feature vector of all elements (grids)FMultiple sets of elements (real numbers), whereinAnd 1 is not less than iF≤FjWhen opt is replaced by mean, std, max, or min, thenDefine the correspondingAnd
then, ordering the calculated feature statistics, and applying K-means algorithm (hereinafter referred to as clustering algorithm) to NPerforming clustering to determine featuresCharacterizing a statistical value; calculating a stable value of the feature vector element according to the feature statistic value, thereby determining a stable feature element; then calculating an ideal statistical value through a self-adaptive clustering algorithm according to the characteristic statistical value and the stable characteristic elements; and then calculating ideal statistic threshold values of all the characteristics according to the characteristic statistic values and the ideal statistic values.
5. The method of claim 4 for textile defect detection based on peak coverage and blend features, wherein: step 4, the test sample grid segmentation specifically comprises the following steps: repeating the calculations of steps 2.1 to 2.3 for a given test sample, with the difference that the training samples involved in the calculation are replaced by test samples, resulting in the row segmentation locations of the test samplesAnd column division positionAnd according toAndthe test sample is divided into grids.
6. The method of claim 5 for textile defect detection based on peak coverage and blend features, wherein: step 5, defect identification specifically comprises the following steps: for arbitrary chart of test sampleAccording to the feature extraction method f1,f2…f|T|Computing feature vectorsFor thefjCalculated feature vectorCalculating the ideal statistic index k according to step 3.2 and step 3.3*And andif it is ThenMarking as defective, otherwise marking as non-defective; when all the grids are based on fjIs marked end, each defective cell L is checkedl8 limb areaMarking of interior panes, if there are any, of absenceThen judge Whether it is true, if so, markingTo have flaws and makeAnd d is calculated as followsl+1Continuing to checkMarking the inner picture grid and repeating the steps until dl+1Is composed of
Wherein the threshold coefficient0<γ≤1,L1Representation is based on fjThe obtained frame with the defect is finished; when the dynamic threshold isAnd then, the row and column indexes of the pixels contained in all the frames with the blank are the detection results.
CN201711188212.7A 2017-11-24 2017-11-24 Textile flaw detection method based on peak value coverage values and composite character Active CN107977961B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711188212.7A CN107977961B (en) 2017-11-24 2017-11-24 Textile flaw detection method based on peak value coverage values and composite character

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711188212.7A CN107977961B (en) 2017-11-24 2017-11-24 Textile flaw detection method based on peak value coverage values and composite character

Publications (2)

Publication Number Publication Date
CN107977961A true CN107977961A (en) 2018-05-01
CN107977961B CN107977961B (en) 2019-10-11

Family

ID=62011308

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711188212.7A Active CN107977961B (en) 2017-11-24 2017-11-24 Textile flaw detection method based on peak value coverage values and composite character

Country Status (1)

Country Link
CN (1) CN107977961B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110738644A (en) * 2019-10-10 2020-01-31 清华大学 automobile coating surface defect detection method and system based on deep learning
CN117523307A (en) * 2023-11-24 2024-02-06 佛山众陶联供应链服务有限公司 Tile sorting method and system based on opc and tile surface flaw identification model

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419706A (en) * 2008-12-11 2009-04-29 天津工业大学 Jersey wear flokkit and balling up grading method based on image analysis
CN101976440A (en) * 2010-11-09 2011-02-16 东华大学 Sobel operator-based extraction method of profile and detail composite characteristic vector used for representing fabric texture
CN102930531A (en) * 2012-09-28 2013-02-13 中国科学院自动化研究所 Detection method for repetition structure of building surface image
CN106770323A (en) * 2016-12-15 2017-05-31 常州大学 Based on the textile flaw detection method that hierarchical clustering and Gabor are filtered
CN107248152A (en) * 2017-05-18 2017-10-13 常州大学 Textile flaw detection method based on class grid pattern and its area features
CN107274385A (en) * 2017-05-18 2017-10-20 常州大学 Textile flaw detection method based on class grid pattern and its Gabor characteristic

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419706A (en) * 2008-12-11 2009-04-29 天津工业大学 Jersey wear flokkit and balling up grading method based on image analysis
CN101976440A (en) * 2010-11-09 2011-02-16 东华大学 Sobel operator-based extraction method of profile and detail composite characteristic vector used for representing fabric texture
CN102930531A (en) * 2012-09-28 2013-02-13 中国科学院自动化研究所 Detection method for repetition structure of building surface image
CN106770323A (en) * 2016-12-15 2017-05-31 常州大学 Based on the textile flaw detection method that hierarchical clustering and Gabor are filtered
CN107248152A (en) * 2017-05-18 2017-10-13 常州大学 Textile flaw detection method based on class grid pattern and its area features
CN107274385A (en) * 2017-05-18 2017-10-20 常州大学 Textile flaw detection method based on class grid pattern and its Gabor characteristic

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110738644A (en) * 2019-10-10 2020-01-31 清华大学 automobile coating surface defect detection method and system based on deep learning
CN117523307A (en) * 2023-11-24 2024-02-06 佛山众陶联供应链服务有限公司 Tile sorting method and system based on opc and tile surface flaw identification model
CN117523307B (en) * 2023-11-24 2024-04-19 佛山众陶联供应链服务有限公司 Tile sorting method and system based on opc and tile surface flaw identification model

Also Published As

Publication number Publication date
CN107977961B (en) 2019-10-11

Similar Documents

Publication Publication Date Title
CN111179225B (en) Test paper surface texture defect detection method based on gray gradient clustering
CN106770323B (en) The textile flaw detection method filtered based on hierarchical clustering and Gabor
CN111161222B (en) Printing roller defect detection method based on visual saliency
CN113781402A (en) Method and device for detecting chip surface scratch defects and computer equipment
CN115082419A (en) Blow-molded luggage production defect detection method
CN107895371B (en) Textile flaw detection method based on peak coverage value and Gabor characteristics
CN111754538B (en) Threshold segmentation method for USB surface defect detection
CN111008649B (en) Defect detection data set preprocessing method based on three decisions
CN111325728B (en) Product defect detection method, device, equipment and storage medium
CN104992454A (en) Regionalized automatic-cluster-change image segmentation method
Fekri-Ershad et al. A robust approach for surface defect detection based on one dimensional local binary patterns
CN115239718B (en) Plastic product defect detection method and system based on image processing
CN107945164B (en) Textile flaw detection method based on peak threshold, rotational alignment and composite character
CN111161213A (en) Industrial product defect image classification method based on knowledge graph
CN116402742A (en) Visual detection method and system for surface defects of automobile sheet metal part
CN107977961B (en) Textile flaw detection method based on peak value coverage values and composite character
CN113689431B (en) Industrial product appearance defect detection method and device
CN114792329B (en) Color image segmentation method and device based on mid-intelligence clustering and superpixel
CN113223098B (en) Preprocessing optimization method for image color classification
CN112200789B (en) Image recognition method and device, electronic equipment and storage medium
CN107967680B (en) Textile flaw detection method based on peak threshold and composite character
CN111768385A (en) Neural network detection method for USB surface defect detection
CN107945165B (en) Textile flaw detection method based on peak value coverage values and areal calculation
Nasiri et al. A new binarization method for high accuracy handwritten digit recognition of slabs in steel companies
CN112070116B (en) Automatic artistic drawing classification system and method based on support vector machine

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