CN107977961B - 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
CN107977961B
CN107977961B CN201711188212.7A CN201711188212A CN107977961B CN 107977961 B CN107977961 B CN 107977961B CN 201711188212 A CN201711188212 A CN 201711188212A CN 107977961 B CN107977961 B CN 107977961B
Authority
CN
China
Prior art keywords
map grid
value
index
peak value
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711188212.7A
Other languages
Chinese (zh)
Other versions
CN107977961A (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 grayscale information based on textile surface flat under lighting source, divide the image into the grid not overlapped, calculate the IRM of each grid, HOG, GLCM and Gabor characteristic value are automatically positioned textile surface flaw according to feature Distribution value.The present invention is especially suitable for the textile surface flaws being automatically identified in the textile flat surfaces gray-scale image acquired under steady illumination light source.

Description

Textile flaw detection method based on peak value coverage values and composite character
Technical field
The present invention relates to textile Defect Detection technical fields, special based on peak value coverage values and mixing more particularly to one kind The textile flaw detection method of sign.
Background technique
Traditional textile flaw manual identified accuracy rate only have 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 generates (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) 18781894.), for generate the pattern of 2 d texture be known as map grid (1attice) (referring to https: // En.wikipedia.org/wiki/Wallpaper_group), pattern is known as motif inside map grid.Most textile flaws are certainly Dynamic detection method can only handle p1 type in wallpaper group textile images (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 other than p1 type 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 procedure (Elo rating method, hereinafter referred to as ER) (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 other than p1, But their calculation method is 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 priori knowledges The degree of automation of machine recognition textile flaw is reduced to a certain extent.
Summary of the invention
The technical problems to be solved by the present 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, and main includes designing one kind automatically Segmentation textile images are the method for map grid and design a kind of flaw recognition methods based on map grid and map grid areal calculation.
It is cheer and bright to make to state, existing centralized definition partial symbols according to the present invention and concept.
Indicate Positive Integer Set.Indicate the integer set including zero.Indicate the positive real number set including zero.Table Show the real number set including zero.Indicate that element number isReal vector.Indicate plural number set.Indicate element number ForComplex vector.T representing matrix or vector transposition.Indicate the real matrix of n × m size, wherein Indicate k × n × m size real matrix, whereinIfAndThen AI:Indicate square The i-th row of battle array A, A:, jThe jth of representing matrix A arranges.
IfAndThen AL::Indicate the l layer matrix that size is n × m in A, AL, i:Table Show the i-th row of the l layer matrix that size is n × m in A, AL:, jIndicate the jth column for the l layer matrix that size is n × m in A.
Indicate ratioSmall maximum integer, such as
{aiIndicate by index i determine by element aiThe set or multiset of composition.
| S | indicate the element number in set S, if S is vector, | S | indicate element number contained by vector, | S | it is known as Vector length.
Avg (S) or mean (S): the mean value of set of computations or multiset S, the element of S are real number.
Std (S): the standard deviation of set of computations or multiset S, the element of S are real number.
Med (S): the median of set of computations or multiset S, the element of S are real number.
Mod (S): the mode of multiset S is calculated, the element of S is real number.
Set or the element maximum value of multiset S, such as max (I are found out in max (S) expressionc) represent IcThe maximum of middle pixel Gray value.
Max (s " condition) indicates to find out qualifiedMaximum value.
Set or the element minimum value of multiset S, such as min (I are found out in min (S) expressionc) represent IcThe minimum of middle pixel Gray value.
arg maxsF (s) is indicated 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 indicated 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) it indicates in function f1And f2Domain intersection internal variable s value range in so that Function f1(s) and f2(s) s being maximized.
Indicate 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) indicate corresponding multiset { aiMode mod ({ ai) index.
dimx(I) total line number of two-dimensional image I, dim are indicatedy(I) total columns of I is indicated.
Image origin: the position that pixel column column index starts in image, the hypothesis on location is in the image upper left corner and value is (1,1).
I (x, y) indicates the pixel value with ranks index (x, y) in two-dimensional image I.Line indexBy image original Point starts to be incremented by downwards with 1 for step-length, 1≤x≤dimx(I);Column indexBy image origin using l as step-length to the right It is incremented by, 1≤y≤dimy(I)。
Image boundary: there is line index dimx(I) row and column indexes dimy(I) column.
Textile images cartoon ingredient 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 31 (6) 2012Article 139 of Transactions on Graphics) to generate the edge clear based on I but texture fuzzy Gray level image Ic, IcReferred to as textile images cartoon ingredient.
Binaryzation textile images Itc: use Bradley method (Bradley D., Roth G., Adaptive 12 (2) 200713- of Thresholding Using the Integral Image, Journal of Graphics Tools 21) binaryzation IcAnd according to step 1.1 to the I of binaryzationcCarry out noise reduction, the two-value obtained after two value object of suppressing exception area Image, wherein foreground pixel value is 1, background pixel value 0.
Two value object mass centers: ItcIn the included foreground pixel image line index of two value objects average value and column index it is flat Mean value.
It indicates to be linked in sequence by operand and generates 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,
It indicates by element vector multiplication, such as vector v1=[5 0.9 4]T, v2=[1 0 1]T, then
Wherein
Map grid indexes (ir, ic): after image segmentation is 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.Indicate 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 and columns contained by map grid.
Map grid texture type: the type of map grid texture is generated based on map grid segmentation and textile gray level image, as occupied in Fig. 6 In image according to map grid segmentation produce 5 × 7 map grids, according to the texture of map grid, 35 map grids can be divided into 3 classes.
Map grid matrix: the matrix as unit of map grid, i.e., each element is a map grid in matrix.As every in Fig. 7 A image includes 2 × 2 map grid, and corresponding one 2 × 2 map grid matrix, i.e., element index is identical as map grid index in matrix.
Eigenmatrix: using feature extracting method calculate map grid matrix in each element feature vector, with feature to Amount is that unit forms matrix, 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-picture I1, I2...INResolution ratio it is identical, all images according to map grid segmentation generate figure Check manages type and its quantity is all identical, if map grid texture species number isAnd do not consider shape distortion and illumination variation etc. Under the factor for influencing image sampling, the i-th sub-picture IiIn map gridWithWithTexture phase Same and L1,1, L2,1...LT, 1Texture be all different, whereinSuch as attached four sub-pictures I shown in Fig. 71, I2, I3With I4Divided according to map grid, each image generates 4 map grids, and the map grid of four sub-pictures only has 2 kinds of texture types, and arrangement mode is equal Meet above-mentioned condition.IiReferred to as training sample.Training sample is flawless image, and training sample set only includes flawless image, and nothing Flaw image is also only present in training sample concentration.
Test sample collection: similar with training sample set, all image resolution ratios are identical, and the figure generated according to map grid segmentation Check manages type and its quantity is all identical, consistent described in arrangement mode and the training sample set definition of each image map grid, Unlike training sample set, the image that test sample is concentrated contains position at random and texture is not belonging to map grid texture type 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 flaw figure Picture, what test sample concentration included is all to have flaw image.
Feature extracting method title ordered set T: feature extracting method f is indicated1, f2...f|T|Name set, such as T ={ HOG, LBP }, then | T |=2 and f1Indicate HOG method, f2Indicate LBP method.
On the basis of being as defined above, the technical solution adopted by the present invention to solve the technical problems is: one kind being 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 (hereinafter referred to as flawless image) segmentation map grids and calculates parameter needed for flaw identifies; The parameter that test phase is obtained according to the training stage map grid segmentation is carried out to a secondary textile images and judge map grid whether include Flaw, finally label 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: the segmentation of step 4 test sample map grid, 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 a characteristic that relative to textile images Row and column, map grid is transversely arranged according to the direction of image line, and by column direction longitudinal arrangement;In Ic, part map grid has Geometry and and background pixel there were significant differences in gray scale.
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 ingredient of textile gray level image I according to RTV model, using Bradley method binaryzation Cartoon ingredient is tracked by morphological erosion and expansive working to binaryzation cartoon ingredient noise reduction using Moore-Neighbor Algorithm obtains binaryzation IcIn two value objects, calculate binaryzation cartoon ingredient in two-value object area, delete the area area Bu 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 arranges every row background 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 pixel rowPeak value, will Peak value by itsIn index ascending order arrange to obtain peak value sequenceFor prInA peak valueIt calculates according to the following formulaCoverage values
Similarly, it calculatesPeak value sequenceIt calculatesWhereinCalculate pr The ordered set of middle peak value coverage valuesDescending arranges middle element by size;ForIn first of element Meet in peak value sequence'sOrdered set is known as l grades of peak valuesL grades Element in peak value by itsIn index ascending order arrangement;For l grades of peak values, calculates each peak value and its previous peak value existsIn index difference absolute value, calculate the median of these absolute valuesAnd its frequency of occurrence Group At set Composition set Middle element value composition setSimilarly, according toAnd pcIt calculates and meets'sOrdered set " the l ' grade peak value " Before calculating in the l ' grade peak value Element exists afterwardsIn index difference absolute value and its medianWith median frequency of occurrence Form multiset Form multiset Middle element value forms set
Step 1.3 calculates map grid ideal dimensions.To the I of training sample set1, I2...INIn i-thTraining sample Ii, I is calculated according to step 1.2i'sWith It calculatesValue setIi's Ideal line numberIt is defined by the formula.
Wherein, 6 be Dirac delta function (Dirac delta function).I.e. m isIn an element, IiIdeal columnsCalculate withIt is similar, i.e., the item with subscript r in above formula is replaced with into the correspondence with subscript c , such asIt replaces withMap grid ideal dimensions are defined asMedianWithMedian
I of the step 2 to training sample set1, I2...INCarry out map grid segmentation.For i-th of training sample Ii, the step packet Include three sub-steps: the projection of step 2.1 background pixel, 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.1WithIt calculates defined in step 1.2WithAndWithAccording to step 1.3 are calculatedWithIt is calculated as followsThere is most frequentGrade peak value
Similarly, it can calculateThere is most frequentGrade peak value, i.e., replace with the item in above formula with subscript r Respective items with subscript c, such asIt replaces withAssuming that theThere are a string of continuous peak values in grade peak value And each peak value and previous peak value existIn index difference absolute value it is closeThen this string peak value existsIn index be defined as Row initial segmentation position Sr, this string peak value is theIndex in grade peak value meets following formula definition.
Wherein dj+kIndicate theGrade peak value in index be j+k and j+k-1 two peak values itsThe difference of middle index it is exhausted To value,And 0 < β < 1 be parameter.Column initial segmentation position ScIt is relevantWithDefinition withWithIt is similar, i.e., will Item with subscript r in above formula replaces with the respective items with subscript c, such asIt replaces withAnd And dj+kIs indicated at this timeGrade peak value in index be 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 division position, at once division positionWith column split positionFor i-th of trained sample This Ii,WithInitial value be respectively step 2.2 calculate IiRow initial segmentation position SrWith column initial segmentation position Sc.It willIn element by size ascending order arrange, find out least member thereinAnd greatest memberFour predictions are calculated as follows PositionWith
I is obtained by step 1.1iBinaryzation textile imagesAnd it is updated by following three kinds of situationsWith
The first situation: ifIt calculatesMiddle line index x meetsTwo-value pair As the average value of mass centerAndMiddle line index x meetsTwo value object mass centers average valueThenIt is added toNew element and becomeIt is recalculated according to definitionWith
Second situation: ifIt calculatesMiddle line index x meetsTwo-value pair As the average value of mass centerThenIt is added toNew element and becomeIt is recalculated according to definition
The third situation: ifThen terminate calculating.
Repeat the calculating of above-mentioned three kinds of situations untilWithUntil being no longer changed.Similarly, by following Three kinds of situations update With
The first situation: ifIt calculatesMiddle line index x meets Two value object mass centers average valueAndMiddle line index x meetsTwo value object mass centers Average valueThenIt is added toNew element and becomeIt is recalculated according to definition With
Second situation: ifIt calculatesMiddle line index x meets Two value object mass centers average valueThenIt is added toNew element and becomeIt is counted again according to definition It calculates
The third situation: ifThen terminate calculating.
Repeat the calculating of above-mentioned three kinds of situations untilWithUntil being no longer changed, at this timeCalculating Terminate.Calculating it is similarIt willIn element by size ascending order arrange, find out least member thereinAnd greastest element ElementAccording toWithThree kinds of situations being related to are updated to updateWithIt i.e. will be every in three kinds of situations Superscript r replaces with c, such asIt replaces withThe x in inequality and formula is replaced with into y simultaneously, such asIt replaces withAccording toWithThree kinds of situations being related to are updated to updateWithIt i.e. will be each in three kinds of situations The superscript r of item replaces with c, such asIt replaces withThe x in inequality and formula is replaced with into y simultaneously, such as It replaces withAccording toWithThe row and column index separately included, by IiIt is split by the row and column where these indexes, Dividing resulting rectangular area is map grid, is defined as follows.
WhereinWithIndicate 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 period, step The ideal statistical value and step 3.3 of 3.2 calculating each features of map grid calculate the ideal statistical value threshold value of each feature.
Step 3.1 calculates the map grid period.For training sample set I1, I2...INInA instruction Practice sample Ii, available according to step 1 and step 2WithAccording toWithBy IiIt is divided into m × n map gridI is calculated using HOG feature extracting methodiMap gridFeature vector and make feature vector It is identical to index corresponding map grid index.It calculatesWith i-thrThe Euclidean distance of all map grids in row, by the involved figure of calculating The column index ascending order of lattice arranges, then may make up distance vector.ForIt willCorresponding distance vector presses icAscending order arranges To i-thrCapable n × n distance matrix.ForBy i-thrCorresponding n × n the distance matrix of row presses irAscending order arranges to obtain IiRow Distance matrixSimilarly, I can be calculatediColumn distance matrixTo vector Fourier transform is carried out, is obtainedPeriod and frequency spectrum.According to( With) period and frequency spectrum, calculating cycle median and frequency spectrum median, i.e. image line period and image line frequency spectrum.Similarly, I can be constructediColumn distance matrixAnd calculate image column period and image column frequency spectrum.According to I1, I2...IN, N number of image line period and corresponding N number of image line frequency spectrum can be calculated, image line frequency spectrum median is calculatedIt finds out and is higher thanFigure As the line frequency spectrum corresponding image line period, the median in these image lines period is calculatedTo image column period and image column frequency Spectrum repeats same steps and obtains image column frequency spectrum medianWith image column period medianIfOrOrThen t value is 1, otherwise by comparingWithCorresponding frequency spectrum size determines the value of t, it may be assumed that if Then t takesOtherwise t takes
The ideal statistical value of step 3.2 calculating 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 meter Calculate ideal statistical value.
Step 3.2.1 calculates characteristic statistics value, calculates training sample set I according to step 3.11, I2...INThe map grid period t.For i-th of training sample Ii, I is divided according to step 2iObtain map gridPass through | T | it is a that (T is characterized extracting method name Ordered set) input is referred to as 2-D gray image matrix and output is the feature extracting method f of one-dimensional real vector1, f2...f|T|Meter Calculate IiMap gridFeature vectorBased on fjFeature vector length be defined as fj's Characteristic element prime number Fj.According to assumed condition and map grid period t, IiIn map gridWith With's Texture is identical and L1,1, L2,1...LT, 1Texture be all different, whereinTherefore there are the different map grids of t class texture simultaneously And theClass map grid is i-thrCapable and (ir+l1T) column index of row is identical, therefore column index is identical Kth class map grid can index ascending order by ranks and form map grid matrix.For kth class map grid, at most there is 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
Wherein Indicate that map grid L is i-thtA map grid matrixArbitrary element,Indicate 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
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) is defined as follows.
For f1, f2...f|T|, it can obtain corresponding d (1), d (2) ... d (| T |).For kth class map grid texture and j-th Feature 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 ofIt is clustered, clustering algorithm classification parameter is set as t, obtains t class Other centerForCalculate according to the following formula fromClass label corresponding to nearest class center u*
IfWhereinIt indicates in the classification in the classification of t clustering algorithm generation with most element numbers The heart then exchanges 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.
For indexing all fixed Combinations of k and j, for eachIt repeats above-mentionedu*WithCalculating and judgementIt is whether true, 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.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) forIt all sets up, then retains the exchange of features described above statistical value as a result, otherwise by characteristic statistics value Sequence is restored to the 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 nfPredefined minimal characteristic vector length is indicated, then working as nf< FjWhen establishment, using adaptive K-mean algorithm (Adaptive K-means) algorithm (Jia L., Liang J., Fabric defect inspection based on Isotropic lattice segmentation, Journal ofthe 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 will be certainly Classification that clustering algorithm generates is adapted to by positive integer number consecutively since 1, i-thFA stationary value s(j, k)(iF) generic Number is denoted as Ls(iF), then these number definition set Ls.If defining 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.
Indicate the preceding n for arranging the classification that self-adaption cluster algorithm generates by its number of elements descendingfA classification Number set.It 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 ideal 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 It is clustered, if self-adaption cluster is calculated The classification that method generates is by the positive integer number consecutively and i-th of vector since 1Generic number is denoted asThen these number definition setFor A classification, kth class Map grid texture is based on fjIdeal statistical valueIt is defined as follows.
Expression belongs to kth class map grid texture and is based on fjI-thuIn the characteristic statistics value of a subclass map grid texture The average value of value.For indexing all fixed Combinations of k and j, repeat above-mentionedCalculating.
Step 3.3 calculates the ideal 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 ideal statistical value of a subclass map grid textureIt is (i.e. solid Standing wire draws j, k and iu).For any map grid L that any training sample is generated by step 2, according to its feature vector fj(L) it presses Formula calculates ideal statistical value and indexes k*With
ForThere may be multiple L, its ideal statistical value index meets k*=k andThese map grids composition SetWhenWhen establishment, the kth class map grid texture based on j-th of feature extracting method can be calculated as follows I-thuThe maximum distance of a subclass map grid textureI.e. ideal statistical value threshold value.
For indexing j, k and iuAll fixed Combinations, repeat it is above-mentionedCalculating.
The segmentation of step 4 test sample map grid.To a secondary given test sample, the meter of step 2.1 to step 2.3 is repeated It calculates, distinguishes the training sample involved in being to calculate and replace with test sample, finally obtain the row division position of test sampleWith column split positionAnd according toWithTest sample is divided into map grid.
The identification of step 5 flaw.To any map grid of test sampleAccording to feature extracting method f1, f2...f|T|It calculates Feature vector For fjThe feature vector of calculatingAccording to step 3.2 and step Rapid 3.3, which calculate ideal statistical value, indexes k*WithWithIfThenLabeled as there is flaw, otherwise labeled as indefectible.When all map grids are based on fjLabel terminate, check each there is a flaw figure Lattice Ll8 face domainThe label of interior map grid, if it exists flawless map gridThen judgeIt is No establishment marks if setting upTo have flaw and enablingAnd d is calculated as followsl+1, continue checkingIt is interior The label of map grid simultaneously repeats the above steps until dl+1For
Wherein threshold coefficientL1It indicates to be based on fjLabel terminate obtain have the flaw Map grid.When dynamic threshold isWhen, all having the ranks index of the included pixel of flaw map grid is testing result.
The beneficial effects of the present invention are: a kind of textile flaw based on peak value coverage values and composite character provided by the invention Defect detection method, this method are analyzed the Pixel of Digital Image grayscale information based on textile surface flat under lighting source, will be schemed As being divided into the grid not overlapped, the IRM of each grid, HOG, GLCM and Gabor characteristic value are calculated, 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 acquired under steady illumination light source to put down Textile surface flaw in smooth surface gray-scale image.
Detailed description of the invention
Present invention will be further explained below with reference to the attached drawings and examples.
Fig. 1 is the main-process stream signal of the textile flaw detection method of the invention based on peak value coverage values and composite character Figure;Fig. 2 is that the process of step 1.1 in the textile flaw detection method of the invention based on peak value coverage values and composite character is shown It is intended to;Fig. 3 is the calculating of step 1.2 in the textile flaw detection method of the invention based on peak value coverage values and composite character The flow diagram of column initial segmentation position;Fig. 4 is the textile flaw of the invention based on peak value coverage values and composite character The calculating of step 2.3 arranges the flow diagram of final division position in detection method;Fig. 5 is of the 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 flawless 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 calculating the ideal statistical value threshold value of 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 step 2.3 meter Calculate final division 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 ideal statistical value algorithm flow chart is calculated;Figure 25 is the ideal statistical value thresholding algorithm process that step 3.3 calculates each feature Figure;Figure 26 is step 4 test sample map grid flow chart of segmentation algorithm;Figure 27 is step 5 flaw recognizer flow chart.
Specific 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 Basic structure of the invention, therefore it only shows the composition relevant to the invention.
The embodiment of calculation method of the present invention is completed by writing computer program, and specific implementation process is related to customized 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 the following steps are included:
Step 1: parameter needed for map grid is divided is calculated according to a series of flawless images, to determine map grid ideal dimensions;
Step 2: according to the map grid ideal dimensions obtained in step 1, map grid segmentation being carried out to training sample set, is trained Sample map grid;
Step 3: using feature extracting method calculate step 2 in map grid segmentation generate training sample map grid feature to Amount, to calculate ideal statistical value and ideal system that training sample concentrates the map grid period of flawless image, each feature of map grid Evaluation threshold value;
The test phase the following steps are included:
Step 4: the segmentation of test sample map grid, to a secondary given test sample, according to the method for step 2 to test sample Map grid segmentation is carried out, test sample map grid is obtained;
Step 5: the ideal of the feature vector of test sample, map grid period, each feature of map grid is calculated according to the method for step 3 Statistical value and ideal statistical value threshold value, and calculated result is compared with ideal statistical value threshold value, it is defective to identify Map grid.
The sequence and logical relation of this method are detailed in Fig. 1.
Explanation is unfolded to this five steps individually below.
1, the training stage
Training stage calculates parameter needed for map grid is divided according to a series of flawless textile gray level images first, then to nothing Flaw image carries out map grid segmentation and calculates parameter needed for test phase.Training stage includes three steps: step 1: calculating map grid Partitioning parameters, step 2: the segmentation of training sample map grid, step 3 calculate test phase parameter.Map grid segmentation side proposed by the present invention The parameter that method is obtained according to step 1.3 divides map grid by step 2.1 to step 2.3.
Step 1 schemes a lattice partitioning parameters for calculating, which specifically includes three sub-steps, i.e. step 1.1: background picture Element projection;Step 1.2: calculating peak value coverage values;Step 1.3: calculating map grid ideal dimensions.
Step 1.1, visible Fig. 2 of detailed process.For a width textile gray level image I, according to RTV model calculate cartoon at Divide Ic, I is obtained by Bradley methodcBianry image, attached drawing 2 illustrates in binarization and calculated by Bradley method The pixel threshold schematic diagram arrived, i.e. IcMesh figure 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 It makes an uproar, then using Moore-Neighbor track algorithm, (Moore-Neighbortracing algorithm comes 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 binaryzation I after noise reductioncIn Two value objects, i.e., 8 connection foreground pixel regions, calculate two value objects area, i.e. the foreground pixel number of two value objects. It is distributed according to two-value object area, obtains area median ma, by all areas not in section ((1- α) ma, (1+ α) ma) Two interior value objects are from binaryzation IxMiddle deletion obtains binaryzation textile images Itc,For the parameter being manually specified, take Value range is 0≤α≤1, and this method takes α=0.6.Calculate ItcIn every row background pixel number and arrange to obtain by line index ascending order The projection of background pixel rowCalculate ItcThe background pixel number of middle each column simultaneously is arranged to obtain background pixel column projection by column index ascending orderOne-dimensional waveform in attached drawing 2 isWithStep 1 algorithm flow is detailed in Figure 11.
Step 1.2 part process is detailed in Fig. 3, and for two-dimentional textile gray level image, initial segmentation position includes that row is initial Division position and column initial segmentation position, Fig. 3 show only the conceptional flowchart for calculating column 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, as Fig. 2 is one-dimensional The dark dot of waveform, and pressThe index ascending order of middle peak value arranges to obtain peak value sequenceFor prInA peak valueIt calculatesCoverage valuesIt is defined as follows.
It is conceptive,It indicates in prIn fromTwo sides start to prIt moves, is greater than not encountering end to endPeak value The number of preceding passed through peak value, as shown in Fig. 3, the peak value with identical coverage values are indicated with the triangle of same color.Class As, it calculatesPeak value sequenceAnd it calculatesWherein
For prOr pc, coverage values often take limited 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 to l A coverage values valuepcMiddle coverage valuesPeak valueReferred to as l grades of peak values, l grades of peak values press it ?In index ascending order arrangement.Adjacent peak in l grades of peak values is calculated to existIn index spacing d (i.e. each peak value with before One peak value existsIn index difference absolute value), the median of computation index spacingAnd its frequency of occurrenceForIn each element, all there is the median and its frequency of occurrence of adjacent index spacing, the value of these medians then formed SetSimilarly, it calculatesWithStep 1.2 algorithm flow is detailed in 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 IiIdeal line numberIt is fixed Justice is as follows.
Wherein δ is Dirac delta function (Dirac delta function).The ideal columns of IDefinition withClass Seemingly, only need byItem with subscript r in definition replaces with the respective items with subscript c, such asReplacement ForMap grid ideal dimensions are defined asMedianWithMedianStep 1.3 algorithm flows are detailed in Figure 13.
The calculating process of step 2.1 includes step 1.1 and step 1.2.Step 2.1 algorithm flow is detailed in Figure 14.
Step 2.2 calculates initial segmentation position, and process is detailed in Fig. 3.For i-th of training sample Ii, counted according to step 2.1 It obtainsWithIt calculates defined in step 1.2WithAnd WithIt is calculated according to step 1.3WithIt is calculated as followsThere is most frequentGrade peak value
WhereinWithIt respectively indicates and is projected according to background pixel rowPeak value sequence it is calculated Coverage values value set, l grades of peak values index spacing median, and l grades of peak values index spacing median frequency of occurrence and own 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 asIt replaces with
Assuming that theThere is a string of continuous peak values and each peak value in grade peak value to exist with previous peak valueIn index difference Absolute value is closeThen this string peak value existsIn index be defined as row initial segmentation position Sr, this string peak value is theGrade peak value In index meet following formula definition.
Wherein dj+kIndicate theGrade peak value in index be j+k and j+k-1 two peak values itsThe difference of middle index it is exhausted To value,And 0 < β < 1 be parameter, this method takes β=0.1.Column 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 asIt replaces It is changed toAnd dj+kIs indicated at this timeGrade peak value in index be j+k and j+k-1 two peak values itsMiddle index Absolute value of the difference.Parameter beta pairWithCalculating it is general.Step 2.2 algorithm flow is detailed in Figure 15.
Step 2.3 process is detailed in attached drawing 4, which, which shows 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 ScCover only image section Region (S at oncerMinimum and maximum value between image line index account for 80% or less or S of all image line indexcMinimum Image column index between maximum value accounts for the 80% of all image column indexes, does not either way include 80%), so needing Extend SrAnd Sc.For i-th of training sample Ii,And ScInitial value be respectively step 2.2 calculate IiSrAnd Sc.It 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 it is updated by following three kinds of situationsWith
The first situation: ifIt calculatesMiddle column index y meetsTwo-value pair As the average value of mass centerAndMiddle column index y meetsTwo value object mass centers average valueThenIt is added toNew element and becomeIt is recalculated according to definitionWith
Second situation: ifIt calculatesMiddle column index y meetsTwo-value pair As the average value of mass centerThenIt is added toNew element and becomeIt is recalculated according to definition
The third situation: ifThen terminate calculating.
Repeat the calculating of above-mentioned three kinds of situations untilWithUntil being no longer changed.Similarly, by following Three kinds of situations update With
The first situation: ifIt calculatesMiddle column index y meets Two value object mass centers average valueAndMiddle column index y is full ofTwo value object mass centers Average valueThenIt is added toNew element and becomeIt is recalculated according to definitionWith
Second situation: ifIt calculatesMiddle column index y meets Two value object mass centers average valueThenIt is added toNew element and becomeIt is counted again according to definition It calculates
The third situation: ifThen terminate calculating.
Repeat the calculating of above-mentioned three kinds of situations untilWithUntil being no longer changed, at this timeCalculating Terminate.Calculating it is similarIt willIn element by size ascending order arrange, find out least member thereinAnd greastest element ElementAccording toWithThree kinds of situations being related to are updated to updateWithIt i.e. will be every in three kinds of situations Superscript c replaces with r, such asIt replaces withThe y in inequality and formula is replaced with into x simultaneously, such asIt replaces withAccording toWithThree kinds of situations being related to are updated to updateWithIt i.e. will be each in three kinds of situations The superscript c of item replaces with r, such asIt replaces withThe y in inequality and formula is replaced with into x simultaneously, such as It replaces withAccording toWithThe row and column index separately included, by IiIt is split by the row and column where these indexes, Dividing resulting rectangular area is map grid, is defined as follows.
WhereinWithIndicate the index of map grid arrangement position in I.Such as 2 lower left corner legend of attached drawing, in the legend Upper left corner map grid is denoted as L1,1, L1,1The adjacent map grid in right side is L1,2, L1,1The adjacent map grid in downside is L2,1, and so on.Map gridBy including in IRow, and comprisingColumn determine map grid boundary.Step 2.3 algorithm flow is detailed in Figure 16.
Step 3 calculates test phase parameter.The step includes three sub-steps, i.e. step 3.1 calculates map grid period, step The ideal statistical value and step 3.3 of 3.2 calculating each features of map grid calculate the ideal statistical value threshold value of each feature.
Step 3.1 calculates map grid cyclic flow and is detailed in Fig. 5.According to training sample set I1, I2...INIt can be calculated with step 1.3 Map grid ideal dimensions line numberAnd columnsAgain by step 2 segmentation theA training sample IiObtain Ii's M × n map grid.Assuming that in IiEvery 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 ' value is known as map grid period t.Such as when 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 method) calculating IiThe feature vector of map grid simultaneously makes feature vector rope It is identical to draw corresponding map grid index, i.e., arranges feature vector corresponding to map grid by the arrangement mode of map grid.For Ii's Map gridIt calculatesWith i-thrThe Euclidean distance of all map grids in row, by the involved figure of calculating The column index ascending order of lattice arranges, 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 related fixed map grid column index ascending order is calculated, It then obtains based on i-thrDistance matrix is pressed i by capable n × n distance matrixrAscending order arrangement, 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 be obtained's Period and frequency spectrum, this period and frequency spectrum are defined as IiThe row period and line frequency spectrum, calculate all 1≤l1≤ m and 1≤l3≤n CorrespondingThe row period and line frequency compose and calculate row period median and line frequency spectrum median, gained median is fixed respectively Justice is image line period and image line frequency spectrum.Similarly, according to column distance matrix D(c), I can be calculatediThe column period and column frequency Spectrum, and calculate corresponding image column period and image column frequency spectrum.Attached drawing 5 illustrates I1, I2...INThe row period and line frequency spectrum Conceptual two dimension scatter plot arranges the conceptual two-dimentional scatter plot of period and column frequency spectrum.According to I1, I2...IN, N number of image can be calculated Row period and corresponding N number of image line frequency spectrum calculate image line frequency spectrum medianIt finds out and is higher thanImage line frequency spectrum institute it is right In the image line period answered, calculate the median in these image lines periodImage column period and image column frequency spectrum are repeated to be synchronised Suddenly image column frequency spectrum median is obtainedWith image column period medianIfOrOrThen t takes Value is 1, otherwise by comparingWithCorresponding frequency spectrum determines the value of t, it may be assumed that ifThen t takesOtherwise t takesStep 3.1 algorithm flows are detailed in Figure 17, and Figure 18 indicates that algorithm A.1 flow chart, Figure 19 indicate that algorithm A.2 flow chart, Figure 20 indicate algorithm A.3 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 ideal statistical value.
Step 3.2.1 calculates the characteristic statistics value of each flawless textile gray level image, in detail as shown in Figure 6.According to above-mentioned Step calculates training sample set I1, I2...INMap grid period t, i.e. the arrangement regulation of the identical map grid of texture.ForSecondary flawless image Ii, it can be divided into the different map grid of t class texture, i-thrRowClass map grid and (ir+ t) row such map grid map grid column index value it is identical, thus can be in IiIn only Access belongs to a kind of map grid, for kth class map grid, i-thrRow, (ir+ t) row, (ir+ 2t) row ..., such map grid can Matrix is formed, which is known as map grid matrix, and for kth class map grid, t i.e. C are at most may be present in map grid matrix1, C2...Ct.Such as Shown in Fig. 6, as t=3, the 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 row), C2It is made of the 3rd class map grid of the 5th row of the 2nd row, C3It is made of the 3rd class map grid of the 3rd row.Assuming that in the presence of | T | a input is two dimension Gray level image matrix and output are the feature extracting method f of one-dimensional real vector1, f2...f|T|, these feature extracting methods are for row The identical input picture of several and columns generates the identical feature vector of length, then IiIn map gridIt can be according to f1, f2...f|T|Calculate | T | a feature vector If IiThe size of all map grids is according to I1, I2...INPixel minimum line number n contained by middle map gridrWith minimum columns ncIt is adjusted, i.e., only retains in map grid the 1st row to n-thrRow With the 1st row to n-thcThe pixel of column, then IiMiddle any two map gridWithIt is based on Feature to It is identical to measure length, 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 the map grid Matrix C of such map grid1, C2...CtIt calculates and is based on fjFeature vector in it is each The mean value of elementStandard deviationMaximum valueAnd minimum valueThis 4 values are defined as IiCharacteristic statistics Value, that is, be defined by the formula.
Wherein Indicate that map grid L is i-thtA map grid matrixArbitrary element,WhereinIt indicates to be 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 flow is detailed in Figure 21.
Step 3.2.2 calculates the sequence of characteristic statistics value, in detail as shown in Figure 7, for illustrating the flawless image for training L1,1Texture difference.Although 11, I2...INFor the flawless sample of same training sample set, but the definition of training sample set is not protected Demonstrate,prove 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 Flawless image I1, I2, I3And I4, wherein I3Middle L1,1Texture and first map grid texture in other samples it is different.If all The texture of first map grid of training sample is different, just needs to resequence then step 3.2.1 calculates characteristic statistics value.Such as figure Shown in 8, 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 and the sequence of other samples also different.If first map grid texture of all training samples It is all identical, then it is then nonsensical to sort.It is whether necessary in order to detect sequence, calculate training sample I1, I2...INBetween be based on fj'sThe Euclidean distance average value d (j) of (1≤i≤N, 1≤k≤t), is defined as follows.
For f1, f2...f|T|, it can obtain corresponding d (1), d (2) ... d (| T |), it correspondingly, can be again after completing sequence Calculate d ' (1) according to above formula, d ' (2) ... d ' (| T |), the relatively two groups of distance averages in front and back, if d (j) >=d ' (j) for 1≤ J≤| T | it all sets up, then retains ranking results, otherwise restore the state before sequence.The process that sorts is as shown in Figure 8.For kth class Map grid texture it is N number ofIt is vertical to use K-means algorithm (Jia L., Liang J., Fabric defect Inspection based on isotropic 1attice segmentation, Journal of the FranklinInstitute 354 (13) (2017) 5694-5738, hereinafter referred to as clustering algorithm) it is clustered, clustering algorithm class Other parameter is set as t, then obtains t class centerForCalculate according to the following formula fromNearest Class label u corresponding to class center*
IfWhereinThe center for indicating the class in t classification with most element numbers, 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.
For indexing all fixed Combinations of k and j, for eachIt repeats above-mentionedu*WithCalculating and judgementIt is whether true, 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 flow is 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 texture can count It calculates and is based on fjN × t group characteristic statistics value, forClass map grid texture, according to it? A elementWithI-thFA elementWherein FjForCharacteristic element prime number, can calculate kth class map grid texture be based on fjFeature Vector i-thFThe stationary value s of a 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(jk).If Parameter nfIndicate predefined minimal characteristic vector length, this method nfValue is nf=8, then working as nf< FjWhen establishment, application Adaptive K-mean algorithm (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 the classification that self-adaption cluster algorithm is generated by the positive integer number consecutively since 1 and I-thFA stationary value s(j, k)(iF) number 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,It indicates to include first prime number by the classification category that self-adaption cluster algorithm generates The preceding n that descending arrangesfThe number set of a classification.It willBy index iFAscending order arrangement then obtains kth class map grid line Reason is based on fjStability vectorFor indexing all fixed Combinations of 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 ideal 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 vectorIt, can be to vector by self-adaption cluster algorithmClustered, if the classification that self-adaption cluster algorithm is generated by from The 1 positive integer number consecutively started and theA vectorThe number of generic is denoted asThen these number definition setIn a practical situation, it may occur thatThe case where close to N, Therefore defined parametersIf U(j, k)> nK, then cluster, this method n are re-startedKValue 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-thuIn the characteristic statistics value of a subclass map grid texture The average value of value.For indexing all fixed Combinations of k and j, repeat above-mentionedCalculating.Step 3.2.4 algorithm flow is detailed As shown in Figure 24.
Step 3.3 calculates the ideal statistical value threshold value of each feature, in detail as shown in Figure 9.I is concentrated for training sample1, I2...IN, according to step 3.2.4 available theClass map grid texture is based on I-thu(1≤iu≤U(j, k)) a subclass map grid texture ideal statistical valueFor any training sample according to map grid point Any map grid L for cutting generation, can calculate based on fjFeature vector fj(L) and its Euclidean between all ideal statistical values away from From the index of ideal statistical value corresponding to wherein minimum range k can be found out*WithIt is defined as follows.
Therefore, f is based on for kth class map grid texturejI-thuThe ideal statistical value of a subclass map grid textureIt may There are multiple map grids and the relevant k* of map grid andWithIndex k and iuIt is identical, these map grids composition setWhenWhen establishment, it can calculateThe feature vector of middle map grid withMaximum distanceIt is defined as follows.
For indexing j, k and iuAll fixed Combinations, repeat it is above-mentionedCalculating.As ideal statistical value Threshold value, calculating process are as shown in Figure 9.In attached drawing 9, left side is the textile gray level image that map grid segmentation is completed, 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 VectorFor j-th of feature vectorCalculate k*WithAs a result comprising right Answering the image of map grid position gray scale color lump indicates, wherein dark gray scale color lump indicates small distance, it is digital from a left side on each color lump K is followed successively by the right side*WithForCorresponding index k and iu, delete correspondingStep 3.3 algorithm flow In detail as shown in Figure 25.
(2) test phase
On the parameter basis that the training stage obtains, test phase carries out flaw inspection to the sub-picture that test sample is concentrated It surveys and positions.Test phase includes two steps: the segmentation of step 4 test sample map grid and the identification of step 5 flaw.
The segmentation of step 4 test sample map grid.To a secondary given test sample, the meter of step 2.1 to step 2.3 is repeated It calculates, distinguishes the training sample involved in being to calculate and replace with test sample, finally obtain the row division 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.
The identification of step 5 flaw, process are as shown in Fig. 10.Given textile gray level image I secondary for one, is produced by step 4 The map grid of raw I, to any map grid in IAccording to feature extracting method f1, f2...f|T|It calculates| T | a feature vectorFor being based onFeature vectorCalculate step The ideal statistical value of 3.3 definition indexes k*WithAnd comparative feature value distanceWithSize, ifThenLabeled as there is flaw, otherwise labeled as indefectible.
When all map grids are based on fjLabel terminate, check each there is a flaw map grid Ll8 face domainThe mark of interior map grid Remember, if it exists flawless map gridThen compareWith dynamic threshold dlSize, ifThenIt is labeled as There is flaw and enablesAnd d is calculated as followsl+1, continue checkingThe label of interior map grid, and repeat the above steps Until the dynamic threshold newly calculated is
Wherein0 γ≤1 <, this method value are γ=0.93,L1It indicates to be based on fjLabel knot What beam obtained has flaw map grid.When dynamic threshold isWhen, all having the ranks index of the included pixel of flaw map grid is detection knot Fruit.Step 5 algorithm flow is in detail as shown in Figure 27.
High efficiency of the invention experiments have shown that:
Use the industry of Hong Kong University's Electrical and Electronic engineering department automatic in the Defect Detection recruitment evaluation of the method for the present invention Change 24 color textile product images that 247 width pixel sizes of laboratory offer are 256 × 256, in an experiment these image quilts Be converted to 8 gray level images.These images include three kinds of patterns: dot image, box-shaped image and star-shaped image, wherein dot Image includes that 30 indefectible and 30 width have flaw image;Box-shaped image includes that 30 indefectible and 26 width have flaw image;Star Shape image includes that 25 indefectible and 25 width have flaw image.Three kinds of patterns to have flaw image all include 5 kinds of flaw types: it is disconnected It holds (broken end), hole (hole), reticulate pattern (netting multiple), cord (thick bar) and stria (thin bar), the particular number of every kind of flaw type see Table 1 for details to table 3 first row, wherein dot image further includes a kind of flaw Defect line section (Knots).All flaw images have the flaw reference map (ground-truth image) of same size, flaw base Quasi- figure is 2 value images, wherein 1 indicates flaw, 0 indicates background.Algorithm for comparing includes WGIS, BB, RB and ER, these calculations The parameter setting and document (JiaL, Liang J., Fabric defect inspection based on isotropic of method Lattice segmentation, Journal of the Franklin Institute 354 (13) (2017) 5694- 5738) identical.Parameter selection of the method for the present invention based on the data set are as follows: 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 measured, indicates flaw in flaw reference map Pixel is correctly demarcated as the ratio of flaw by algorithm, and FPR, which is measured, indicates 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 algorithm output in flaw reference map, NPV measure algorithm Background proportion in the background of output in flaw reference map.For TPR, PPV and NPV, index 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) 943947) in find.The method of the present invention, The index calculating method and document (Jia L, Liang J., Fabric defect inspection of WGIS, BB, RB and ER Based on isotropic lattice segmentation, Journal of the Franklin Institute 354 (13) (2017) 5694-5738) it is identical.Experimental Hardware platform is the CoreTMi7-3610QM of Intel containing processor 230-GHz With the laptop of 8.00GB memory, software is Windows 10 and Maltab8.4.
Table 1 enumerates dot image Defect Detection as a result, wherein marking every row index value of flaw type is corresponding method To the index average value of all test sample operation results of the flaw type.According to 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 highest of BB, the global FPR of WGIS are also higher.Since high FPR (i.e. will not from erroneous detection pixel The pixel error for representing flaw is identified as representing the pixel of flaw), there are many erroneous detection pixel of BB and WGIS.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 compared, this The broken ends of fractured bone of inventive method, organizes striped and stria TPR is lower, but its TPR ratio is high in addition to BB, while FPR is lower.To sum up, originally Inventive method has optimal ACC and preferable TPR, while its FPR is very close to optimal value.
1 dot image Defect Detection result of table
Table 2 enumerates box-shaped image Defect Detection as a result, wherein marking every row index value of 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 ACC (0.98) is very close to optimal value (0.99) and has highest overall situation TPR (0.76), and overall situation TPR ratio is WGIS times high Global TPR (0.54) is much higher, but the global FPR of WGIS is very high.For each flaw type other than cord, side of the present invention The TPR of method is optimal.For cord, in method of the FPR lower 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) Yu suboptimum of the method for the present invention (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, and 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, wherein marking every row index value of 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, and 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 value is very close to optimal value (0).Optimal value based on all types of TPR of the method for the present invention and time The figure of merit FPR, all types of ACC have reached optimal.To sum up, it is compared with other methods, the method for the present invention is for all flaw classes Type all has inundatory optimal ACC and TPR, while very close figure 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
Taking the above-mentioned ideal embodiment according to the present invention as inspiration, through the above description, relevant staff Various changes and amendments can be carried out 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 the technical scope thereof is determined according to the scope of the claim.

Claims (5)

1. a kind of 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 images, hereinafter referred to as flawless figure Picture calculates parameter needed for map grid is divided, and then carries out map grid segmentation to flawless image and calculates needed for the identification of test phase flaw Parameter;Test phase, the parameter obtained according to the training stage carry out map grid segmentation to a secondary textile images and judge that map grid is No includes flaw, and finally label contains map grid defective;
The training stage the following steps are included:
Step 1: parameter needed for map grid is divided is calculated according to a series of flawless images, to determine map grid ideal dimensions;
Step 2: according to the map grid ideal dimensions obtained in step 1, map grid segmentation being carried out to training sample set, obtains training sample Map grid;
Step 3: the feature vector for the training sample map grid that map grid segmentation generates in step 2 is calculated using feature extracting method, from And calculate ideal statistical value and ideal statistical value threshold that training sample concentrates the map grid period of flawless image, each feature of map grid Value;
The test phase the following steps are included:
Step 4: the segmentation of test sample map grid carries out a secondary given test sample according to the method for step 2 to test sample Map grid segmentation, obtains test sample map grid;
Step 5: being counted according to the feature vector of the method calculating test sample of step 3, map grid period, the ideal of each feature of map grid Value and ideal statistical value threshold value, and calculated result is compared with ideal statistical value threshold value, to identify map grid defective;
Step 1 specifically includes the following steps:
Step 1.1: background pixel projection calculates the cartoon ingredient of textile gray level image I according to RTV model, using Bradley Method binaryzation cartoon ingredient, by morphological erosion and expansive working to binaryzation cartoon ingredient noise reduction, using Moore- Neighbor track algorithm obtains binaryzation IcIn two value objects, calculate binaryzation cartoon ingredient in two-value object area, delete Except area is not in section ((1- α) ma,(1+α)·ma) in two value objects obtain binaryzation textile images Itc, wherein ma For two-value object area median,And 0 < α < 1;Calculate ItcMiddle each row and column background pixel number is arranged by line index ascending order It arranges every row background pixel number and obtains the projection of background pixel rowBackground picture is obtained by column index ascending order arrangement each column background pixel number Plain row projection
Step 1.2: calculating peak value coverage values, calculate the background pixel row projection of textile gray level image IPeak value, by peak value It is projected by it in background pixel rowIn index ascending order arrange to obtain peak value sequenceFor prInA peak valueIt calculates according to the following formulaCoverage values
It is projected with background pixel rowCoverage valuesCalculation method is identical, and the item of subscript r in above formula is replaced with tool There are the respective items of subscript c, calculatesPeak value sequenceIt calculatesWherein1 ≤ipc;Calculate prThe ordered set of middle peak value coverage valuesDescending arranges middle element by size;ForIn first Element Meet in peak value sequence'sOrdered set is known as l grades of peak valuesElement in l grades of peak values by itsIn index ascending order arrangement;For l grades of peaks Value, calculates each peak value and its previous peak value existsIn index difference absolute value, calculate the median of these absolute valuesAnd its frequency of occurrence Composition setComposition setMiddle element value Composition setSimilarly, according toAnd pcIt calculates and meets'sOrdered set " the l ' grade peak Value "Front and back element in the l ' grade peak value is calculated to existIn index difference absolute value and wherein Place valueWith median frequency of occurrence 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 It calculatesValue setIiIdeal line numberIt is defined by the formula:
Wherein, δ is Dirac delta function,IiIdeal columnsCalculate withIt is similar, i.e., under having in above formula The item of footmark r replaces with the respective items with subscript c,It replaces withMap grid ideal dimensions are defined asMedianWithMedian
2. the textile flaw detection method based on peak value coverage values and composite character, feature exist as described in claim 1 In: step 2 specifically includes the following steps:
Step 2.1: background pixel projection, calculating process include 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 It calculates defined in step 1.2WithAndWithAccording to What step 1.3 was calculatedWithIt is calculated as followsThere is most frequentGrade peak value
Similarly, it can calculateThere is most frequentGrade peak value replaces with the item in above formula with subscript r under having The respective items of footmark c;
Assuming that theThere is a string of continuous peak values and each peak value in grade peak value to exist with previous peak valueIn index difference it is absolute Value is closeThen this string peak value existsIn index be defined as row initial segmentation position Sr, this string peak value is theIn grade peak value Index to meet following formula fixed:
Wherein dj+kIndicate theGrade peak value in index be j+k and j+k-1 two peak values itsThe difference of middle index it is absolute Value,And 0 < β < 1 is parameter;Column initial segmentation position ScIt is relevantWithDefinition withWithIt is similar, i.e., it will be upper Item with subscript r in formula replaces with the respective items with subscript c, and dj+kIs indicated at this timeIn grade peak value Index be j+k and j+k-1 two peak values itsThe absolute value of the difference of middle index;
Step 2.3: calculating final division position, at once division positionWith column split positionFor i-th of training sample Ii,WithInitial value be respectively step 2.2 calculate IiRow initial segmentation position SrWith column initial segmentation position Sc;It will In element by size ascending order arrange, find out least member thereinAnd greatest memberFour predictions are calculated as follows PositionWith
According toWithThe row and column index separately included, by IiIt is split by the row and column where these indexes, segmentation gained Rectangular area be map grid, be defined as follows:
Wherein, With Indicate the index of map grid arrangement position in I.
3. the textile flaw detection method based on peak value coverage values and composite character, feature exist as claimed in claim 2 Test phase parameter is calculated in: step 3 specifically includes the following steps:
Step 3.1 calculates the map grid period, for training sample set I1,I2…INInA training Sample Ii, available according to step 1 and step 2WithAccording toWithBy IiIt is divided into m × n map grid I is calculated using HOG feature extracting methodiMap gridFeature vector and make feature The corresponding map grid index of vector index is identical;Calculate IiRow distance matrixWith column distance matrixTo vectorFourier transform is carried out, is obtained It arrivesPeriod and frequency spectrum;According to(With) period and frequency spectrum, position in calculating cycle median and frequency spectrum Value, i.e. image line period and image line frequency spectrum;Similarly, I is constructediColumn distance matrixAnd calculate image Arrange period and image column frequency spectrum;According to I1,I2…IN, N number of image line period and corresponding N number of image line frequency spectrum can be calculated, is calculated Image line frequency spectrum medianIt finds out and is higher thanImage line frequency spectrum corresponding to the image line period, calculate these image lines week The median of phaseSame steps are repeated to image column period and image column frequency spectrum and obtain image column frequency spectrum medianAnd image Arrange period medianIfOrOrThen t value is 1, otherwise by comparingWithPhase The frequency spectrum size answered determines the value of t, it may be assumed that ifThen t takesOtherwise t takesWherein,Indicate map grid ideal row ruler Very little line number,Indicate map grid ideal row size columns;
The ideal statistical value of step 3.2 calculating each feature of map grid;I is divided according to step 2 firstiObtain map gridAnd step 3.1 calculate training sample set I1,I2…INMap grid period t, pass through | T | it is a input be 2-D gray image matrix and export be The feature extracting method f of one-dimensional reality vector1, f2…f|T|Calculate IiMap gridFeature vector Wherein, T is characterized extracting method title ordered set;Then kth class is calculated Map grid is based on fjIiCharacteristic statistics valueWith
Wherein Indicate that map grid L is i-thtA map grid matrixArbitrary element,Indicate 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 the sequence of characteristic statistics value is calculated, using K-means algorithm, hereinafter referred to as clustering algorithm, to N number ofIt carries out Cluster, determines characteristic statistics value;The stationary value that feature vector element is calculated according to characteristic statistics value, so that it is determined that invariant feature is first Element;Then ideal statistical value is calculated by self-adaption cluster algorithm according to characteristic statistics value and invariant feature element;Then root again The ideal statistical value threshold value of each feature is calculated according to characteristic statistics value and ideal statistical value.
4. the textile flaw detection method based on peak value coverage values and composite character, feature exist as claimed in claim 3 In: the segmentation of step 4 test sample map grid specifically includes: to a secondary given test sample, repeating step 2.1 to step 2.3 It calculates, distinguishes the training sample involved in being to calculate and replace with test sample, finally obtain the row framing bits of test sample It setsWith column split positionAnd according toWithTest sample is divided into map grid.
5. the textile flaw detection method based on peak value coverage values and composite character, feature exist as claimed in claim 4 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 ideal statistical value index k*With WithIf ThenLabeled as there is flaw, otherwise labeled as indefectible;When all map grids are based on fjLabel terminate, check every It is a to have flaw map grid Ll8 face domainThe label of interior map grid, if it exists flawless map gridThen judge It is whether true, it is marked if setting upTo have flaw and enablingAnd d is calculated as followsl+1, It continues checkingThe label of interior map grid simultaneously repeats the above steps until dl+1For
Wherein threshold coefficient0 < γ≤1,L1It indicates to be based on fjLabel terminate obtain have flaw figure Lattice;When dynamic threshold isWhen, all having the ranks index of the included pixel of flaw map grid is testing result.
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 CN107977961A (en) 2018-05-01
CN107977961B true 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)

Families Citing this family (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
CN117523307B (en) * 2023-11-24 2024-04-19 佛山众陶联供应链服务有限公司 Tile sorting method and system based on opc and tile surface flaw identification model

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101419706B (en) * 2008-12-11 2011-01-12 天津工业大学 Jersey wear flokkit and balling up grading method based on image analysis
CN102930531B (en) * 2012-09-28 2015-06-10 中国科学院自动化研究所 Detection method for repetition structure of building surface image

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
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

Also Published As

Publication number Publication date
CN107977961A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
CN106770323B (en) The textile flaw detection method filtered based on hierarchical clustering and Gabor
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
CN105550660B (en) A kind of recognition methods of woven fabric structure structure species
CN110245593A (en) A kind of images of gestures extraction method of key frame based on image similarity
CN109934287A (en) A kind of clothing texture method for identifying and classifying based on LBP and GLCM
Cetinic et al. Automated painter recognition based on image feature extraction
CN105068918B (en) A kind of page method of testing and device
CN107945164B (en) Textile flaw detection method based on peak threshold, rotational alignment and composite character
CN103218832A (en) Visual saliency algorithm based on overall color contrast ratio and space distribution in image
CN107895371A (en) Textile flaw detection method based on peak value coverage values and Gabor characteristic
Rezaei et al. Texture classification approach based on combination of random threshold vector technique and co-occurrence matrixes
CN107977961B (en) Textile flaw detection method based on peak value coverage values and composite character
CN111862027B (en) Textile flaw detection method based on low-rank sparse matrix decomposition
Jia et al. Fabric defect inspection based on lattice segmentation and lattice templates
CN111091134A (en) Method for identifying tissue structure of colored woven fabric based on multi-feature fusion
Handhayani Batik Lasem images classification using voting feature intervals 5 and statistical features selection approach
Wen et al. Multi-scene citrus detection based on multi-task deep learning network
CN107967680B (en) Textile flaw detection method based on peak threshold and composite character
Taraschi et al. Computing fractal descriptors of texture images using sliding boxes: An application to the identification of Brazilian plant species
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
Zhou et al. Double low-rank based matrix decomposition for surface defect segmentation of steel sheet
Manimozhi et al. An efficient approach for defect detection in pattern texture analysis using an improved support vector machine

Legal Events

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