[go: up one dir, main page]

CN107977954A - Textile flaw detection method based on local optimum analysis - Google Patents

Textile flaw detection method based on local optimum analysis Download PDF

Info

Publication number
CN107977954A
CN107977954A CN201710946334.1A CN201710946334A CN107977954A CN 107977954 A CN107977954 A CN 107977954A CN 201710946334 A CN201710946334 A CN 201710946334A CN 107977954 A CN107977954 A CN 107977954A
Authority
CN
China
Prior art keywords
textile
block
image block
image
template
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.)
Withdrawn
Application number
CN201710946334.1A
Other languages
Chinese (zh)
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 College of Information Technology CCIT
Original Assignee
Changzhou College of Information Technology CCIT
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 College of Information Technology CCIT filed Critical Changzhou College of Information Technology CCIT
Priority to CN201710946334.1A priority Critical patent/CN107977954A/en
Publication of CN107977954A publication Critical patent/CN107977954A/en
Withdrawn legal-status Critical Current

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
    • G06T7/001Industrial image inspection using an image reference approach
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • 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/20021Dividing image into blocks, subimages or windows
    • 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
    • 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/30168Image quality inspection

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Investigating Materials By The Use Of Optical Means Adapted For Particular Applications (AREA)
  • Treatment Of Fiber Materials (AREA)

Abstract

The present invention relates to textile inspection technical field, is based especially on the textile flaw detection method that local optimum is analyzed.The detection method comprises the following steps:1) textile images to be detected containing mechanical periodicity pattern are inputted;2) the cycle template size of pattern is determined;3) piecemeal is carried out to image according to template size;4) Markov random field models are established to the image block of piecemeal;5) local energy of each image block is calculated, changes the mark of block so that the energy reaches stable, and then diffuses to global optimum by local optimum;6) positioning of flaw is completed according to final Label Field.The present invention provides a kind of textile flaw detection method based on local optimum analysis, and image is cut the size by determining periodic pattern and piecemeal, reduces computation complexity, improves detection rates, while this method has universality to flaw type.

Description

Textile flaw detection method based on local optimum analysis
Technical field
The present invention relates to textile inspection technical field, is based especially on the textile Defect Detection side that local optimum is analyzed Method.
Background technology
The economic benefit of textile is determined that textile of fine qualities can bring income, and contain flaw by its quality Defect ware can then bring economic loss, traditional manual detection mode is the scoring of the experience, textile according to testing staff With the standard such as comment to be evaluated to the quality of textile.This mode detection speed is low, and omission factor is higher, it is therefore desirable to sends out Open up quick, accurate and unsupervised textile flaw detection method.
The fabric type that textile Defect Detection is directed to now, can be divided into two classes:The first kind is simple in structure, is not contained Complicated pattern, is mostly the textile of pure color;Second class is then to have complex pattern-information, and pattern has periodically.
Quality testing for first kind pure color textile images has had many ripe technologies and algorithm, and comparing has It is representational to have statistic law, Spectrum Method, coaching method, Structure Method and modelling etc..Wherein, statistic law and spectral method can not be directed to the flaw The larger textile images of defect area are detected;Coaching method needs training parameter in large quantities, and the time consumed and cost are all It is very high;Structure Method is very high to the requirement of sample image texture, does not have universality to flaw type.In these techniques, modelling energy It is enough that Defect Detection problem is converted into assumed statistical inspection problem, using limited parameter describe a pixel in image with The statistic correlation of pixel in its adjacent area, can effectively describe the architectural characteristic and statistical property of texture.
Contain the quality testing of the complicated textile images of cycle primitive pattern for the second class, ripe technology is relatively It is few, and existing technology is required to the parameter of training sample, required time and cost are high, and testing result is also general.
The content of the invention
The technical problem to be solved in the present invention is:In order to solve, the existing detection method cycle is long, of high cost and effect is poor Deficiency, the present invention provides it is a kind of based on local optimum analysis textile flaw detection method, pass through determine periodic pattern Size image is cut and piecemeal, reduce computation complexity, improve detection rates, while this method is to flaw class Type has universality.
The technical solution adopted by the present invention to solve the technical problems is:
A kind of textile flaw detection method based on local optimum analysis, comprises the following steps:
1) textile images to be detected containing mechanical periodicity pattern are inputted;
2) the cycle template size of pattern is determined;
3) piecemeal is carried out to image according to template size;
4) Markov random field models are established to the image block of piecemeal;
5) local energy of each image block is calculated, changes the mark of block so that the energy reaches stable, Jin Eryou Local optimum diffuses to global optimum;
6) positioning of flaw is completed according to final Label Field.
Specifically, the method for the cycle template size of the definite pattern is to take step in the horizontal direction of textile images Long c and take step-length r to carry out even partition to textile images in the vertical direction of textile images, calculate adjacent difference between two pieces Summation that is different and calculating all differences, and ask for according to the minimum of difference summation the template size of textile images.
Specifically, the computational methods of the template size for asking for textile images are to make step-length c be equal to textile images Horizontal direction image length carry out the solution of r, then solve c, or the height pattern image width for making step-length r be equal to textile images Degree carries out the solution of c, then solves r, and obtains the optimum value of r and c as template size.
Specifically, it is described to be to the method for image progress piecemeal according to template size, according to template size and textile figure The length and width of picture cut textile images;The textile after cutting is averagely divided into according to template size some The identical image block of a size.
Specifically, the method that the image block to piecemeal establishes Markov random field models is, each image block be with The minimum calculation unit on airport;Current block forms a neighborhood system with its four neighborhood images block;The property of current block can be by The property representation of four neighborhoods;A mark is assigned to each image block, initial markers are 0, using the markd set of institute as Label Field;All image blocks are overlapped, generate three-dimensional model, calculate the median of the model, obtained result is to treat Survey textile images global template, the template be defaulted as it is flawless, its be labeled as 0.
Specifically, the method for the local energy for calculating each image block is, identical with overall situation template for mark Image block, counts in its four neighborhood and marks identical image block with it, it is identical with its four neighborhoods internal labeling to calculate the image block The average of similarity between block;For marking the image block different from global template, its local energy is equal to mark and global mould The Energy maximum value of the identical image block of plate.
Specifically, the method for the mark for changing block is the similar system calculated between all image blocks and global template Number;A decision value λ is taken to be traveled through between (0,1);Change image block of the similarity factor less than λ to mark;If local energy after changing mark Amount reduces, and illustrates to mark iteration accurate, otherwise mistake, changes back former mark.
Specifically, the method that the final Label Field of the basis completes the positioning of flaw is, labeled as 0 image block Flawless block is regarded as, flaw block has been regarded as labeled as 1 image block.
The beneficial effects of the invention are as follows:The present invention provides a kind of textile Defect Detection side based on local optimum analysis Method, image is cut the size by determining periodic pattern and piecemeal, reduces computation complexity, improves detection speed Rate, while this method has universality to flaw type.
Brief description of the drawings
The present invention is further described with reference to the accompanying drawings and examples.
Fig. 1 is the detection method FB(flow block) of the present invention;
Fig. 2 is total difference curve figure of the vertical direction of the present invention;
Fig. 3 is total difference curve figure of the horizontal direction of the present invention;
Fig. 4 is the Markov random field models neighborhood systems of the present invention;
Fig. 5 is the calculating image block of the present invention and global template similarity factor schematic diagram;
Embodiment
In conjunction with the accompanying drawings, the present invention is further explained in detail.
Fig. 1 be the present invention detection method FB(flow block), Fig. 2 be the present invention vertical direction total difference curve figure, Fig. 3 It is total difference curve figure of the horizontal direction of the present invention, Fig. 4 is the Markov random field models neighborhood systems of the present invention, and Fig. 5 is The calculating image block of the present invention and global template similarity factor schematic diagram.
A kind of textile flaw detection method based on local optimum analysis, it is characterized in that, comprise the following steps:
1) textile images to be detected containing mechanical periodicity pattern are inputted;
2) the cycle template size of pattern is determined;
3) piecemeal is carried out to image according to template size;
4) Markov random field models are established to the image block of piecemeal;
5) local energy of each image block is calculated, changes the mark of block so that the energy reaches stable, Jin Eryou Local optimum diffuses to global optimum;
6) positioning of flaw is completed according to final Label Field.
The method of the cycle template size of the definite pattern is, the horizontal direction of textile images take step-length c and The vertical direction of textile images takes step-length r to carry out even partition to textile images, calculates difference and meter between adjacent two pieces The summation of all differences is calculated, and the template size of textile images is asked for according to the minimum of difference summation.It is described to ask for weaving The computational methods of the template size of product image are that the horizontal direction image length for making step-length c be equal to textile images carries out asking for r Solution, then c is solved, or the vertical direction picture traverse for making step-length r be equal to textile images carries out the solution of c, then r is solved, and obtain The optimum value of r and c is taken as template size.It is described to be to the method for image progress piecemeal according to template size, it is big according to template Small and textile images length and width cut textile images;The textile after cutting is put down according to template size It is divided into the identical image block of several sizes.The method that the image block to piecemeal establishes Markov random field models It is that each image block is the minimum calculation unit of random field;Current block forms a neighborhood system with its four neighborhood images block;When Preceding piece of property can be by the property representation of four neighborhoods;A mark is assigned to each image block, initial markers are 0, by institute Markd set is used as Label Field;All image blocks are overlapped, generate three-dimensional model, calculate the median of the model, Obtained result is the global template of textile images to be measured, which is defaulted as flawless, it is labeled as 0.It is described to calculate often The method of the local energy of one image block is, for marking the image block identical with global template, count its four neighborhood it is interior and its Identical image block is marked, calculates the average of similarity between the image block block identical with its four neighborhoods internal labeling;For mark Remember the image block different from global template, the energy that its local energy is equal to the mark image block identical with global template is maximum Value.The method of the mark for changing block is the similarity factor calculated between all image blocks and global template;Take a decision value λ is traveled through between (0,1);Change image block of the similarity factor less than λ to mark;If changing local energy after mark reduces, illustrate mark Remember that iteration is accurate, on the contrary mistake, change back former mark.
The method that the final Label Field of the basis completes the positioning of flaw is, labeled as 0 image block regard as it is flawless Block, flaw block has been regarded as labeled as 1 image block.
Determine the size of textile images piecemeal template to be measured, contain basic pattern for one, size is the spinning of M × N Fabric image I, will determine the basic pattern template that size is m × n, Schilling template width m=M, form height n is in [1, N/2] Interior takes a numerical value d, forms one and treats solid plate, will should treat that solid plate is divided into by IBlock, is respectivelyCalculate adjacent two pieces of difference and the total difference f of cumulative read group total;By the way that d is traveled through in [1, N/2], look for Go out so that total difference f reaches extreme value, and the d during area minimum of piecemeal is the height n of image template, template width m is really Process is determined, so that it is determined that size is the base pattern template of m × n.Textile images I is cut simultaneously by the template It is divided into block, note image block collection is combined into B={ b1,b2,…bp×q}。
Wherein total difference f calculation formula are as follows:
Since image has periodically, so when d is the integral multiple of cycle template, total difference f will obtain minimum, So the template of area minimum is only optimal template in all length and width for making f obtain minimum.
As shown in Figure 2, for complicated textile images in the horizontal direction and vertical direction total difference curve figure.By attached drawing Known to 2, the point that form height obtains minimum is respectively 21,42,63,84,106, and template width obtains the point difference of minimum For 16,33,49,66,83,100.Since pattern has periodically, so template should select area minimum, so such pattern This template size is about 21 × 16.
For according to template by the result after textile images piecemeal.For containing image defective, also according to template into Row piecemeal, since flaw area is less than the 50% of textile images area, so all image blocks are overlapped, forms one Three-dimensional model, the median for calculating the three-dimensional model can obtain flawless global template, which is denoted as 0.Calculate institute There is the similarity degree between image block and global template, form similarity factor matrix.
As shown in Figure 3, central block s and its four neighborhoods block r constitutes the neighborhood system of s.It is right in Markov random fields It is as follows in the mark image block identical with global template, its energy balane formula:
Wherein, xi and xr is current center block and the property of its neighborhood block, and yi and the corresponding marks of yr, V1 and V2 are respectively The single order and second order potential function of central block, i (k, l), GT (k, l), r (k, l) are respectively that central block, global template and neighborhood block exist The pixel value at position (k, l) place.H is the number identical with current block mark in four neighborhoods, h ∈ { 1,2,3,4 }.
And for being replaced labeled as the image block for having the flaw, its energy by the maximum labeled as flawless image block energy, I.e.
Us(ys≠yGT)=maxUs(ys=yGT) (5)
A decision value λ is made to be traveled through in the range of (0,1) with certain step-length, when a certain image block and global template Similarity factor when being less than λ, change the mark of the block, the local energy after changing mark calculated, if changing the image block The energy summation of entire image is less than the energy summation before changing after mark, just illustrates that image block mark iteration is accurate, on the contrary Then mark constant.Solution MRF model parameter problems can be converted into using similarity relation change image tagged and seek all images What block was formed under a certain decision value causes local energy summation to reach minimum Label Field, and formula is such as shown in (6):
The region of flaw is determined by final Label Field:Flawless block is considered labeled as 0 image block, labeled as 1 Image block is considered to contain block defective, in testing result, only can show flaw block, final to solve to contain periodic pattern The Defect Detection problem of textile images.
It should be appreciated that although the present specification is described in terms of embodiments, not each embodiment only includes one A independent technical solution, this narrating mode of specification is only that those skilled in the art will should say for clarity For bright book as an entirety, the technical solution in each embodiment may also be suitably combined to form those skilled in the art can With the other embodiment of understanding.

Claims (8)

1. a kind of textile flaw detection method based on local optimum analysis, it is characterized in that, comprise the following steps:
1) textile images to be detected containing mechanical periodicity pattern are inputted;
2) the cycle template size of pattern is determined;
3) piecemeal is carried out to image according to template size;
4) Markov random field models are established to the image block of piecemeal;
5) local energy of each image block is calculated, changes the mark of block so that the energy reaches stable, and then by part Optimal diffusion is to global optimum;
6) positioning of flaw is completed according to final Label Field.
2. the textile flaw detection method according to claim 1 based on local optimum analysis, it is characterised in that:It is described Determining the method for the cycle template size of pattern is, step-length c is taken and in textile images in the horizontal direction of textile images Vertical direction takes step-length r to carry out even partition to textile images, calculates the difference between adjacent two pieces and calculates all differences Summation, and ask for according to the minimum of difference summation the template size of textile images.
3. the textile flaw detection method according to claim 2 based on local optimum analysis, it is characterised in that:It is described Asking for the computational methods of the template size of textile images is, makes step-length c be equal to the horizontal direction image length of textile images The solution of r is carried out, then solves c, or the vertical direction picture traverse for making step-length r be equal to textile images carries out the solution of c, then ask R is solved, and obtains the optimum value of r and c as template size.
4. the textile flaw detection method according to claim 1 based on local optimum analysis, it is characterised in that:It is described Carrying out the method for piecemeal to image according to template size is, according to the length and width of template size and textile images to weaving Product image is cut;Textile after cutting is averagely divided into by the identical image block of several sizes according to template size.
5. the textile flaw detection method according to claim 1 based on local optimum analysis, it is characterised in that:It is described The method of Markov random field models is established to the image block of piecemeal is, each image block is the minimum calculation unit of random field; Current block forms a neighborhood system with its four neighborhood images block;The property of current block can be by the property representation of four neighborhoods;It is right Each image block assigns a mark, and initial markers are 0, using the markd set of institute as Label Field;By all image blocks It is overlapped, generates three-dimensional model, calculate the median of the model, obtained result is the global mould of textile images to be measured Plate, the template be defaulted as it is flawless, its be labeled as 0.
6. the textile flaw detection method according to claim 5 based on local optimum analysis, it is characterised in that:It is described Calculating the method for the local energy of each image block is, for marking the image block identical with global template, counts its four neighborhood It is interior that identical image block is marked with it, calculate the average of similarity between the image block block identical with its four neighborhoods internal labeling; For marking the image block different from global template, its local energy is equal to the energy of the mark image block identical with global template Maximum.
7. the textile flaw detection method based on local optimum analysis according to claim 5 or 6, it is characterised in that: The method of the mark for changing block is the similarity factor calculated between all image blocks and global template;A decision value λ is taken to exist (0,1) traveled through between;Change image block of the similarity factor less than λ to mark;If changing local energy after mark reduces, illustrate that mark changes In generation, is accurate, otherwise mistake, changes back former mark.
8. the textile flaw detection method according to claim 7 based on local optimum analysis, it is characterised in that:It is described The method that the positioning of flaw is completed according to final Label Field is flawless block to be regarded as labeled as 0 image block, labeled as 1 Image block regarded as flaw block.
CN201710946334.1A 2017-10-12 2017-10-12 Textile flaw detection method based on local optimum analysis Withdrawn CN107977954A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710946334.1A CN107977954A (en) 2017-10-12 2017-10-12 Textile flaw detection method based on local optimum analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710946334.1A CN107977954A (en) 2017-10-12 2017-10-12 Textile flaw detection method based on local optimum analysis

Publications (1)

Publication Number Publication Date
CN107977954A true CN107977954A (en) 2018-05-01

Family

ID=62012394

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710946334.1A Withdrawn CN107977954A (en) 2017-10-12 2017-10-12 Textile flaw detection method based on local optimum analysis

Country Status (1)

Country Link
CN (1) CN107977954A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108760751A (en) * 2018-05-25 2018-11-06 常州信息职业技术学院 A kind of textile flaw detection method
CN111369480A (en) * 2020-01-20 2020-07-03 凌云光技术集团有限责任公司 Method and device for processing periodic texture
CN111929327A (en) * 2020-09-09 2020-11-13 深兰人工智能芯片研究院(江苏)有限公司 Cloth defect detection method and device
CN118247231A (en) * 2024-03-15 2024-06-25 乐昌市恒发纺织企业有限公司 Spinning quality visual identification system
CN118469134A (en) * 2024-05-08 2024-08-09 肃宁县中原纺织有限责任公司 Production management system of light-weight tearing-resistant multifunctional camouflage cover cloth

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108760751A (en) * 2018-05-25 2018-11-06 常州信息职业技术学院 A kind of textile flaw detection method
CN111369480A (en) * 2020-01-20 2020-07-03 凌云光技术集团有限责任公司 Method and device for processing periodic texture
CN111369480B (en) * 2020-01-20 2023-10-24 凌云光技术股份有限公司 Method and device for processing periodic texture
CN111929327A (en) * 2020-09-09 2020-11-13 深兰人工智能芯片研究院(江苏)有限公司 Cloth defect detection method and device
CN118247231A (en) * 2024-03-15 2024-06-25 乐昌市恒发纺织企业有限公司 Spinning quality visual identification system
CN118247231B (en) * 2024-03-15 2025-03-11 吴江市鑫凤织造有限公司 Spinning quality visual identification system
CN118469134A (en) * 2024-05-08 2024-08-09 肃宁县中原纺织有限责任公司 Production management system of light-weight tearing-resistant multifunctional camouflage cover cloth

Similar Documents

Publication Publication Date Title
CN107977954A (en) Textile flaw detection method based on local optimum analysis
CN110222681A (en) A kind of casting defect recognition methods based on convolutional neural networks
CN114066820B (en) A fabric defect detection method based on Swin-Transformer and NAS-FPN
CN110310259A (en) A Wood Knot Defect Detection Method Based on Improved YOLOv3 Algorithm
CN109859207B (en) A defect detection method for high-density flexible substrates
CN104268505B (en) Fabric Defects Inspection automatic detecting identifier and method based on machine vision
CN108257114A (en) A kind of transmission facility defect inspection method based on deep learning
CN109711474A (en) An Algorithm for Detection of Surface Defects of Aluminum Materials Based on Deep Learning
CN108428231B (en) Multi-parameter part surface roughness learning method based on random forest
CN111401419A (en) Improved RetinaNet-based employee dressing specification detection method
CN109472769A (en) A kind of bad image defect detection method and system
CN102253049B (en) Method for accurately detecting surface quality on line in production process of band steel
CN110297852B (en) A Method of Acquiring Knowledge of Ship Painting Defects Based on PCA-Rough Sets
CN118429900B (en) Defect identification and monitoring method and system for macadimia nut production and processing
CN115841491B (en) A quality detection method for porous metal materials
CN112102224B (en) A cloth defect recognition method based on deep convolutional neural network
CN108171175A (en) A kind of deep learning sample enhancing system and its operation method
CN102663422B (en) Floor layer classification method based on color characteristic
CN111815573B (en) Coupling outer wall detection method and system based on deep learning
CN114565314B (en) A hot-rolled steel coil end surface quality control system and method based on digital twin
CN115082444B (en) Copper pipe weld defect detection method and system based on image processing
CN115100206A (en) Printing defect identification method for textile with periodic pattern
CN114897865A (en) An industrial defect detection method based on a small number of defect samples
CN116205876A (en) Unsupervised notebook appearance defect detection method based on multi-scale standardized flow
Chen et al. Real-time defect detection of TFT-LCD displays using a lightweight network architecture

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20180501

WW01 Invention patent application withdrawn after publication