CN105158272B - A kind of method for detecting textile defect - Google Patents

A kind of method for detecting textile defect Download PDF

Info

Publication number
CN105158272B
CN105158272B CN201510607255.9A CN201510607255A CN105158272B CN 105158272 B CN105158272 B CN 105158272B CN 201510607255 A CN201510607255 A CN 201510607255A CN 105158272 B CN105158272 B CN 105158272B
Authority
CN
China
Prior art keywords
edge
image
region
point
flaw
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
CN201510607255.9A
Other languages
Chinese (zh)
Other versions
CN105158272A (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.)
Zhejiang Gongshang University
Original Assignee
Zhejiang Gongshang 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 Zhejiang Gongshang University filed Critical Zhejiang Gongshang University
Priority to CN201510607255.9A priority Critical patent/CN105158272B/en
Publication of CN105158272A publication Critical patent/CN105158272A/en
Application granted granted Critical
Publication of CN105158272B publication Critical patent/CN105158272B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The present invention relates to a kind of method for detecting textile defect.The present invention first acquires the textile images of tool edge characteristics to be cut to be detected, collected image to be detected is passed through into a series of image pretreatment operation, then sawtooth is eliminated to image, textile edge is substantially confirmed by LSD line detection algorithms, by obtaining exact edge position to the transversal of longitudinal average gray variation diagram, real-time edge reference data is confirmed according to acquisition system relevant parameter, the side information of extraction is compared later and edge reference data confirms edge and counts, combined standard figure characteristic parameter and ignore around edge flaw to confirm that flaw is distributed, each flaw connected region is obtained using region-growing method, in conjunction with edge placement, so as to judge flaw place textile number.The present invention confirms the multiple information reference at textile edge, improves the accuracy that online edge counts;To carefully dissipating class regrowth connection, the accuracy of on-line checking flaw is improved.

Description

A kind of method for detecting textile defect
Technical field
The invention belongs to industrial automation, the defects of being related to a kind of product or workpiece detection method.
Background technology
For machine vision with the development of computer technology and field bus technique, technology is increasingly mature, it has also become increasingly The indispensable product of the enterprise in more design automation fields.In some traditional forms of enterprises, the defects of workpiece or product still It is so detected by function, introduces machine vision and replace conventional method, detection efficiency and the degree of automation can be greatlyd improve, especially It is some high-risk working environments, and artificial vision has been difficult to meet industrial automation enterprise to high efficiency, high-precision demand. In terms of some assembly line on-line checkings, an Analysis of Nested Design agrees with, is detected automatically using complete, 24 hours steady operations machine vision System not only greatly reduces the manpower, material resources and financial resources of enterprise, moreover it is possible to obtain most detailed information feedback most to make soon certainly Plan.To further improve enterprise competitiveness, the more innovative technology based on machine vision is needed, development more agrees with enterprise demand Automatic online defect detecting system is very urgent.
Invention content
In view of the deficiencies of the prior art, the present invention provides the textile for having edge characteristics to be cut on a kind of assembly line lacks Fall into detection method.
The technical solution adopted for solving the technical problem of the present invention is:
Step (1) acquires image and image preprocessing.
Step (2) extracts textile side information in image with LSD line detection algorithms.
Step (3) confirms real-time edge reference data according to acquisition system relevant parameter.
The side information and edge reference data of step (4) comparison extractions confirm edge and counting
Step (5) combined standard figure characteristic parameters and the distribution of edge center point location confirmation flaw.
Step (6) differentiates flaw location using region-growing method and divides.
Beneficial effects of the present invention:
(1) the multiple information reference at textile edge is confirmed, improves the accuracy that online edge counts.
(2) to the carefully scattered class regrowth connection of textile flaw, the accuracy of on-line checking flaw is improved.
Description of the drawings
Fig. 1 towel label defect detecting system flow charts;
Specific embodiment
The present invention is described further below in conjunction with Figure of description.
According to Figure of description (1), implementation steps are described in detail:
Step (1) acquires image and image preprocessing.
To ensure that Image Acquisition is continuous, stablizes, industrial camera need to be fixed on the production line of stabilized speed, illumination is steady Fixed, image acquisition interval can slightly increase, but ensure that gatherer process does not have information gaps and omissions, i.e., continuous two images are taken the photograph Enter content to repeat but can not breakthrough.Pretreatment to image, it is main to include carrying out denoising, gradation conversion and image two to image Several processing procedures such as value.
Step (2) extracts textile side information in image with LSD line detection algorithms.
LSD algorithm aims at straight profile local in detection image, than being more suitable for extracting textile edge letter Breath.
The first step:Sawtooth is eliminated, LSD algorithm first step original is 80% that input picture is reduced into original size, this The purpose of diminution is to be to weaken the crenellated phenomena even eliminated and occurred in image, and the image reduced is lost some spies Reference ceases, and interference that is similar, but can increasing white noise can equally be achieved the effect that by carrying out fuzzy operation to image.The present invention A kind of modified LSD line detection algorithms are proposed, to pretreated figure being gone to carry out edge detection, then figure carries out to treated Simple Hough transformation straight line is searched, then take a pretreated figure, with the color thick line similar with edge block in rear figure It describes, eliminates sawtooth with this, helps straight edge, reduce line interruption.
Second step:Gradient calculates and angle differentiates, set point X (m, n) represents the ash at pixel (m, n) on gray level image Angle value, image gradient are calculated by following formula:
The angle of this level-line is calculated by following formula:
The gray-scale map of non-binaryzation needs to carry out gradient magnitude sequence and Grads threshold, and then differentiate after carrying out LSD algorithm Go out the saltus step boundary for the degree that achieves the goal.The present invention directly carries out LSD algorithm to image after binaryzation, and saltus step is apparent, it is only necessary to Simple angle differentiation just can substantially confirm the position in straight region.
Third walks:Edge left and right ends judge that given set point X (m, n) is represented on gray level image at pixel (m, n) Gray value, picture altitude H, width W take image longitudinal direction average gray, are calculated by following formula:
Afterwards by each point (m, faverage(m)) it retouches to fasten in a rectangular co-ordinate and makes average gray variation diagram, take peak (mm,faverage(mm)max), if transversal ratio p (0<p<1), make straight line, y=p*f in the coordinate systemaverage(mm)max, it is horizontal Variation diagram is cut, makes variation diagram and 2 points of (m of straight line intersectionl,faverage(ml)) and (mr,faverage(mr)).There are the places at edge After reason in image, the white rectangle of picture height is ideally equal to there are one piece of constant width, highly, and other regions are Then in longitudinal average gray variation diagram, one piece of apparent protrusion is had in edge center point or so for all black.If mr-mlIt is not near Be similar to edge width, then reset p, it is on the contrary then exact edge center position ((mr+ml)/2,H/2)。
Step (3) confirms real-time edge reference data according to acquisition system relevant parameter.
Parameter is selected, and number of image frames n per second, at the uniform velocity crawler belt move fixed speed v, single towel towel face length from right to left L, edge width b, imaging actual width k.Whole towel images cycle T=(b+l)/v, frame number z=t*n, if the instantaneous hairs of t=t1 Towel edge enters image, and towel face enters field of view after b*n/2v frames during t=b/2v+t1, side during t=(b/2+k)/v+t1 Along from picture drop-out, edge occurs once again during t=(b/2+l)/v+t1, that is, t=T+t1-b/2v, then the edge of the m bars towel goes out It is (mT+t1-b/2v, mT+t1+k/v+b/2v) (m between current>1), using image lower frame as one-dimensional coordinate system, rightest point is original Point, x-axis direction is identical with crawler belt, and from right to left, edge center point position is x=(t-t.mod (T) * T-t1) * v, and x belongs to There is edge in the picture when (- 2/b, k+2/b).
The side information and edge reference data of step (4) comparison extractions confirm edge and counting
If the centerline and reference edge are very remote or edge occur along not time of occurrence section in reference edge along central point distance, The bulk flaw at likeness in form edge is likely to occur, is subject to reference edge at this time along central point.In the edge judged in step 2 second step Heart point gray scale is too low or can not to find edge or so or reference edge along not time of occurrence be no edge;Exact edge central point is being schemed The left side and central point and reference edge are closely located along central point, then edge is half side on an image left side;Similarly judge on right side;If Distance is very remote, is subject to reference edge along central point.Same edge will appear repeatedly in the image of continuous acquisition, here only at edge Central point in a upper figure in left side, this figure right side to edge counting number.
Step (5) combined standard figure characteristic parameters and the distribution of edge center point location confirmation flaw.
Triple channel pixel is carried out to standard coloured picture to be averaged, then takes the cromogram after the simple denoising acquired, is excluded Edge center point position fixed range generates self-defined binaryzation gray-scale map, display flaw distribution with the comparison of each channel aberration.
Step (6) differentiates flaw location using region-growing method and divides.
Region-growing method is grown by the iteration of seed point, the method for looking for the connected region of closure.After binaryzation Gray-scale map region growing, avoid noise and the inhomogenous cavity that may be generated of gray scale and over-segmentation, but it is maximum bad Gesture is that calculating cost is big, and modified region-growing method proposed by the present invention can effectively overcome this point.
The first step:Initial point selection, the pixel found in image sequence scanning first carry out ownership inquiry, confirm without after ownership As seed.And belonging to inquiry has bigger calculation amount, and edges of regions pixel is only taken to enter here and belongs to sequence, is i.e. the pixel 4 neighborhood territory pixels meet growth criterion, then inside region rather than edge, are added without ownership sequence.
Second step:Growth criterion is formulated in growth, centered on seed point, considers that its 4 neighborhood territory pixel meets preliminary growth standard Then and not in Seed Sequences, then reset as seed point and add in Seed Sequences, point centered on continuation, iteration growth, and will The point for meeting edge criterion adds in ownership sequence.If former seed point location is (m, n), growth criterion is:
X(m-1,n)+X(m+1,n)+X(m,n-1)+X(m,n+1)>V, V=255, X (m, n) represent point (m, n) without kind Pixel value when subsequence marks is 0 if having.
Edge criterion is:
Y(m-1,n)+Y(m+1,n)+Y(m,n-1)+Y(m,n+1)<W, W=255*4, Y (m, n) represent the picture of point (m, n) Element value.
Third walks:It terminates, until belonging to, sequence joins end to end or the region is each put and grown eventually in Seed Sequences Only.
4th step:Region merging technique, the region Q for having marked off m ' n for one, barycenter (m0,n0) be:
X (m, n) is the gray value of the point in formula, sets a threshold value Y, according to one minimum area of system where Q barycenter and Include the rectangular area Q in the regionnew, which is width and length to be made all to expand Y on the basis of former region Q, passes through following two Kind situation judges which region connects into one piece:
(mp0,np0)∈Qnew, i.e. in Q of the barycenter of region P after expansion,
And (mp,np)∈Qnew, (ms,ns) it is QnewUpper left starting point coordinate, i.e., in QnewThere are other on the side of rectangular area The pixel in region belongs to region P, then P and Q connects into one piece.Textile flaw by shape be roughly divided into bulk, shot shape, Strip, staggered-line.Easy differentiation for the apparent Connectivity Properties of the tools such as bulk, strip, staggered-line, and the distribution of shot shape Region was then easily determined the smaller zonule of many areas, was weeded out in size differentiation.For such case, have To area, smaller region merges necessity, and shot shape flaw face is joined together region.To all set merging rear regions Position differentiates, with reference to edge center point position, fabric number where judging flaw.

Claims (1)

1. a kind of method for detecting textile defect, it is characterised in that this method includes the following steps:
Step (1) acquires image and image preprocessing;
Step (2) extracts textile side information in image with LSD line detection algorithms;
Step (3) confirms real-time edge reference data according to acquisition system relevant parameter;
The side information and edge reference data of step (4) comparison extractions confirm edge and counting;
Step (5) combined standard figure characteristic parameters and the distribution of edge center point location confirmation flaw;
Step (6) differentiates flaw location using region-growing method and divides;
Textile side information in image is extracted with LSD line detection algorithms in step (2), is specially:
1) sawtooth is eliminated:To pretreated figure being gone to carry out edge detection, then figure progress Hough transformation straight line is looked into treated It looks for, takes a pretreated figure, the thick line similar with edge block with color describes in rear figure, is eliminated sawtooth with this, is helped Straight edge reduces line interruption;
2) gradient calculates and angle differentiates:Set point X (m, n) represents the gray value at pixel (m, n), image on gray level image Gradient is calculated by following formula:
The angle of this level-line is calculated by following formula:
3) edge left and right ends judge:Set point X (m, n) represents the gray value at pixel (m, n) on gray level image, and image is high It spends for H, width W, takes image longitudinal direction average gray, pass through following formula and calculate:
Afterwards by each point (m, faverage(m)) it retouches to fasten in a rectangular co-ordinate and makes average gray variation diagram, take peak (mm, faverage(mm)max), if transversal ratio p, 0<p<1;Make straight line, y=p*f in the coordinate systemaverage(mm)max, transversal change Change figure, make variation diagram and 2 points of (m of straight line intersectionl,faverage(ml)) and (mr,faverage(mr));After the processing there are edge In image, the white rectangle of picture height is ideally equal to there are one piece of constant width, highly, and other regions are completely black Then in longitudinal average gray variation diagram, one piece of apparent protrusion is had in edge center point or so for color;If mr-mlIt is not similar to Edge width, then reset p, it is on the contrary then exact edge center position ((mr+ml)/2,H/2);
Differentiate flaw location with region-growing method in step (6) and divide, be specially:
1) initial point selection:The pixel found in image sequence scanning first carries out ownership inquiry, confirms without being used as seed after ownership; Edges of regions pixel is taken to enter and belongs to sequence, i.e., 4 neighborhood territory pixel of pixel meets growth criterion, then inside region rather than side Edge is added without ownership sequence;
2) it grows:Growth criterion is formulated, centered on seed point, considers that its 4 neighborhood territory pixel meets preliminary growth criterion and do not exist In Seed Sequences, then reset as seed point and add in Seed Sequences, point centered on continuation, iteration growth, and edge will be met The point of criterion adds in ownership sequence;If former seed point location is (m, n), growth criterion is:
X(m-1,n)+X(m+1,n)+X(m,n-1)+X(m,n+1)>V, V=255, X (m, n) represent point (m, n) without seed sequence Pixel value during row label is 0 if having;
Edge criterion is:
Y(m-1,n)+Y(m+1,n)+Y(m,n-1)+Y(m,n+1)<W, W=255*4, Y (m, n) represent the pixel value of point (m, n);
3) it terminates:Until belonging to, sequence joins end to end or the region is each put to grow in Seed Sequences and be terminated;
4) region merging technique:The region Q for having marked off m × n for one, barycenter (m0,n0) be:
X (m, n) is the gray value of the point in formula, sets a threshold value Y, and a minimum area is made according to where Q barycenter and is included The rectangular area Q in the regionnew, which is width and length to be made all to expand Y on the basis of former region Q, passes through following two feelings Condition judges which region connects into one piece:(mp0,np0)∈Qnew, i.e. in Q of the barycenter of region P after expansion,
And (mp,np)∈Qnew, (ms,ns) it is QnewUpper left starting point coordinate, i.e., in QnewThere are the pictures in other regions on the side of rectangular area Vegetarian refreshments belongs to region P, then P and Q connects into one piece;All set merging rear region positions are differentiated, with reference to edge center point position It puts, fabric number where judging flaw.
CN201510607255.9A 2015-09-22 2015-09-22 A kind of method for detecting textile defect Active CN105158272B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510607255.9A CN105158272B (en) 2015-09-22 2015-09-22 A kind of method for detecting textile defect

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510607255.9A CN105158272B (en) 2015-09-22 2015-09-22 A kind of method for detecting textile defect

Publications (2)

Publication Number Publication Date
CN105158272A CN105158272A (en) 2015-12-16
CN105158272B true CN105158272B (en) 2018-06-22

Family

ID=54799200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510607255.9A Active CN105158272B (en) 2015-09-22 2015-09-22 A kind of method for detecting textile defect

Country Status (1)

Country Link
CN (1) CN105158272B (en)

Families Citing this family (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106017328B (en) * 2015-12-17 2019-03-05 广东正业科技股份有限公司 A kind of polymorphic type line width measuring method and device
CN105719301A (en) * 2016-01-22 2016-06-29 长沙格力暖通制冷设备有限公司 Detection method and apparatus of air-conditioning product
CN106228189A (en) * 2016-07-26 2016-12-14 国网福建省电力有限公司 Circuit foreign body lodge detection method based on LSD algorithm and machine learning
CN106225705A (en) * 2016-07-26 2016-12-14 国网福建省电力有限公司 Stockbridge damper deformation detection method based on LSD algorithm and machine learning
CN106918600A (en) * 2017-04-07 2017-07-04 江苏博虏智能科技有限公司 A kind of web surface defects detection and labeling method based on machine vision
CN107256545B (en) * 2017-05-09 2019-11-15 华侨大学 A kind of broken hole flaw detection method of large circle machine
CN109164123A (en) * 2017-06-29 2019-01-08 宝山钢铁股份有限公司 The sample previewing method and device of X fluorescence spectrometer
CN107248158A (en) * 2017-07-20 2017-10-13 广东工业大学 A kind of method and system of image procossing
CN108960255A (en) * 2018-06-28 2018-12-07 西安工程大学 Conspicuousness fabric defect detection method based on color similarity and position aggregation
CN112051271B (en) * 2018-07-06 2024-03-12 湖南工程学院 Device and process for automatically detecting fabric flaws
CN109490303A (en) * 2018-11-27 2019-03-19 福建伟易泰智能科技有限公司 Heald detection and processing method, device and weaving loom
CN113552134A (en) * 2019-08-07 2021-10-26 浙江大学台州研究院 Method for detecting hemming of synthetic leather by wet gluing
CN114066881B (en) * 2021-12-01 2022-07-15 常州市宏发纵横新材料科技股份有限公司 Nonlinear transformation based detection method, computer equipment and storage medium
CN114627111B (en) * 2022-05-12 2022-07-29 南通英伦家纺有限公司 Textile defect detection and identification device
CN115439481B (en) * 2022-11-09 2023-02-21 青岛平电锅炉辅机有限公司 Deaerator welding quality detection method based on image processing
CN115906528A (en) * 2022-12-30 2023-04-04 山东理工大学 Automatic preprocessing method, system, equipment and storage medium for welding structure model

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101944233B (en) * 2010-09-25 2012-09-05 西北工业大学 Method for quickly extracting airport target in high-resolution remote sensing image
CN102750703B (en) * 2012-06-27 2015-01-07 北京航空航天大学 Remote sensing image airport automatic detecting method based on linear cutting
CN104417489B (en) * 2013-08-29 2017-07-11 同观科技(深圳)有限公司 A kind of car belt detection method and car belt detection means
CN104034732B (en) * 2014-06-17 2016-09-28 西安工程大学 A kind of fabric defect detection method of view-based access control model task-driven
CN104376551A (en) * 2014-08-25 2015-02-25 浙江工业大学 Color image segmentation method integrating region growth and edge detection

Also Published As

Publication number Publication date
CN105158272A (en) 2015-12-16

Similar Documents

Publication Publication Date Title
CN105158272B (en) A kind of method for detecting textile defect
CN106846359B (en) Moving target rapid detection method based on video sequence
US6701005B1 (en) Method and apparatus for three-dimensional object segmentation
CN104504388B (en) A kind of pavement crack identification and feature extraction algorithm and system
CN106570510B (en) A kind of supermarket&#39;s commodity recognition method
CN109583365B (en) Method for detecting lane line fitting based on imaging model constrained non-uniform B-spline curve
CN104778458B (en) A kind of textile pattern search method based on textural characteristics
CN102999886A (en) Image edge detector and ruler raster grid line precision detection system
CN104021561A (en) Fabric fuzzing and pilling image segmentation method based on wavelet transformation and morphological algorithm
CN105069816B (en) A kind of method and system of inlet and outlet people flow rate statistical
CN102609723A (en) Image classification based method and device for automatically segmenting videos
CN109285183B (en) Multimode video image registration method based on motion region image definition
CN113240668B (en) Image digital feature distribution-based generated molten pool image quality evaluation method
CN108364300A (en) Vegetables leaf portion disease geo-radar image dividing method, system and computer readable storage medium
Liu et al. Towards industrial scenario lane detection: Vision-based agv navigation methods
CN106530292B (en) A kind of steel strip surface defect image Fast Identification Method based on line scan camera
CN109636785A (en) A kind of visual processing method identifying particles of silicon carbide
CN103438802B (en) Optical fiber coating geometric parameter measurement method
CN103578121A (en) Motion detection method based on shared Gaussian model in disturbed motion environment
CN112507789A (en) Construction site safety behavior monitoring working method under block chain network state
CN112507788A (en) Method for extracting abnormal behaviors of construction site by using neural network training behavior pictures
JP3826412B2 (en) Edge detection method and edge detection apparatus
CN111882549A (en) Automatic detection and identification method and system for grayish green small foreign fibers
CN111461003A (en) Coal-fired working condition identification method based on video image sequence feature extraction
CN106447685B (en) A kind of infrared track method

Legal Events

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