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
map grid
value
msub
calculate
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 value coverage values and composite character
Technical field
It is special based on peak value coverage values and mixing more particularly to one kind the present invention relates to textile Defect Detection technical field The textile flaw detection method of sign.
Background technology
Traditional textile flaw manual identified accuracy rate only has 60-75% (referring to document:K.Srinivasan, P.H.Dastoor,P.Radhakrishnaiah,et al..FDAS:a knowledge-based framework for analysis of defects in woven textiles tructures,J.Text.Inst.83(1992)431– 448.), the method for machine automatic identification textile flaw has practical application request.The digital picture of flat textile surface is adopted Sample (hereinafter referred to as textile images) belongs to 2 d texture, and 2 d texture has been demonstrated can be according to 17 kinds of wallpaper group (wallpaper Group the pattern arrangement method) defined is generated (referring to document:H.Y.T.Ngan,G.K.H.Pang,N.H.C.Yung.Motif- based defect detection for patterned fabric,Pattern Recognit.(2008)1878– 1894.), for generate the pattern of 2 d texture be known as map grid (lattice) (referring to:https://en.wikipedia.org/ Wiki/Wallpaper_group), pattern is known as motif inside map grid.Most textile flaw automatic detection methods can only be located The textile images of p1 types in wallpaper group are managed (referring to document:H.Y.T.Ngan,G.K.H.Pang, N.H.C.Yung.Automated fabric defect detection—Areview,Image and Vision Computing 29 (7) (2011) 442-458.), only a few methods can handle beyond p1 types textile images (referring to Document:H.Y.T.Ngan,G.K.H.Pang,N.H.C.Yung.Motif-based defect detection for Patterned fabric, Pattern Recognit. (2008) 1878-1894.), such as the benchmark based on wavelet pretreatment Image difference method (wavelet-pre-processed golden image subtraction, hereinafter referred to as WGIS) (ginseng See document:H.Y.T.Ngan,G.K.H.Pang,N.H.C.Yung,et al.,Wavelet based methods on Patterned fabric defect detection, Pattern Recognit.38 (4) (2005) 559-576.), symbiosis Matrix method is (referring to document:C.J.Kuo,T.Su,Gray relational analysis for recognizing Fabric defects, Text.Res.J.73 (5) (2003) 461-465.), cloth forest belt method (Bollinger bands, with Lower abbreviation BB) (referring to document:H.Y.T.Ngan,G.K.H.Pang,Novel method for patterned fabric Inspection using bollinger bands, Opt.Eng.45 (8) (2006) 087202-1-087202-15.), rule Band method (regular bands, hereinafter referred to as RB) is (referring to document:H.Y.T.Ngan,G.K.H.Pang,Regularity analysis for patterned texture inspection,IEEE Trans.Autom.Sci.Eng.6(1)(2009) 131-144.), Elo appraisal procedures (Elo rating method, hereinafter referred to as ER) are (referring to document:C.S.C.Tsang, H.Y.T.Ngan,G.K.H.Pang,Fabric inspection based on the Elo rating method, Pattern Recognit.51 (2016) 378-394.) etc..Although these methods can handle the textile images beyond p1, But their computational methods are built upon on the pattern (hereinafter referred to as map grid) of the similar lattice based on artificial selection more.Such as WGIS requires the size and texture of artificial selection map grid, and BB, RB and ER require the size of Manual definition's map grid.These prioris The degree of automation of machine recognition textile flaw is reduced to a certain extent.
The content of the invention
The technical problems to be solved by the invention are:In order to improve the degree of automation of machine recognition textile flaw, this Invention provides a kind of textile flaw detection method based on peak value coverage values and composite character, main a kind of automatic including design Split textile images for the method for map grid and a kind of flaw recognition methods based on map grid and map grid areal calculation of design.
To make statement cheer and bright, existing centralized definition partial symbols according to the present invention and concept.
Represent Positive Integer Set.Expression includes zero integer set.Expression includes zero arithmetic number set.Table Show including zero real number set.Represent that element number isReal vector.Represent plural number set.Represent element Number isComplex vector.T representing matrixes or vectorial transposition.Represent the real matrix of n × m sizes, wherein Represent the real matrix of k × n × m sizes, whereinIfAndThen Ai,:Represent square The i-th row of battle array A, A:,jThe jth row of representing matrix A.
IfAndThen Al,:,:Represent the l layer matrixes that size is n × m in A, Al,i,:Table Show the i-th row of the l layer matrixes that size is n × m in A, Al,:,jRepresent the jth row for the l layer matrixes that size is n × m in A.
Represent ratioSmall maximum integer, such as
{aiRepresent by index i determine by element aiThe set or multiset of composition.
| S | represent the element number in set S, if S is vector, | S | represent element number contained by vector, | S | it is known as Vector length.
Avg (S) or mean (S):The average of set of computations or multiset S, the element of S is real number.
std(S):The standard deviation of set of computations or multiset S, the element of S is real number.
med(S):The median of set of computations or multiset S, the element of S is real number.
mod(S):The mode of multiset S is calculated, the element of S is real number.
Max (S) represents to find out set or the element maximum of multiset S, such as max (Ic) represent IcThe maximum of middle pixel Gray value.
Max (s [condition) represents to find out qualifiedMaximum.
Min (S) represents to find out set or the element minimum value of multiset S, such as min (Ic) represent IcThe minimum of middle pixel Gray value.
arg maxsF (s) is represented in the value range of the domain internal variable s of function f so that function f (s) takes maximum The s of value.
arg minsF (s) is represented in the value range of the domain internal variable s of function f so that function f (s) takes minimum The s of value.
arg maxsf1(s),f2(s) represent in function f1And f2Domain intersection internal variable s value range in so that Function f1(s) and f2(s) s being maximized.
Represent the domain internal variable s in function f (s)1And s2Value range in so that function f (s) s being maximized1And s2
arg modi({ai) represent corresponding multiset { aiMode mod ({ ai) index.
dimx(I) total line number of two-dimensional image I, dim are representedy(I) total columns of I is represented.
Image origin:The position that pixel column column index starts in image, the hypothesis on location are in the image upper left corner and value (1,1)。
I (x, y) represents the pixel value in two-dimensional image I with ranks index (x, y).Line indexIt is former by image Point starts for step-length to be incremented by downwards with 1,1≤x≤dimx(I);Column indexBy image origin with 1 for step-length to the right It is incremented by, 1≤y≤dimy(I)。
Image boundary:With line index dimx(I) row and column index dimy(I) row.
Textile images cartoon component Ic:To the textile images I of a width gray processing, using opposite total variance (relative total variation, hereinafter referred to as RTV) model (Xu L., Yan Q., Xia Y., Jia J., Structure Extraction from Texture via Relative Total Variation,ACM Transactions on Graphics 31 (6) 2012Article 139) edge clear of the generation based on I but texture obscure Gray level image Ic, IcReferred to as textile images cartoon component.
Binaryzation textile images Itc:Use Bradley methods (Bradley D., Roth G., Adaptive Thresholding Using the Integral Image,Journal of Graphics Tools 12(2)2007 13- 21) binaryzation IcAnd the I according to step 1.1 to binaryzationcCarry out noise reduction, the two-value obtained after two value object of suppressing exception area Image, wherein foreground pixel value are 1, background pixel value 0.
Two value object barycenter:ItcIn two value objects include foreground pixel image line index average value and column index it is flat Average.
Represent to be linked in sequence by operand and produce vector, such as scalar v1=1 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,
Represent by element vector multiplication, such as vector v1=[5 0.9 4]T, v2=[1 0 1]T, then
Wherein a,
Map grid indexes (ir,ic):After image is divided into nonoverlapping map grid, according to the arrangement position of map grid in the picture, Each map grid has unique map grid line index irWith unique map grid column index ic, in image upper left corner map grid index for (1, 1) it is, (1,2) close to the right side map grid index of the map grid, is (2,1) close to the downside map grid index that index is (1,1) map grid, The rest may be inferred.Represent that map grid index is (ir,ic) map grid, wherein L1,1Referred to as first map grid.
Map grid pixel index:Map grid is made of pixel, therefore map grid is a sub-picture, image origin and pixel column column index Definition be also applied for map grid pixel index.
Map grid size:Number of lines of pixels contained by map grid and columns.
Map grid texture species:The species of map grid texture is produced based on map grid segmentation and textile gray level image, as occupied in Fig. 6 In image according to map grid segmentation generate 5 × 7 map grids, according to the texture of map grid, 35 map grids can be divided into 3 classes.
Map grid matrix:Each element is a map grid in matrix in units of map grid, i.e. matrix.As every in Fig. 7 A image includes 2 × 2 map grid, and map grid matrix one 2 × 2 corresponding, i.e., element index is identical with map grid index in matrix.
Eigenmatrix:Using feature extracting method calculate map grid matrix in each element feature vector, with feature to Measure and form matrix for unit, i.e., each element is the feature vector of a map grid in matrix, and element index is right with it in matrix Index of the map grid answered in map grid matrix is identical.
Training sample set:N sub-pictures I1,I2…INResolution ratio it is identical, all images according to map grid segmentation produce map grid Texture species and its quantity are all identical, if map grid texture species number isAnd without considering shadows such as shape distortion and illumination variations Under the factor for ringing image sampling, the i-th sub-picture IiIn map gridWithWithTexture it is identical And L1,1, L2,1…Lt,1Texture differ, whereinSuch as four sub-picture I shown in attached drawing 71, I2, I3And I4Root Split according to map grid, each image produces 4 map grids, and the map grid of four sub-pictures only has 2 kinds of texture types, and arrangement mode is satisfied by Above-mentioned condition.IiReferred to as training sample.Training sample is has no time image, and training sample set is only comprising image of having no time, and figure of having no time As being also only present in training sample concentration.
Test sample collection:Similar with training sample set, all image resolution ratios are identical, and the figure produced according to map grid segmentation Check manages species and its quantity is all identical, arrangement mode and the training sample set of each image map grid define described in it is consistent, Unlike training sample set, the image that test sample is concentrated contains position at random and texture is not belonging to map grid texture species Irregular area, the region are defined as flaw.The image that test sample is concentrated is known as test sample, and test sample is to have free time figure Picture, what test sample concentration included is all to have free time image.
Feature extracting method title ordered set T:Represent feature extracting method f1, f2…f|T|Name set, such as T= { HOG, LBP }, then | T |=2 and f1Represent HOG methods, f2Represent LBP methods.
On the basis of being as defined above, the technical solution adopted by the present invention to solve the technical problems is:One kind is based on peak It is worth the textile flaw detection method of coverage values and composite character, including two stages:Training stage and test phase.Training rank Section is according to a series of indefectible textile images (image of hereinafter referred to as having no time) segmentation map grids and parameter needed for calculating flaw identification; Test phase carries out map grid segmentation to a secondary textile images according to the parameter that the training stage obtains and judges whether map grid includes Flaw, finally marks and contains map grid defective.
Training stage includes three steps:Step 1 map grid partitioning parameters calculate, the segmentation of step 2 training sample map grid, step 3 calculate test phase parameter.Test phase includes two steps:Step 4 test sample map grid is split, the identification of step 5 flaw.Two The main-process stream in a stage is as shown in Figure 1.Inventive method assumes that textile images have following features:Relative to textile images Row and column, map grid is transversely arranged according to the direction of image line, and by row direction longitudinal arrangement;In IcIn, part map grid has Geometry and there were significant differences in gray scale with background pixel.
Step 1 calculates map grid partitioning parameters.The step includes three sub-steps, i.e. step 1.1 background pixel projects, step 1.2 calculate peak value coverage values and step 1.3 calculating map grid ideal dimensions.
Step 1.1 calculates the cartoon component of textile gray level image I according to RTV models, using Bradley method binaryzations Cartoon component, by morphological erosion and expansive working to binaryzation cartoon component noise reduction, tracks using Moore-Neighbor Algorithm obtains binaryzation IcIn two value objects, calculate two-value object area in binaryzation cartoon component, delete area Bu areas Between ((1- α) ma,(1+α)·ma) in two value object (wherein maFor two-value object area median,And 0 < α < 1) binaryzation textile images I is obtainedtc.Calculate ItcMiddle each row and column background pixel number, often row background is arranged by line index ascending order Pixel number obtains the projection of background pixel rowThe projection of background pixel row is obtained by column index ascending order arrangement each column background pixel number
Step 1.2 calculates peak value coverage values.Calculate the projection of textile gray level image I background pixels rowPeak value, by peak value By itsIn index ascending order arrange to obtain peak value sequenceFor prInIt is a Peak valueCalculate according to the following formulaCoverage values
Similarly, calculatePeak value sequenceCalculateWhereinCalculate pr The ordered set of middle peak value coverage valuesDescending arranges middle element by size;ForInA element Meet in peak value sequence'sOrdered set is known asLevel peak valueTheLevel Element in peak value by itsIn index ascending order arrangement;ForLevel peak value, calculates each peak value and exists with its previous peak valueIn index difference absolute value, calculate the medians of these absolute valuesAnd its occurrence number Composition setComposition setMiddle element value composition setSimilarly, according toWithCalculate full Foot'sOrdered set " theLevel peak value " Calculate theBefore in level peak value Element exists afterwardsIn index difference absolute value and its medianWith median occurrence number Form multisetForm multisetMiddle element value composition set
Step 1.3 calculates map grid ideal dimensions.To the I of training sample set1,I2…INIn i-th Training sample Ii, I is calculated according to step 1.2i'spr,pc,With CalculateValue setIiPreferable line numberIt is defined by the formula.
Wherein, δ is Dirac delta function (Dirac delta function).I.e. m isIn an element, Ii Preferable columnsCalculate withIt is similar, i.e., the item with subscript r in above formula is replaced with into the respective items with subscript c , such asReplace withMap grid ideal dimensions are defined asMedianWith Median
I of the step 2 to training sample set1,I2…INCarry out map grid segmentation.For i-th of training sample Ii, the step bag Include three sub-steps:Step 2.1 background pixel projects, and step 2.2 calculates initial segmentation position and step 2.3 calculates final segmentation Position.
The calculating process of step 2.1 includes step 1.1 and step 1.2.
Step 2.2 calculates initial segmentation position.For i-th of training sample Ii, it is calculated according to step 2.1WithDefined in calculation procedure 1.2WithAndWithAccording to step 1.3 are calculatedWithIt is calculated as followsThere is most frequentLevel peak value
Similarly, can calculateThere is most frequentLevel peak value, i.e., replace with the item for having subscript r in above formula Respective items with subscript c, such asReplace withAssuming that theThere are a string of continuous peak values in level peak value And each peak value exists with previous peak valueIn the difference absolute value of index approachThen this string peak value existsIn index be defined as Row initial segmentation position Sr, this string peak value is theIndex in level peak value meets following formula definition.
Wherein dj+kRepresent theLevel peak value in index for j+k and j+k-1 two peak values itsThe difference of middle index it is exhausted To being worth,And 0 < β < 1 be parameter.Row initial segmentation position ScIt is relevantWithDefinition withWithIt is similar, will Item with subscript r in above formula replaces with the respective items with subscript c, such asReplace withAnd And dj+kIs represented at this timeLevel peak value in index for j+k and j+k-1 two peak values itsThe absolute value of the difference of middle index. Parameter beta pairWithCalculating it is general.
Step 2.3 calculates final split position, at once split positionWith column split positionFor i-th of training sample Ii,WithInitial value be respectively step 2.2 calculate IiRow initial segmentation position SrWith row initial segmentation position Sc.Will In element by size ascending order arrange, find out least member thereinAnd greatest memberFour prediction bits are calculated as follows PutWith
I is obtained by step 1.1iBinaryzation textile imagesAnd updated by following three kinds of situationsWith
The first situation:IfCalculateMiddle line index x meetsTwo-value pair As the average value of barycenterAndMiddle line index x meetsTwo value object barycenter average valueThenIt is added toNew element and becomeRecalculated according to definitionWith
The second situation:IfCalculateMiddle line index x meetsTwo-value pair As the average value of barycenterThenIt is added toNew element and becomeRecalculated according to definition
The third situation:IfThen terminate and calculate.
Repeat the calculating of above-mentioned three kinds of situations untilWithUntill no longer changing.Similarly, by following Three kinds of situation renewals With
The first situation:IfCalculateMiddle line index x meets Two value object barycenter average valueAndMiddle line index x meetsTwo value object barycenter Average valueThenIt is added toNew element and becomeRecalculated according to definition With
The second situation:IfCalculateMiddle line index x meets Two value object barycenter average valueThenIt is added toNew element and becomeRecalculated according to definition
The third situation:IfThen terminate and calculate.
Repeat the calculating of above-mentioned three kinds of situations untilWithUntill no longer changing, at this timeCalculating Terminate.Calculating it is similarWillIn element by size ascending order arrange, find out least member thereinAnd greastest element ElementAccording toWithUpdate the three kinds of situations renewal being related toWithI.e. will be every in three kinds of situations Superscript r replaces with c, such asReplace withThe x in inequality and formula is replaced with into y at the same time, such asReplace withAccording toWithUpdate the three kinds of situations renewal being related toWithI.e. will be each in three kinds of situations The superscript r of item replaces with c, such asReplace withThe x in inequality and formula is replaced with into y at the same time, such as Replace withAccording toWithThe row and column index included respectively, by IiSplit by the row and column where these indexes, The rectangular area of segmentation gained is map grid, it is defined as follows.
WhereinWith Represent the index of map grid arrangement position in I.
Step 3 calculates test phase parameter.The step includes three sub-steps, i.e. step 3.1 calculates map grid cycle, step The preferable statistical value and step 3.3 of 3.2 calculating each features of map grid calculate the preferable statistical value threshold value of each feature.
Step 3.1 calculates the map grid cycle.For training sample set I1,I2…INInA training sample Ii, It is available according to step 1 and step 2WithAccording toWithBy IiIt is divided into m × n map grid I is calculated using HOG feature extracting methodsiMap gridFeature vector and feature vector is indexed corresponding map grid index phase Together.CalculateWith i-thrThe Euclidean distance of all map grids in row, the column index ascending order arrangement of map grid as involved by calculating, then can structure Into distance vector.ForWillCorresponding distance vector presses icAscending order arranges to obtain i-thrCapable n × n distance matrixs.ForBy i-thrCorresponding n × n the distance matrixs of row press irAscending order arranges to obtain IiRow distance matrixSimilarly, I can be calculatediColumn distance matrixTo vector Carry out Fourier transform, obtainsCycle and frequency spectrum.According to(With) cycle and frequency spectrum, calculating cycle median With frequency spectrum median, i.e. image line cycle and image line frequency spectrum.Similarly, I can be builtiColumn distance matrixAnd calculate image column cycle and image column frequency spectrum.According to I1,I2…IN, N number of image line cycle and right can be calculated The N number of image line frequency spectrum answered, calculates image line frequency spectrum medianFind out and be higher thanImage line frequency spectrum corresponding to image line In the cycle, calculate the median in these image lines cycleSame steps are repeated to image column cycle and image column frequency spectrum and obtain image Row frequency spectrum medianWith image column cycle medianIfOrOrThen t values are 1, otherwise Pass through and compareWithCorresponding frequency spectrum size determines the value of t, i.e.,:IfThen t takesOtherwise t takes
Step 3.2 calculates the preferable statistical value of each feature of map grid.The step includes four sub-steps:Step 3.2.1 is calculated Characteristic statistics value, step 3.2.2 calculate the sequence of characteristic statistics value, and step 3.2.3 calculates invariant feature element, step 3.2.4 meters Calculate preferable statistical value.
Step 3.2.1 calculates characteristic statistics value, and training sample set I is calculated according to step 3.11,I2…INMap grid cycle t. For i-th of training sample Ii, I is split according to step 2iObtain map gridPass through | T | it is a that (T is characterized extracting method title Ordered set) input is 2-D gray image matrix and output is one-dimensional real vectorial feature extracting method f1, f2…f|T|Calculate IiMap gridFeature vectorBased on fjFeature vector length be defined as fjSpy The first prime number F of signj.According to assumed condition and map grid cycle t, IiIn map gridWith WithLine Manage identical and L1,1, L2,1…Lt,1Texture differ, wherein l1,Therefore there are the different map grid of t class textures and TheClass map grid is i-thrRow and (ir+l1T) column index of row is identical, thus column index it is identical the K classes map grid can be indexed ascending order composition map grid matrix by ranks.For kth class map grid, at most there are t map grid Matrix C1,C2… Ct, according to the map grid of composition map grid matrix, kth class map grid is calculated by following formula and is based on fjIiCharacteristic statistics valueWith
WhereinRepresent that map grid L is i-thtA map grid matrixArbitrary element,Represent Based on fjMap grid matrixI-th in the feature vector of middle all elements (map grid)FThe multiset of a element (real number), whereinAnd 1≤iF≤Fj, when opt is replaced with mean, std, max or min, thenDefinition is correspondingWith
Step 3.2.2 calculates the sequence of characteristic statistics value.Calculate training sample I1,I2…INBetween be based on fj'sEurope Formula distance average d (j), it is defined as follows.
For f1, f2…f|T|, it can obtain corresponding d (1), d (2) ... d (| T |).It is special for kth class map grid texture and j-th Levy extracting method fj(i.e. fixed indices k and j), according to I1,I2…IN, step 3.2.1 can produce N number ofUsing K-means Algorithm (hereinafter referred to as clustering algorithm) is to N number ofClustered, clustering algorithm classification parameter is set to t, obtains t class centerForCalculate according to the following formula fromClass label u corresponding to nearest class center*
IfWhereinRepresent have in the classification that t clustering algorithm produces in the classification of most element numbers The heart, then exchange characteristic statistics value determined by index (i, j, k) and index (i, j, k*) determined by characteristic statistics value, wherein k* It is defined as follows.
All fixed Combinations for indexing k and j, for eachRepeat above-mentionedu*With Calculating and judgementWhether set up, k is repeated if setting up*Calculating and exchange feature determined by index (i, j, k) Statistical value and index (i, j, k*) determined by characteristic statistics value.According to the definition of d (j), training sample I is calculated again1,I2… INBetween be based on fj'sEuclidean distance average value, obtain corresponding f1, f2…f|T|D ' (1), d ' (2) ... d ' (| T |).If D (j) >=d ' (j) forAll set up, then retain features described above statistical value and exchange as a result, otherwise recovering the sequence of characteristic statistics value State at the end of step 3.2.1.
Step 3.2.3 calculates invariant feature element.For kth class map grid texture and j-th of feature extracting method fjIt is (i.e. solid Standing wire draws k and j), according to above-mentioned steps and I1,I2…INWhat is calculated is N number of A elementWithI-thFA elementKth class map grid texture can be calculated and be based on fjFeature vector i-thFA member The stationary value s of element(j,k)(iF), it is defined as follows.
By s(j,k)(iF) by index iFAscending order arrangement then obtains kth class map grid texture and is based on fjStationary value vector s(j,k)。 If parameter nfRepresent predefined minimal characteristic vector length, then work as nf< FjDuring establishment, using adaptive K-mean algorithms (Adaptive K-means) algorithm (Jia L., Liang J., Fabric defect inspection based on isotropic lattice segmentation,Journal of the Franklin Institute 354(13) (2017) 5694-5738, hereinafter referred to as self-adaption cluster algorithm) to s(j,k)(1), s(j,k)(2)…s(j,k)(Fj) clustered, If by the classification that self-adaption cluster algorithm produces by the positive integer number consecutively since 1, i-thFA stationary value s(j,k)(iF) institute Belong to class number and be denoted as Ls(iF), then these number definition set Ls.If define parameter preset minimal characteristic numberThen kth Class map grid texture is based on fjFeature vector i-thFThe stability of a elementIt is defined as follows.
Represent the preceding n for arranging the classification that self-adaption cluster algorithm produces by its number of elements descendingfA classification Numbering set.WillBy index iFAscending order arrangement then obtains kth class map grid texture and is based on fjStability vectorIt is right In all fixed Combinations of index k and j, repeat above-mentionedCalculating.
Step 3.2.4 calculates preferable statistical value.For kth class map grid texture and j-th of feature extracting method fjIt is (i.e. fixed K and j) is indexed, according to above-mentioned steps and I1,I2…INIt can calculateWithBy adaptively gathering Class algorithm, can be to vector Clustered, if self-adaption cluster is calculated The classification that method produces is by the positive integer number consecutively since 1 and i-th of vectorGeneric numbering is denoted asThen these number definition setFor A classification, kth class figure Check reason is based on fjPreferable statistical valueIt is defined as follows.
Expression belongs to kth class map grid texture and is based on fjI-thuAverage in the characteristic statistics value of a subclass map grid texture Average value.All fixed Combinations for indexing k and j, repeat above-mentionedCalculating.
Step 3.3 calculates the preferable statistical value threshold value of each feature.According to training sample set and above-mentioned steps, it can calculate and be based on J-th of feature extracting method fjKth class map grid texture i-thuThe preferable statistical value of a subclass map grid textureIt is (i.e. fixed Index j, k and iu).Any map grid L produced for any training sample by step 2, according to its feature vector fj(L) as the following formula Calculate preferable statistical value index k* and
ForThere may be multiple L its preferable statistical value index meet k*=k andThese map grids form SetWhenDuring establishment, the kth class map grid texture based on j-th of feature extracting method can be calculated as follows I-thuThe ultimate range of a subclass map grid textureI.e. preferable statistical value threshold value.
For indexing j, k and iuAll fixed Combinations, repeat it is above-mentionedCalculating.
Step 4 test sample map grid is split.To a secondary given test sample, the meter of repeat step 2.1 to step 2.3 Calculate, difference lies in the training sample involved in calculating is replaced with test sample, finally obtain the row split position of test sampleWith column split positionAnd according toWithTest sample is divided into map grid.
Step 5 flaw identifies.To any map grid of test sampleAccording to feature extracting method f1, f2…f|T|Calculate special Sign vector For fjThe feature vector of calculatingAccording to step 3.2 and step 3.3 calculate preferable statistical values index k* and WithIfThenMark Flaw is denoted as, otherwise labeled as indefectible.When all map grids are based on fjMark terminate, inspection each have flaw map grid Ll8 Face domainThe mark of interior map grid, if in the presence of map grid of having no timeThen judgeWhether set up, Marked if setting upTo have flaw and makingAnd d is calculated as followsl+1, continue checking forThe mark of interior map grid Remember and repeat the above steps until dl+1For
Wherein threshold coefficient0 < γ≤1,L1Expression is based on fjMark terminate obtain have the free time Map grid.When dynamic threshold isWhen, it is testing result all to have the ranks index that free time map grid includes pixel.
The beneficial effects of the invention are as follows:A kind of textile flaw based on peak value coverage values and composite character provided by the invention Defect detection method, Pixel of Digital Image half-tone information of this method analysis based on flat textile surface under lighting source, will scheme Grid as being divided into non-overlapping copies, calculates the IRM of each grid, HOG, GLCM and Gabor characteristic value, according to feature Distribution value It is automatically positioned textile surface flaw.The present invention is especially suitable for be automatically identified in the textile that gathers under steady illumination light source to put down Textile surface flaw in smooth surface gray-scale image.
Brief description of the drawings
The invention will be further described with reference to the accompanying drawings and examples.
Fig. 1 is the main-process stream signal of the textile flaw detection method based on peak value coverage values and composite character of the present invention Figure;Fig. 2 is that the flow of step 1.1 in the textile flaw detection method based on peak value coverage values and composite character of the invention is shown It is intended to;Fig. 3 is the calculating of step 1.2 in the textile flaw detection method based on peak value coverage values and composite character of the invention The flow diagram of row initial segmentation position;Fig. 4 is the textile flaw based on peak value coverage values and composite character of the present invention The calculating of step 2.3 arranges the flow diagram of final split position in detection method;Fig. 5 is the present invention based on peak value coverage values With the calculating map grid cyclic flow schematic diagram of step 3.1 in the textile flaw detection method of composite character;Fig. 6 is each has no time The flow diagram of the characteristic statistics value of textile gray level image;Fig. 7 is the schematic diagram for calculating the sequence of characteristic statistics value;Fig. 8 is Sort flow diagram;Fig. 9 is the flow diagram for the preferable statistical value threshold value for calculating each feature;Figure 10 is flaw identification process Flow diagram;Figure 11 is step 1.1 background pixel projection algorithm flow chart;Figure 12 is that step 1.2 calculates the calculation of peak value coverage values Method flow chart;Figure 13 is that step 1.3 calculates map grid ideal dimensions algorithm flow chart;Figure 14 is that step 2.1 calculates background pixel throwing Shadow and coverage values algorithm flow chart;Figure 15 is that step 2.2 calculates initial segmentation position algorithm flow chart;Figure 16 is that step 2.3 is counted Calculate final split position algorithm flow chart;Figure 17 is that step 3.1 calculates map grid periodical algorithms flow chart;Figure 18 is that A.1 algorithm is counted Calculate eigenmatrix algorithm flow chart;Figure 19 is that A.2 algorithm calculates distance algorithm flow chart;Figure 20 is that A.3 algorithm calculates signal week Phase algorithm flow chart;Figure 21 is that step 3.2.1 calculates characteristic statistics value-based algorithm flow chart;Figure 22 is that step 3.2.2 calculates feature Statistical value sort algorithm flow chart;Figure 23 is that step 3.2.3 calculates invariant feature element algorithm flow chart;Figure 24 is step 3.2.4 preferable statistical value algorithm flow chart is calculated;Figure 25 is the preferable statistical value thresholding algorithm flow that step 3.3 calculates each feature Figure;Figure 26 is step 4 test sample map grid partitioning algorithm flow chart;Figure 27 is step 5 flaw recognizer flow chart.
Embodiment
Presently in connection with attached drawing, the present invention is described in detail.This figure is simplified schematic diagram, is only illustrated in a schematic way The basic structure of the present invention, therefore it only shows composition related to the present invention.
The embodiment of computational methods of the present invention is completed by writing computer program, and specific implementation process is related to self-defined Algorithm is described by pseudocode.Program input is the textile images of gray processing, and program output is the map grid set containing flaw.This hair Bright embodiment includes five steps, first three step is the training stage, and latter two steps are test phase.
The training stage comprises the following steps:
Step 1:A series of parameter according to needed for images of having no time calculate map grid segmentation, to determine map grid ideal dimensions;
Step 2:According to the map grid ideal dimensions obtained in step 1, map grid segmentation is carried out to training sample set, is trained Sample map grid;
Step 3:Using in feature extracting method calculation procedure 2 map grid segmentation generation training sample map grid feature to Amount, so that calculating training sample concentrates the map grid cycle of image of having no time, the preferable statistical value of each feature of map grid and preferable system Evaluation threshold value;
The test phase comprises the following steps:
Step 4:Test sample map grid is split, to a secondary given test sample, according to the method for step 2 to test sample Map grid segmentation is carried out, obtains test sample map grid;
Step 5:Method according to step 3 calculates feature vector, map grid cycle, the ideal of each feature of map grid of test sample Statistical value and preferable statistical value threshold value, and by result of calculation compared with preferable statistical value threshold value, it is defective to identify Map grid.
The order and logical relation of this method refer to Fig. 1.
Individually below to this five step expansion explanations.
1st, the training stage
A series of training stage parameter first according to needed for textile gray level images of having no time calculate map grid segmentation, then to nothing Free time image carries out map grid segmentation and calculates parameter needed for test phase.Training stage includes three steps:Step 1:Calculate map grid Partitioning parameters, step 2:Training sample map grid is split, and step 3 calculates test phase parameter.Map grid segmentation side proposed by the present invention The parameter that method is obtained according to step 1.3, splits map grid by step 2.1 to step 2.3.
Step 1 is used to calculate figure lattice partitioning parameters, which specifically includes three sub-steps, i.e. step 1.1:Background picture Element projection;Step 1.2:Calculate peak value coverage values;Step 1.3:Calculate map grid ideal dimensions.
Step 1.1, visible Fig. 2 of detailed process.For a width textile gray level image I, according to RTV models calculate cartoon into Divide Ic, I is obtained by Bradley methodscBianry image, attached drawing 2 illustrates in binarization and calculated by Bradley methods The pixel threshold schematic diagram arrived, i.e. IcMesh figures gray plane, this method to each pixel calculate a local threshold, root The I of binaryzation is obtained according to pixel local threshold binaryzation Ic.The I of binaryzationcDrop is realized by morphological erosion and expansive working Make an uproar, then using Moore-Neighbor track algorithms, (Moore-Neighbor tracing algorithm, come from document Jia L.,Liang J.,Fabric defect inspection based on isotropic lattice Segmentation, Journal of the Franklin Institute 354 (13) (2017) 5694-5738) obtain drop Binaryzation I after making an uproarcIn two value objects, i.e., 8 connection foreground pixel regions, calculate two value objects area, i.e. two value objects Foreground pixel number.It is distributed according to two-value object area, obtains area median ma, by all areas not in section ((1- α)·ma,(1+α)·ma) in two value objects from binaryzation IcMiddle deletion obtains binaryzation textile images Itc,For people The parameter that work is specified, value range are 0≤α≤1, and this method takes α=0.6.Calculate ItcIn often capable background pixel number and by row Index ascending order arranges to obtain the projection of background pixel rowCalculate ItcThe background pixel number of middle each column is simultaneously arranged by column index ascending order Arrange and project to background pixelOne-dimensional waveform in attached drawing 2 isWithStep 1 algorithm flow refers to Figure 11.
Step 1.2 part flow refers to Fig. 3, and for two-dimentional textile gray level image, it is initial that initial segmentation position includes row Split position and row initial segmentation position, Fig. 3 show only the conceptional flowchart for calculating row initial segmentation position, row initial segmentation The calculating process of position is similar therewith.According toCalculate peak value (i.e.From increasing to subtracting, or from the value for reducing to increasing, such as Fig. 2 one-dimensional waves The dark dot of shape, and pressThe index ascending order of middle peak value arranges to obtain peak value sequenceFor prInA peak valueCalculateCoverage valuesIt is defined as follows.
It is conceptive,Represent in prIn fromBoth sides start to prMove, be more than not running into end to endPeak value The number of preceding passed through peak value, as shown in Figure 3, has the peak value of identical coverage values with the triangular representation of same color.Class As, calculatePeak value sequenceAnd calculateWherein1≤ipc
For prOr pc, coverage values often take limited a integer value, p as shown in Figure 3cValue is 0,1,2,4,11 and 27. Coverage values are arranged in descending order, obtain coverage values value setSuch as attached drawing 3According toIt is a Coverage values valuepcMiddle coverage valuesPeak valueReferred to asLevel peak value, theLevel peak value by itsIn index ascending order arrangement.Calculate theAdjacent peak exists in level peak valueIn index spacing d (i.e. each peak value with it is previous Peak value existsIn index difference absolute value), the median of computation index spacingAnd its occurrence numberFor In each element, all medians and its occurrence number there are adjacent index spacing, the value of these medians then to form SetSimilarly, calculateWithStep 1.2 algorithm flow refers to Figure 12.
Step 1.3 calculates map grid ideal dimensions.The training sample I concentrated according to training sample1,I2…IN, i-th can be calculated It is aSample Ii'sWithThen IiPreferable line numberIt is fixed Justice is as follows.
Wherein δ is Dirac delta function (Dirac delta function).The preferable columns of IDefinition withClass Seemingly, only need byItem with subscript r in definition replaces with the respective items with subscript c, such asReplace withMap grid ideal dimensions are defined asMedianWithMedianStep 1.3 Algorithm flow refers to Figure 13.
The calculating process of step 2.1 includes step 1.1 and step 1.2.Step 2.1 algorithm flow refers to Figure 14.
Step 2.2 calculates initial segmentation position, and flow refers to Fig. 3.For i-th of training sample Ii, counted according to step 2.1 ObtainWithDefined in calculation procedure 1.2WithAndWithIt is calculated according to step 1.3WithIt is calculated as followsThere is most frequentLevel peak value
WhereinWithRepresent to be projected according to background pixel row respectivelyPeak value sequence calculated Coverage values value set, theLevel peak value index spacing median, theLevel peak value indexes spacing median occurrence number and owns Rank peak value (The corresponding peak value of all elements) median value sequence.Calculating process withIt is similar, only need by Item with subscript r in definition replaces with the respective items with subscript c, such asReplace with
Assuming that theThere are a string of continuous peak values and each peak value in level peak value to exist with previous peak valueIn index difference Absolute value approachesThen this string peak value existsIn index be defined as row initial segmentation position Sr, this string peak value is theLevel peak value In index meet following formula definition.
Wherein dj+kRepresent theLevel peak value in index for j+k and j+k-1 two peak values itsThe difference of middle index it is exhausted To being worth,And 0 < β < 1 be parameter, this method takes β=0.1.Row initial segmentation position ScIt is relevantWithDefinition withWithIt is similar, i.e., the item with subscript r in above formula is replaced with into the respective items with subscript c, such asReplace It is changed toAnd dj+kIs represented at this timeLevel peak value in index for j+k and j+k-1 two peak values itsMiddle index The absolute value of difference.Parameter beta pairWithCalculating it is general.Step 2.2 algorithm flow refers to Figure 15.
Step 2.3 flow refers to attached drawing 4, which, which show only, calculates column split positionConceptional flowchart, row segmentation PositionCalculating process it is similar therewith.Due to the interference of the factors such as flaw and noise, usual SrAnd ScIt cover only image section Region (S at oncerMinimum and maximum between image line index account for less than 80% or S of all image line indexcMinimum Image column index between maximum accounts for the 80% of all image column indexes, does not include 80%) either way, so needing Extend SrAnd Sc.For i-th of training sample Ii,And ScInitial value be respectively step 2.2 calculate IiSrAnd Sc.Will In element by size ascending order arrange, find out least member thereinAnd greatest memberWithDeviate S for step size computation1 And SAnd close to the row predicted position of image boundary, that is, four predicted positions are calculated as followsWith
I is obtained by step 1.1iBinaryzation textile imagesAnd updated by following three kinds of situationsWith
The first situation:IfCalculateMiddle column index y meetsTwo-value pair As the average value of barycenterAndMiddle column index y meetsTwo value object barycenter average valueThenIt is added toNew element and becomeRecalculated according to definitionWith
The second situation:IfCalculateMiddle column index y meetsTwo-value pair As the average value of barycenterThenIt is added toNew element and becomeRecalculated according to definition
The third situation:IfThen terminate and calculate.
Repeat the calculating of above-mentioned three kinds of situations untilWithUntill no longer changing.Similarly, by following Three kinds of situation renewals With
The first situation:IfCalculateMiddle column index y meets Two value object barycenter average valueAndMiddle column index y meetsTwo value object barycenter Average valueThenIt is added toNew element and becomeRecalculated according to definitionWith
The second situation:IfCalculateMiddle column index y meets Two value object barycenter average valueThenIt is added toNew element and becomeRecalculated according to definition
The third situation:IfThen terminate and calculate.
Repeat the calculating of above-mentioned three kinds of situations untilWithUntill no longer changing, at this timeCalculating Terminate.Calculating it is similarWillIn element by size ascending order arrange, find out least member thereinAnd greastest element ElementAccording toWithUpdate the three kinds of situations renewal being related toWithI.e. will be every in three kinds of situations Superscript c replaces with r, such asReplace withThe y in inequality and formula is replaced with into x at the same time, such asReplace withAccording toWithUpdate the three kinds of situations renewal being related toWithI.e. will be each in three kinds of situations The superscript c of item replaces with r, such asReplace withThe y in inequality and formula is replaced with into x at the same time, such asReplace It is changed toAccording toWithThe row and column index included respectively, by IiSplit by the row and column where these indexes, point The rectangular area for cutting gained is map grid, it is defined as follows.
WhereinWith Represent the index of map grid arrangement position in I.Such as 2 lower left corner legend of attached drawing, upper left corner map grid is denoted as L in the legend1,1, L1,1 The adjacent map grid in right side is L1,2, L1,1The adjacent map grid in downside is L2,1, and so on.Map gridBy being included in I Row, and comprisingRow determine map grid border.Step 2.3 algorithm flow refers to Figure 16.
Step 3 calculates test phase parameter.The step includes three sub-steps, i.e. step 3.1 calculates map grid cycle, step The preferable statistical value and step 3.3 of 3.2 calculating each features of map grid calculate the preferable statistical value threshold value of each feature.
Step 3.1 calculates map grid cyclic flow and refers to Fig. 5.According to training sample set I1,I2…INIt can be calculated with step 1.3 Map grid ideal dimensions line numberAnd columnsSplit by step 2 againA training sample IiObtain Ii's M × n map grid.Assuming that in IiOften row and each column map grid in, be often separated byTwo map grids of a map grid Texture is identical, and the minimum value in t ' values is known as map grid cycle t.Such as during t=1, IiAll map grids texture it is identical;T=2 When, IiMap grid texture it is then identical every a map grid.By the Texture classification of map grid, then IiThere is the map grid texture of t type.Make With HOG (Dalal, N., Triggs B., Histograms of Oriented Gradients for Human Detection,IEEE Comput.Soc.Conf.on Comput.Vision and Pattern Recognition 1 (2005) 886-893) feature extracting method (hereinafter referred to as HOG methods) calculates IiThe feature vector of map grid simultaneously makes feature vector rope It is identical to draw corresponding map grid index, i.e., the feature vector as corresponding to the arrangement mode of map grid arranges map grid.For Ii's Map gridCalculateWith i-thrThe Euclidean distance of all map grids in row, the figure as involved by calculating The column index ascending order arrangement of lattice, then may make up distance vector.Therefore i-th is fixedrEach map grid in row, according to i-thrCapable is all Map grid can all calculate a distance vector, these distance vectors are arranged by involved fixation map grid column index ascending order is calculated, Then obtain being based on i-thrCapable n × n distance matrixs, i is pressed by distance matrixrAscending order arranges, and obtains IiRow distance matrixSimilarly, I can be calculatediColumn distance matrixBy vectorAs One-dimensional signal carries out Fast Fourier Transform (fast Fourier transform, hereinafter referred to as FFT), then can obtain's Cycle and frequency spectrum, this cycle and frequency spectrum are defined as IiThe row cycle and line frequency spectrum, calculate all 1≤l1≤ m and 1≤l3≤n CorrespondingThe row cycle and line frequency compose and calculate row cycle median and line frequency spectrum median, gained median are fixed respectively Justice is image line cycle and image line frequency spectrum.Similarly, according to column distance matrix D(c), I can be calculatediThe row cycle and row frequency Spectrum, and calculate corresponding image column cycle and image column frequency spectrum.Attached drawing 5 illustrates I1,I2…INThe row cycle and line frequency spectrum it is general The property read two dimension scatter diagram, arranges the conceptual two-dimentional scatter diagram of cycle and row frequency spectrum.According to I1,I2…IN, N number of image line can be calculated Cycle and corresponding N number of image line frequency spectrum, calculate image line frequency spectrum medianFind out and be higher thanImage line frequency spectrum corresponding to The image line cycle, calculate the median in these image lines cycleSame steps are repeated to image column cycle and image column frequency spectrum Obtain image column frequency spectrum medianWith image column cycle medianIfOrOrThen t values For 1, otherwise pass through and compareWithCorresponding frequency spectrum determines the value of t, i.e.,:IfThen t takesOtherwise t takesStep 3.1 Algorithm flow refers to Figure 17, and Figure 18 represents algorithm A.1 flow chart, and Figure 19 represents algorithm A.2 flow chart, A.3 Figure 20 represents algorithm Flow chart.
Step 3.2 includes four sub-steps:Step 3.2.1 calculates characteristic statistics value, and step 3.2.2 calculates characteristic statistics value Sequence, step 3.2.3 calculate invariant feature element, and step 3.2.4 calculates preferable statistical value.
Step 3.2.1 calculates the characteristic statistics value of each textile gray level image of having no time, in detail as shown in Figure 6.According to above-mentioned Step calculates training sample set I1,I2…INMap grid cycle t, the i.e. identical map grid of texture arrangement regulation.ForPair is had no time image Ii, it can be divided into the different map grid of t class textures, i-thrRow Class map grid and (ir+ t) row such map grid map grid column index value it is identical, thus can be in IiIn only access belong to together one kind figure Lattice, for kth class map grid, i-thrOK, (ir+ t) OK, (ir+ 2t) OK ..., such map grid can form matrix, which claims For map grid matrix, for kth class map grid, map grid matrix at most may be present t, i.e. C1,C2…Ct.As shown in fig. 6, as t=3, 3rd class map grid has 3 matrixes:C1It is made of the 3rd class map grid of the 1st row and the 4th row (i.e. 1+t rows), C2By the of the 5th row of the 2nd row 3 class map grids form, C3It is made of the 3rd class map grid of the 3rd row.Assuming that in the presence of | T | a input is 2-D gray image matrix and defeated Go out for the feature extracting method f of one-dimensional real vector1, f2…f|T|, these feature extracting methods are for identical defeated of line number and columns Enter image and produce the identical feature vector of length, then IiIn map gridCan be according to f1, f2…f|T|Calculate | T | a feature to Amount If IiThe size of all map grids is according to I1,I2…INPixel minimum line number contained by middle map grid nrWith minimum columns ncIt is adjusted, i.e., only retains in map grid the 1st row to n-thrGo and the 1st row to n-thcThe pixel of row, then IiIn Any two map gridWithIt is based on Feature vector length it is identical, i.e., This is based on fjFeature vector length be defined as fjCharacteristic element prime number Fj.For IiMiddle kth class map grid, can be according to such figure The map grid Matrix C of lattice1,C2…CtCalculating is based on fjFeature vector in each element averageStandard deviationIt is maximum ValueAnd minimum valueThis 4 values are defined as IiCharacteristic statistics value, that is, be defined by the formula.
WhereinRepresent that map grid L is i-thtA map grid matrixArbitrary element,WhereinExpression is based on fjMap grid matrixI-th in the feature vector of middle all elements (map grid)FA element is (real Number) multiset, when opt is replaced with mean, std, max or min, thenDefinition is corresponding WithStep 3.2.1 algorithm flows refer to Figure 21.
Step 3.2.2 calculates the sequence of characteristic statistics value, in detail as shown in Figure 7, for illustrating the image of having no time for training L1,1Texture difference.Although I1,I2…INFor the sample of having no time of same training sample set, but the definition of training sample set does not guarantee that First map grid L in each sample1,1Texture it is identical.Training sample set as shown in Figure 7, the training sample set include 4 secondary nothings Free time image I1, I2, I3And I4, wherein I3Middle L1,1Texture and first map grid texture in other samples it is different.If all instructions The texture for practicing first map grid of sample is different, then step 3.2.1, which calculates characteristic statistics value, just to be needed to resequence.Such as Fig. 8 Shown, training sample set includes training sample I1, I2, I3, I4And I5, wherein I4L1,1With first map grid line of other samples Reason is different, causes characteristic statistics value also different from the sequence of other samples.If first map grid texture of all training samples It is all identical, then sequence is then nonsensical.It is whether necessary in order to detect sequence, calculate training sample I1,I2…INBetween be based on fj 's Euclidean distance average value d (j), it is defined as follows.
For f1, f2…f|T|, corresponding d (1) can be obtained, d (2) ... d (| T |) correspondingly, can root again after completing to sort Calculate d ' (1), d ' (2) ... d ' (| T |) according to above formula, relatively before and after two groups of distance averages, if d (j) >=d ' (j) for 1≤j≤ | T | all set up, then retain ranking results, otherwise recover the state before sequence.The flow that sorts is as shown in Figure 8.For kth class map grid Texture it is N number ofUsing K-means algorithms (Jia L., Liang J., Fabric defect inspection based on isotropic lattice segmentation,Journal of the Franklin Institute 354 (13) (2017) 5694-5738, hereinafter referred to as clustering algorithm) it is clustered, clustering algorithm classification parameter is set For t, then t class center is obtainedForCalculate according to the following formula fromNearest class center Corresponding class label u*
IfWhereinRepresent that there is the center of the class of most element numbers in t classification, then exchange index Characteristic statistics value determined by (i, j, k) and index (i, j, k*) determined by characteristic statistics value, wherein k*It is defined as follows.
All fixed Combinations for indexing k and j, for eachRepeat above-mentionedU* andCalculating and judgementWhether set up, k is repeated if setting up*Calculating and exchange determined by index (i, j, k) Characteristic statistics value and index (i, j, k*) determined by characteristic statistics value.Step 3.2.2 algorithm flows are in detail as shown in Figure 22.
Step 3.2.3 calculates invariant feature element.I is concentrated according to training sample1,I2…INT kind map grid textures can calculate and be based on fjN × t group characteristic statistics values, forClass map grid texture, according to it A elementWithI-thFA elementWherein FjForCharacteristic element prime number, kth class map grid texture can be calculated and be based on fjFeature vector i-thFA element Stationary value s(j,k)(iF), it is defined as follows.
By s(j,k)(iF) by index iFAscending order arrangement then obtains kth class map grid texture and is based on fjStationary value vector s(j,k)。 If parameter nfRepresent predefined minimal characteristic vector length, this method nfValue is nf=8, then work as nf< Fj, should during establishment With adaptive K-mean algorithms (Adaptive K-means) algorithm (Jia L., Liang J., Fabric defect inspection based on isotropic lattice segmentation,Journal of the Franklin Institute 354 (13) (2017) 5694-5738, hereinafter referred to as self-adaption cluster algorithm) f is based on to kth class map grid texturej FjA stationary value is clustered, if by the classification that self-adaption cluster algorithm produces by the positive integer number consecutively since 1 and I-thFA stationary value s(j,k)(iF) numbering of generic is denoted as Ls(iF), then these number definition set Ls.If the default ginseng of definition Number minimal characteristic numberThen kth class map grid texture is based on fjFeature vector i-thFThe stability of a elementDefinition It is as follows.
Wherein δ is Dirac delta function,Represent the classification category that self-adaption cluster algorithm produces including first prime number The preceding n that descending arrangesfThe numbering set of a classification.WillBy index iFAscending order arrangement then obtains kth class map grid line Reason is based on fjStability vectorAll fixed Combinations for indexing k and j, repeat above-mentionedCalculating.Step 3.2.3 algorithm flow is in detail as shown in Figure 23.
Step 3.2.4 calculates preferable statistical value.I is concentrated for training sample1,I2…IN Class map grid texture, can calculate kth class map grid texture according to step 3.2.3 and be based onStability vector, can be to vector by self-adaption cluster algorithmClustered, If by the classification that self-adaption cluster algorithm produces by the positive integer number consecutively since 1 andIt is a VectorThe numbering of generic is denoted asThen these number definition setIn a practical situation, may be used It is able to can occurClose situation, therefore defined parametersIf U(j,k)> nK, then cluster is re-started, this Method nKValue is nK=5.ForA classification, kth class map grid texture are based on fjIdeal Statistical valueIt is defined as follows.
Expression belongs to kth class map grid texture and is based on fjI-thuAverage in the characteristic statistics value of a subclass map grid texture Average value.All fixed Combinations for indexing k and j, repeat above-mentionedCalculating.Step 3.2.4 algorithm flows refer to Shown in Figure 24.
Step 3.3 calculates the preferable statistical value threshold value of each feature, in detail as shown in Figure 9.I is concentrated for training sample1,I2… IN, is can obtain according to step 3.2.4Class map grid texture is based onI-thu (1≤iu≤U(j,k)) a subclass map grid texture preferable statistical valueSplit for any training sample according to map grid and produced Any map grid L, can calculate based on fjFeature vector fj(L) and its Euclidean distance between all preferable statistical values, can look for Go out the preferable statistical value index k corresponding to wherein minimum range*WithIt is defined as follows.
Therefore, it is based on f for kth class map grid texturejI-thuThe preferable statistical value of a subclass map grid textureMay There are multiple map grids and the relevant k of map grid*WithWithIndex k and iuIt is identical, these map grids composition setWhenDuring establishment, it can calculateThe feature vector of middle map grid withUltimate rangeIt is defined as follows.
For indexing j, k and iuAll fixed Combinations, repeat it is above-mentionedCalculating.As preferable statistical value Threshold value, its calculating process are as shown in Figure 9.In attached drawing 9, left side is to have completed the textile gray level image that map grid is split, the image Including 2 class map grid textures, for any map grid in imageAccording to f1, f2…f|T|Calculate the map grid | T | a feature to AmountFor j-th of feature vectorCalculate k*WithAs a result to include correspondence The graphical representation of map grid position gray scale color lump, wherein dark gray scale color lump represents small distance, the numeral on each color lump from a left side to The right side is followed successively by k*WithForCorresponding index k and iu, delete correspondingStep 3.3 algorithm flow refers to Shown in Figure 25.
(2) test phase
On the parameter basis obtained in the training stage, the sub-picture that test phase concentrates test sample carries out flaw inspection Survey and position.Test phase includes two steps:Step 4 test sample map grid splits and the identification of step 5 flaw.
Step 4 test sample map grid is split.To a secondary given test sample, the meter of repeat step 2.1 to step 2.3 Calculate, difference lies in the training sample involved in calculating is replaced with test sample, finally obtain the row split position of test sampleWith column split positionAnd according toWithTest sample is divided into map grid.Step 4 algorithm flow is in detail as shown in Figure 26.
Step 5 flaw identifies that flow is as shown in Figure 10.For a secondary given textile gray level image I, produced by step 4 The map grid of raw I, to any map grid in IAccording to feature extracting method f1, f2…f|T|Calculate| T | a feature vectorFor based onFeature vectorCalculation procedure The preferable statistical value index k of 3.3 definition*WithAnd comparative feature value distanceWithSize, ifThenLabeled as there is flaw, otherwise labeled as indefectible.
When all map grids are based on fjMark terminate, inspection each have flaw map grid Ll8 face domainThe mark of interior map grid Note, if in the presence of map grid of having no timeThen compareWith dynamic threshold dlSize, ifThenIt is labeled as There is flaw and makeAnd d is calculated as followsl+1, continue checking forThe mark of interior map grid, and repeat the above steps Until the dynamic threshold newly calculated is
Wherein0 < γ≤1, this method value are γ=0.93,L1Expression is based on fjMark knot What beam obtained has free time map grid.When dynamic threshold isWhen, it is detection knot all to have the ranks index that free time map grid includes pixel Fruit.Step 5 algorithm flow is in detail as shown in Figure 27.
The high efficiency experiment of the present invention proves:
Use Hong Kong University's Electrical and Electronic engineering department industry automatic in the Defect Detection recruitment evaluation of the method for the present invention Change 24 color textile product images that the 247 width pixel sizes that laboratory provides are 256 × 256, in an experiment these image quilts Be converted to the gray level image of 8.These images include three kinds of patterns:Point & figure chart picture, box-shaped image and star-shaped image, wherein dot Image include 30 it is indefectible and 30 width have flaw image;Box-shaped image include 30 it is indefectible and 26 width have flaw image;Star Shape image include 25 it is indefectible and 25 width have flaw image.Three kinds of patterns have flaw image all to include 5 kinds of flaw types:It is disconnected Hold (broken end), hole (hole), reticulate pattern (netting multiple), cord (thick bar) and stria (thin bar), the particular number of every kind of flaw type refer to table 1 to the first row of table 3, wherein point & figure chart picture and further include a kind of flaw Defect line section (Knots).All flaw images have the flaw reference map (ground-truth image) of formed objects, flaw base Quasi- figure is 2 value images, wherein 1 represents flaw, 0 represents background.Algorithm for comparing includes WGIS, BB, RB and ER, these calculations The parameter setting of method and document (Jia L., Liang J., Fabric defect inspection based on isotropic lattice segmentation,Journal of the Franklin Institute 354(13) (2017) 5694-5738) it is identical.Parameter selected as of the method for the present invention based on the data set:Minimal characteristic number nf=8, classification Number limit nK=5, threshold coefficient γ=0.93, T={ " IRM ", " HOG ", " GLCM ", " Gabor " }.
Index for assessment includes true positives (true positive, hereinafter referred to as TP), false positive (positiverate, hereinafter referred to as FPR), True Positive Rate (truepositiverate, hereinafter referred to as TPR), false positive rate (positiverate, hereinafter referred to as FPR), positive predictive value (positivepredictivevalue, hereinafter referred to as PPV) and Negative predictive value negativepredictivevalue, hereinafter referred to as NPV).TPR, which is weighed, represents flaw in flaw reference map Pixel is correctly demarcated as the ratio of flaw by algorithm, and FPR, which is weighed, represents the pixel of background by algorithmic error mark in flaw reference map It is set to the ratio of flaw, the flaw proportion in the flaw of PPV measure algorithms output in flaw reference map, NPV measure algorithms Background proportion in the background of output in flaw reference map.For TPR, PPV and NPV, desired value is the bigger the better, for FPR is then the smaller the better.Related mathematical definition can document (M.K.Ng, H.Y.T.Ngan, X.Yuan, et al., Patterned fabric inspection and visualization by the method of image Decomposition, IEEETrans.Autom.Sci.Eng.11 (3) (2014) 943-947) in find.The method of the present invention, The index calculating method of WGIS, BB, RB and ER and document (Jia L., Liang J., Fabric defect inspection based on isotropic lattice segmentation,Journal of the Franklin Institute 354 (13) (2017) 5694-5738) it is identical.Experimental Hardware platform for the CoreTMi7-3610QM230-GHz of Intel containing processor and The laptop of 8.00GB memories, software are Windows 10 and Maltab8.4.
Table 1 enumerates point & figure chart as Defect Detection as a result, the every row index value for wherein marking flaw type is corresponding method To the index average value of all test sample operation results of the flaw type.One column of overview in table 1, the method for the present invention and RB has highest ACC (0.96), but the TPR (0.70) of the method for the present invention is higher than RB (0.44), and the FPR of two methods is 0.01.The global TPR and FPR highests of BB, the global FPR of WGIS are also higher.Since high FPR (will not from flase drop pixel The pixel error for representing flaw is identified as representing the pixel of flaw), the flase drop pixel of BB and WGIS are very much.For different flaws The TPR (0.72) of type, the knot of the method for the present invention, reticulate pattern and hole is close to the optimal value (0.84) in table 1.BB is contrasted, this The broken ends of fractured bone of inventive method, organizes striped and stria TPR is relatively low, but its TPR ratio is high in addition to BB, while FPR is relatively low.To sum up, originally Inventive method has optimal ACC and preferable TPR, while the very close optimal values of its FPR.
1 point & figure chart of table is as Defect Detection result
Table 2 enumerates box-shaped image Defect Detection as a result, the every row index value for wherein marking flaw type is corresponding method To the index average value of all test sample operation results of the flaw type.According to 2 overview of table, one column, the overall situation of the method for the present invention The very close optimal values (0.99) of ACC (0.98) simultaneously have highest overall situation TPR (0.76), its overall situation TPR is higher than WGIS times Global TPR (0.54) is much higher, but the global FPR of WGIS is very high.For each flaw type in addition to cord, present invention side The TPR of method is optimal.For cord, in methods of the FPR less than WGIS, the TPR of the method for the present invention is also optimal.It is special Not, the hole TPR (0.10) and reticulate pattern TPR of the hole TPR (0.85) and reticulate pattern TPR (0.65) of the method for the present invention and suboptimum (0.31) compared to much higher.To sum up, the method for the present invention has reached global optimum TPR and suboptimum overall situation ACC, its overall situation FPR is non- Very close to optimal value, while the method for the present invention is especially suitable for detecting the hole of box-shaped image and the flaw of reticulate pattern type.
2 box-shaped image Defect Detection result of table
Table 3 enumerates star-shaped image Defect Detection as a result, the every row index value for wherein marking flaw type is corresponding method To the index average value of all test sample operation results of the flaw type.According to 3 overview of table, one column, the overall situation of the method for the present invention ACC, TPR, PPV and NPV have reached optimal, its overall situation FPR (0.01) is close to optimal value (0.0).The overall situation of the method for the present invention TPR (0.95) is more much higher than the secondary figure of merit (0.43), and correspondingly, in addition to cord, all types of flaw TPR of the method for the present invention are almost 2 times of the corresponding figure of merit.In addition to reticulate pattern and cord, all types of flaw FPR of the method for the present invention FPR are optimal value, and reticulate pattern It is 0.01 with cord FPR, the very close optimal value of the value (0).Optimal value based on all types of TPR of the method for the present invention and time Figure of merit FPR, its all types of ACC have reached optimal.To sum up, compared with other methods, the method for the present invention is for all flaw classes Type all has an inundatory optimal ACC and TPR, while the very close secondary figures of merit of FPR.Therefore, for any flaw of galaxy image Defect type, the method for the present invention are all particularly suitable.
3 star-shaped image Defect Detection result of table
Using the above-mentioned desirable embodiment according to the present invention as enlightenment, by above-mentioned description, relevant staff Various changes and amendments can be carried out in without departing from the scope of the present invention completely.The technical scope of this invention is not The content being confined on specification, it is necessary to which its technical scope is determined according to right.

Claims (6)

  1. A kind of 1. textile flaw detection method based on peak value coverage values and composite character, it is characterised in that:Including training rank Section and two stages of test phase;A series of training stage, according to indefectible textile gray level image (figures of hereinafter referred to as having no time As) calculate map grid segmentation needed for parameter, then to have no time image carry out map grid segmentation and calculate test phase flaw identification needed for Parameter;One secondary textile images are carried out map grid segmentation according to the parameter that the training stage obtains and judge that map grid is by test phase No to include flaw, finally mark contains map grid defective;
    The training stage comprises the following steps:
    Step 1:A series of parameter according to needed for images of having no time calculate map grid segmentation, to determine map grid ideal dimensions;
    Step 2:According to the map grid ideal dimensions obtained in step 1, map grid segmentation is carried out to training sample set, obtains training sample Map grid;
    Step 3:Split the feature vector of the training sample map grid of generation using map grid in feature extracting method calculation procedure 2, from And calculate training sample and concentrate the map grid cycle of image of having no time, the preferable statistical value of each feature of map grid and preferable statistical value threshold Value;
    The test phase comprises the following steps:
    Step 4:Test sample map grid is split, and to a secondary given test sample, test sample is carried out according to the method for step 2 Map grid is split, and obtains test sample map grid;
    Step 5:Method according to step 3 calculates feature vector, map grid cycle, the preferable statistics of each feature of map grid of test sample Value and preferable statistical value threshold value, and by result of calculation compared with preferable statistical value threshold value, to identify map grid defective.
  2. 2. the textile flaw detection method based on peak value coverage values and composite character, its feature exist as claimed in claim 1 In:Step 1 specifically includes following steps:
    Step 1.1:Background pixel projects, and the cartoon component of textile gray level image I is calculated according to RTV models, using Bradley Method binaryzation cartoon component, by morphological erosion and expansive working to binaryzation cartoon component noise reduction, using Moore- Neighbor track algorithms obtain binaryzation IcIn two value objects, calculate binaryzation cartoon component in two-value object area, delete Except area is not in section ((1- α) ma,(1+α)·ma) in two value object (wherein maFor two-value object area median,And 0 < α < 1) obtain binaryzation textile images Itc;Calculate ItcMiddle each row and column background pixel number, by line index liter Often row background pixel number obtains the projection of background pixel row for sequence arrangementCarried on the back by column index ascending order arrangement each column background pixel number Scape pixel column projects
    Step 1.2:Peak value coverage values are calculated, calculate the background pixel row projection of textile gray level image IPeak value, by peak value Projected by it in background pixel rowIn index ascending order arrange to obtain peak value sequenceFor prInA peak valueCalculate according to the following formulaCoverage values
    Projected with background pixel rowCoverage valuesComputational methods are identical, the item of subscript r in above formula replaced with having The respective items of footmark c, calculatePeak value sequenceCalculateWhereinMeter Calculate prThe ordered set of middle peak value coverage valuesDescending arranges middle element by size;ForInA element Meet in peak value sequence'sOrdered set is known asLevel peak value TheLevel peak value in element by itsIn index ascending order arrangement;ForLevel peak value, it is previous with it to calculate each peak value Peak value existsIn index difference absolute value, calculate the medians of these absolute valuesAnd its occurrence number Composition setComposition setMiddle element value composition setSimilarly, according toWith pcCalculate and meet'sOrdered set " theLevel peak value "Calculate TheFront and rear element exists in level peak valueIn index difference absolute value and its medianWith median occurrence number Form multisetForm multisetMiddle element value composition set
    Step 1.3:Map grid ideal dimensions are calculated, to the I of training sample set1,I2…INIn i-th Training sample Ii, I is calculated according to step 1.2i'spr,pc,With CalculateValue setIiPreferable line numberIt is defined by the formula:
    Wherein, δ is Dirac delta function (Dirac delta function),IiPreferable columnsCalculate withIt is similar, i.e., the item with subscript r in above formula is replaced with into the respective items with subscript c, such asReplace ForMap grid ideal dimensions are defined asMedianWithMedian
  3. 3. the textile flaw detection method based on peak value coverage values and composite character, its feature exist as claimed in claim 2 In:Step 2 specifically includes following steps:
    Step 2.1:Background pixel projects, and calculating process includes step 1.1 and step 1.2;
    Step 2.2:Initial segmentation position is calculated, for i-th of training sample Ii, it is calculated according to step 2.1With Defined in calculation procedure 1.2WithAndWithAccording to step Rapid 1.3 are calculatedWithIt is calculated as followsThere is most frequentLevel peak value
    Similarly, can calculateThere is most frequentLevel peak value, i.e., replace with the item with subscript r in above formula with The respective items of footmark c;
    Step 2.3:Final split position is calculated, at once split positionWith column split positionFor i-th of training sample Ii,WithInitial value be respectively step 2.2 calculate IiRow initial segmentation position SrWith row initial segmentation position Sc;WillIn Element by size ascending order arrange, find out least member thereinAnd greatest memberFour prediction bits are calculated as follows PutWith
    According toWithThe row and column index included respectively, by IiSplit by the row and column where these indexes, segmentation gained Rectangular area be map grid, it is defined as follows:
    <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,With Represent the index of map grid arrangement position in I.
  4. 4. the textile flaw detection method based on peak value coverage values and composite character, its feature exist as claimed in claim 3 In:Step 3 calculates test phase parameter and specifically includes following steps:
    Step 3.1 calculates the map grid cycle, for training sample set I1,I2…INInA trained sample This Ii, it is available according to step 1 and step 2WithAccording toWithBy OiIt is divided into m × n map grid I is calculated using HOG feature extracting methodsiMap gridFeature vector and make feature vector index it is right with it The map grid index answered is identical;Calculate IiRow distance matrixWith column distance matrixIt is right VectorFourier transform is carried out, is obtainedCycle with frequency Spectrum;According to(With) cycle and frequency spectrum, calculating cycle median and frequency spectrum median, i.e., the image line cycle and Image line frequency spectrum;Similarly, I can be builtiColumn distance matrixAnd calculate image column cycle and image column Frequency spectrum;According to I1,I2…IN, N number of image line cycle and corresponding N number of image line frequency spectrum can be calculated, calculates image line frequency spectrum middle position ValueFind out and be higher thanImage line frequency spectrum corresponding to the image line cycle, calculate the median in these image lines cycleIt is right Image column cycle and image column frequency spectrum repeat same steps and obtain image column frequency spectrum medianWith image column cycle median IfOrOrThen t values are 1, otherwise pass through and compareWithCorresponding frequency spectrum size determines The value of t, i.e.,:IfThen t takesOtherwise t takes
    Step 3.2 calculates the preferable statistical value of each feature of map grid;I is split according to step 2 firstiObtain map gridAnd step 3.1 calculate training sample set I1,I2…INMap grid cycle t, pass through | T | a (T is characterized extracting method title ordered set) is defeated It is one-dimensional real vectorial feature extracting method f to enter for 2-D gray image matrix and output1, f2…f|T|Calculate IiMap grid's Feature vectorThen calculate kth class map grid and be based on fjIiCharacteristic statistics value With
    <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>
    WhereinRepresent that map grid L is i-thtA map grid matrixArbitrary element,Represent base In fjMap grid matrixI-th in the feature vector of middle all elements (map grid)FThe multiset of a element (real number), whereinAnd 1≤iF≤Fj, when opt is replaced with mean, std, max or min, thenDefinition is correspondingWith
    Then to calculating the sequence of characteristic statistics value, using K-means algorithms (hereinafter referred to as clustering algorithm) to N number ofCarry out Cluster, determines characteristic statistics value;The stationary value of feature vector element is calculated according to characteristic statistics value, so that it is determined that invariant feature is first Element;Then preferable statistical value is calculated by self-adaption cluster algorithm according to characteristic statistics value and invariant feature element;Then root again The preferable statistical value threshold value of each feature is calculated according to characteristic statistics value and preferable statistical value.
  5. 5. the textile flaw detection method based on peak value coverage values and composite character, its feature exist as claimed in claim 4 In:The segmentation of step 4 test sample map grid specifically includes:To a secondary given test sample, repeat step 2.1 to step 2.3 Calculate, difference lies in the training sample involved in calculating is replaced with test sample, finally obtain the row framing bits of test sample PutWith column split positionAnd according toWithTest sample is divided into map grid.
  6. 6. the textile flaw detection method based on peak value coverage values and composite character, its feature exist as claimed in claim 5 In:The identification of step 5 flaw specifically includes:To any map grid of test sampleAccording to feature extracting method f1, f2…f|T|Meter Calculate feature vectorFor fjThe feature vector of calculatingAccording to step 3.2 and step 3.3 calculate preferable statistical value index k*With WithIf ThenLabeled as there is flaw, otherwise labeled as indefectible;When all map grids are based on fjMark terminate, check every It is a to have flaw map grid Ll8 face domainThe mark of interior map grid, if in the presence of map grid of having no timeThen judge Whether set up, marked if setting upTo have flaw and makingAnd d is calculated as followsl+1, Continue checking forThe mark of interior map grid simultaneously repeats the above steps until dl+1For
    Wherein threshold coefficient0 < γ≤1,L1Expression is based on fjMark terminate obtain have free time figure Lattice;When dynamic threshold isWhen, it is testing result all to have the ranks index that free time map grid includes pixel.
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
CN106770323B (en) The textile flaw detection method filtered based on hierarchical clustering and Gabor
Jia et al. Fabric defect inspection based on lattice segmentation and Gabor filtering
Ng et al. Patterned fabric inspection and visualization by the method of image decomposition
CN107274385A (en) Textile flaw detection method based on class grid pattern and its Gabor characteristic
CN107248152A (en) Textile flaw detection method based on class grid pattern and its area features
CN110245593A (en) A kind of images of gestures extraction method of key frame based on image similarity
CN107895371A (en) Textile flaw detection method based on peak value coverage values and Gabor characteristic
Cetinic et al. Automated painter recognition based on image feature extraction
CN111862027B (en) Textile flaw detection method based on low-rank sparse matrix decomposition
CN103218832A (en) Visual saliency algorithm based on overall color contrast ratio and space distribution in image
CN107945164B (en) Textile flaw detection method based on peak threshold, rotational alignment and composite character
Rezaei et al. Texture classification approach based on combination of random threshold vector technique and co-occurrence matrixes
CN111091134A (en) Method for identifying tissue structure of colored woven fabric based on multi-feature fusion
CN107977961B (en) Textile flaw detection method based on peak value coverage values and composite character
Jia et al. Fabric defect inspection based on lattice segmentation and lattice templates
CN101996322B (en) Method for extracting fractal detail feature for representing fabric texture
Krishnan et al. Performance analysis of texture classification techniques using shearlet transform
CN101976441B (en) Method for extracting Sobel operator filtering profile for representing fabric texture and fractal detail mixed characteristic vector
CN109507193A (en) A kind of fabric defects detection method based on local contrast enhancing and binary pattern
CN107967680B (en) Textile flaw detection method based on peak threshold and composite character
Jiang et al. Automatic identification of jacquard warp-knitted fabric patterns based on the wavelet transform
Mohanty et al. Detection and classification of fabric defects in textile using image mining and association rule miner
CN107945165B (en) Textile flaw detection method based on peak value coverage values and areal calculation
CN103530647A (en) Texture classification method on basis of fractional Fourier transform (FrFT)
Liu et al. Double sparse low rank decomposition for irregular printed fabric defect detection

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