CN103955922B - Method for detecting flaws of printed fabric based on Gabor filter - Google Patents

Method for detecting flaws of printed fabric based on Gabor filter Download PDF

Info

Publication number
CN103955922B
CN103955922B CN201410155241.3A CN201410155241A CN103955922B CN 103955922 B CN103955922 B CN 103955922B CN 201410155241 A CN201410155241 A CN 201410155241A CN 103955922 B CN103955922 B CN 103955922B
Authority
CN
China
Prior art keywords
gabor
printed fabric
parameter
image
function
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
CN201410155241.3A
Other languages
Chinese (zh)
Other versions
CN103955922A (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.)
XI'AN HUODE IMAGE TECHNOLOGY CO., LTD.
Original Assignee
Xian Polytechnic 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 Xian Polytechnic University filed Critical Xian Polytechnic University
Priority to CN201410155241.3A priority Critical patent/CN103955922B/en
Publication of CN103955922A publication Critical patent/CN103955922A/en
Application granted granted Critical
Publication of CN103955922B publication Critical patent/CN103955922B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a method for detecting flaws of printed fabric based on a Gabor filter. The method comprises the steps that the basic Gabor filter is established and Gabor parameters are extracted; the extracted Gabor parameters are selected, intersected and varied, the Gabor parameters are changed, the parameters with the high adaption degree of an objective function are selected, through intersection and variation, the selected parameter with the high adaption degree are transformed, and therefore parameters with the highest adaption degree are generated; according to a Gabor parameter direction theta and the center frequency u0 which are selected through a genetic algorithm, rotation transformation is conducted on the obtained Gabor parameters, and therefore effective flawless printed fabric textural feature information is extracted; Gabor filtering convolution operation is conducted on a printed fabric image to be detected and a flawless printed fabric image, so that texture background information of printed fabric to be detected is extracted; binaryzation is conducted on the printed fabric image to be detected and the flawless printed fabric image, so that a flaw detection result of the printed fabric is obtained. The method for detecting the flaws of the printed fabric based on the Gabor filter can improve detection efficiency and detection accuracy.

Description

PRINTED FABRIC defect detection method based on gabor wave filter
Technical field
The invention belongs to textile defect detection method and technology field, it is related to a kind of knit based on the stamp of gabor wave filter Thing defect detection method.
Background technology
Flaw on PRINTED FABRIC has a great impact to its selling price, and the price reduction scope that can lead to product is in original cost lattice 45%~65%.At present, in the detection of actual PRINTED FABRIC, manual detection occupies leading position, but there is detection speed relatively Slow and detect the relatively low problem of success rate, according to statistics, typically artificial detection speed is about 15m/min~20m/min, and artificial The accuracy of detection is only 60%~70%.Because accuracy rate is relatively low, enterprise's big more options detecting system replaces manually carrying out Detection, existing most widely used detecting system is i-tex checking system, and high hardware maintenance result in i-tex checking system Application have received restriction.
On the basis of a series of detection algorithm softwares based on PRINTED FABRIC, PRINTED FABRIC detection method is broadly divided into three Kind, it is respectively: the PRINTED FABRIC flaw detection method based on statistics, model and spectrum.Statistics-Based Method is: by input figure It is defined as " energy " as capturing textural characteristics in each image response of each pixel in a window, conci and The proenca estimation (fd) of fractal dimension to check the fault of input PRINTED FABRIC image, by processing image information, modification Different boxes counts, and decreases complexity of the calculation to greatest extent, improves work efficiency;But, unique weakness is Detection flaw has high rate of false alarm and positioning precision is poor.It is can to build similar texture to mate based on the advantage of model method The texture observed, the cohen of Drexel University of the U.S., submits to (gmrf) detection to spin using Gaussian Markovian at random Woven fabric, its parameter is derived from indefectible PRINTED FABRIC image and obtained preferable testing result, but this method also have scarce Point, such as: be difficult to reduce the complexity of input picture analysis it is impossible to realize the quick detection of fabric.Method based on spectrum is suitable for In the material of random grain, tsai and heish detects the textural defect of directivity with the dft combining, can keep gray scale Level image local flaw, and delete the information of the grain direction of all of homogeneity and directivity, but it is indefectible to manipulate homogeneity The related frequency content in region brings tremendous influence may to the frequency content of defect areas.
Many studies demonstrate that, gabor wave filter widely uses in jet recorded matter on fabric defect detection field, in spatial domain and frequency domain In, there is a unique best located and multiple directions and size.Generally, the Defect Detection side based on gabor function Method can be divided into two classes: a class is to characterize channel characteristics with a series of gabor wave filter, can draw the inspection of fabric defects Survey result;Another kind of method is to select optimal gabor wave filter.
Content of the invention
It is an object of the invention to provide a kind of PRINTED FABRIC defect detection method based on gabor wave filter, can improve Detection efficiency and accuracy in detection.
The technical solution adopted in the present invention is, based on the PRINTED FABRIC defect detection method of gabor wave filter, specifically to press Implement according to following steps:
Step 1, set up basic gabor wave filter, extract gabor parameter;
Step 2, utilize genetic algorithm, the gabor parameter extracted through step 1 is carried out successively select according to human body gene, Intersect, make a variation, change the gabor parameter obtaining through step 1;Then the high parameter of selection target function fitness, through intersect and The mutation operation parameter high to the fitness selected enters line translation, produces fitness highest parameter;
Step 3, the direction θ and mid frequency u of the gabor parameter being selected according to genetic algorithm0, to obtain through step 2 Gabor parameter carries out rotation transformation, after rotation transformation, extracts the textural characteristics letter of effectively indefectible PRINTED FABRIC Breath;
Step 4, the convolution of gabor filtering of respectively PRINTED FABRIC image to be detected and indefectible PRINTED FABRIC image being carried out Operation, extracts PRINTED FABRIC grain background information to be detected;
Step 5, the PRINTED FABRIC image to be detected processing through step 4 and indefectible PRINTED FABRIC image are carried out two respectively Value is processed, and obtains PRINTED FABRIC Defect Detection result.
The feature of the present invention also resides in,
Step 1.1, set up 2-d-gabor filter function, specifically implement in accordance with the following methods:
The 2-d-gabor filter function frequency given sine wave and the direction of rotation respectively set up;2-d-gabor filters Function is through two-dimensional Gaussian function modulation, is directed to three parameters in spatial domain, and three parameters are respectively (σx, σy) With direction θ, x and y rotate to x' and y' value, σ with (0, π) scope by direction θxFor 2-d-gabor filter function along x-axis side Difference, σyFor 2-d-gabor filter function along y-axis variance;
Will be as follows for the 2-d-gabor filter function in two-dimensional space domain:
The 2-d-gabor filter function specific algorithm obtaining after varied is as follows:
G (x, y)=ge(x,y)+jgo(x,y) (2);
Wherein,u0Represent mid frequency;
By 2-d-gabor filter function based on formula (1), in formula (3), the real part of 2-d-gabor filter function is as idol Symmetrical gabor wave filter is detecting the blur portion of PRINTED FABRIC;In formula (4), the imaginary part of 2-d-gabor filter function is as strange Symmetrical gabor wave filter, for detecting the marginal portion of PRINTED FABRIC;
Step 1.2, the real part of the 2-d-gabor filter function set up using step 1.1 build gabor wave filter, specifically Implement in accordance with the following methods:
The real part of the 2-d-gabor filter function set up in step 1.1 is used for carrying out PRINTED FABRIC Defect Detection, The 2d-gabor filter function algorithm specific as follows of gabor wave filter is implemented:
σy=λ σx(5);
Wherein, t1And t2It is the conversion parameter along x-axis and y-axis respectively, λ is the variance ratio between x-axis and y-axis, 2-d- Gabor filter function is obtained by rotating and scaling basic gabor function;
Step 1.3, extraction gabor parameter:
Extract gabor parameter from the gabor wave filter constructing through step 1.2, the gabor parameter of extraction is: ω, t1, t2,λ,θ,u0.
Step 2 is specifically implemented according to following steps:
Step 2.1, the gabor parameter extracting through step 1 is encoded:
In genetic algorithm, the individuality of each genetic algorithm gabor parameter is made up of 48 binary codes;48 ' 0' table Show that the binary code parameter of minimum is individual;48 ' 1' represents that maximum binary code parameter is individual;Colony represents all ginsengs Number group of individuals;
Step 2.2, construction object function e:
Object function e in genetic algorithm is the standard of assessment gabor parameter, by 2-d-gabor filter function and standard The minima of PRINTED FABRIC difference assessing gabor parameter, for determining the gabor parameter of optimum;
Optimum gabor wave filter has the envelope most like with grey level's distribution of indefectible PRINTED FABRIC image, Meet PRINTED FABRIC texture feature information, in order to construct an optimum gabor wave filter, object function e calculation specific as follows Method is implemented:
In above formula, im is the indefectible PRINTED FABRIC image of input, and ω is that gabor coefficient is knitted for coordinating indefectible stamp Dependency between the result of gray value im (x, y) of object image and 2-d-gabor function real part;
During optimizing, variance ratio is limited in [1.0,2.0];Radial frequency has the model of good experimental result Enclose is [1.9,5.7];The size of the Gaussian envelope window of gabor wave filter is 1;Based on the balance of gabor function, direction θ Scope be [0, π];
Step 2.3, selection gabor parameter are individual.
Step 2.3 is specifically implemented according to following steps:
Step 2.3.1, initial population:
Initial colony is built by binary code, characterizes gabor parameter ω, t using binary code (0 | 1)1, t2, λ, θ, u0
Step 2.3.2, the object function e obtaining through step 2.2, select in initial population, remove object function result Maximum individuality, will select the individuality obtaining as optimum individual;
Step 2.3.3, gabor parameter forms two individualities, and two individualities are taken advantage of with crossover probability (0,1) and individual lengths The long-pending crossover location determining is exchanged with each other;
Step 2.3.4, the individuality after step 2.3.3 is intersected, with the product of mutation probability (0,0.1) and individual lengths The variable position determining enters row variation, the binary code 0 of individual variation position will be changed into 1,1 and be changed into 0:
In initial population, 100 change individuality individual by intersecting with mutation operation, using the result of object function e as choosing Select the standard of individuality, often execute once selection step, reduce by 20 object function highest parameters individual, until 100 parameters Individual amount becomes zero, obtains the minimum parameter individuality of object function result, finally will obtain parameter individuality and be converted to decimal scale Gabor parameter.
The gabor parameter being obtained by genetic algorithm in step 3, is specifically pressed following algorithm and implements:
In above formula, parameter θgaWith parameter u0gaIt is the gabor parameter obtaining from genetic algorithm respectively, in genetic algorithm, The mid frequency θ of gabor wave filtergaWith direction selection range respectively 1.9 multiple and increased with the multiple of π/6, converted after The direction θ obtaining and mid frequency u0The gabor wave filter constructing is used for extracting indefectible PRINTED FABRIC grain background information; The gabor parameter that remaining is obtained by genetic algorithm is directly used in the gabor wave filter of optimum.
The convolution operation method of the gabor filtering in step 4 is specific as follows:
The filtering image amplitude-frequency response of 2-d-gabor wave filter is implemented according to following algorithm:
I (x, y) is input PRINTED FABRIC image, the image i of outputi(x, y) is the PRINTED FABRIC figure after a filtration Picture, the convolution algorithm that * represents, ge (x, y) and go(x, y) represents real part and the imaginary part of 2-d-gabor filter function respectively;
The real part of 2-d-gabor filter function as PRINTED FABRIC image filter, realize PRINTED FABRIC image filtering by Following algorithm is implemented:
Step 5.1, before binaryzation is carried out to PRINTED FABRIC image to be detected and indefectible PRINTED FABRIC image, use PRINTED FABRIC image to be detected after median filter smothing filtering and the noise of indefectible PRINTED FABRIC image generation;
Step 5.2, after step 5.1 Denoising disposal, respectively by the PRINTED FABRIC image to be detected obtaining and indefectible PRINTED FABRIC image carries out binary conversion treatment, indefectible PRINTED FABRIC is carried out with threshold value determination, threshold value scope, to be detected PRINTED FABRIC part defective carries out flaw segmentation;
Threshold value determination method, specifically implements in accordance with the following methods:
(1) indefectible PRINTED FABRIC image is selected to obtain the center window w of filter result b (x, y) through step 4;
(2) highest gray value and the lowest gray value of center window w are calculated respectively, using highest gray value as threshold value λmax, Using lowest gray value as threshold value λmin, specifically implement according to following algorithm:
PRINTED FABRIC flaw dividing method, specifically implements in accordance with the following methods:
PRINTED FABRIC to be detected obtains filtered image b (x, y) through step 4, according to the segmentation threshold λ obtainingmax With segmentation threshold λminSplit, obtained bianry image d (x, y), specifically obtained according to following algorithm:
If the gray value of PRINTED FABRIC image to be detected, within the threshold range obtaining through step 5.1, is entered as 0, It is normal fabric region;
If the gray value of PRINTED FABRIC image to be detected, outside the threshold range obtaining through step 5.1, is entered as 255, as flaw fabric extent.
The beneficial effects of the present invention is:
(1) present invention avoids the limitation of gabor parameter based on the PRINTED FABRIC defect detection method of gabor wave filter Property, so that the gabor wave filter of construction is mated most with PRINTED FABRIC background information;
(2) based in the PRINTED FABRIC defect detection method of gabor wave filter, gabor parameter binary system enters the present invention Row coding, improves the precision of gabor parameter, makes the gabor wave filter of construction have the extractability of good texture information;
(3) based in the PRINTED FABRIC defect detection method of gabor wave filter, it is flawless that object function passes through standard to the present invention Defect PRINTED FABRIC, to mate gabor wave filter, obtains gabor wave filter and the PRINTED FABRIC gray scale envelope of gabor parametric configuration Closest, enable the gabor wave filter of construction to extract maximally effective PRINTED FABRIC to be detected;
(4) present invention, based in the PRINTED FABRIC defect detection method of gabor wave filter, is calculated in the training stage Excellent gabor parameter ω, t1, t2, λ, θ, u0, by gabor parameter ω, t1, t2, λ, θ, u0The optimal gabor wave filter of construction The various flaws of corresponding PRINTED FABRIC to be detected can be detected;In detection-phase, the high speed of PRINTED FABRIC defect detection makes it throw Enter modern technologies industry and provide probability.
Brief description
Fig. 1 is the flow chart of the automatic defect inspection method that the present invention is processed based on graphic image.
Specific embodiment
The present invention is described in detail with reference to the accompanying drawings and detailed description.
The PRINTED FABRIC defect detection method based on gabor wave filter for the present invention, as shown in figure 1, specifically according to following step Rapid enforcement:
Step 1, set up basic gabor wave filter, extract gabor parameter:
Step 1.1, set up 2-d-gabor filter function, specifically implement in accordance with the following methods:
Set up 2-d-gabor filter function, 2-d-gabor filter function is a complicated exponential function, gives respectively The frequency of sine wave and the direction of rotation;2-d-gabor filter function is through two-dimensional Gaussian function modulation, is directed to Three parameters in spatial domain, three parameters are respectively (σx, σy) and direction θ, x and y rotate to x' with (0, π) scope by direction θ With y' value, σxFor 2-d-gabor filter function along x-axis variance, σyFor 2-d-gabor filter function along y-axis variance;
The 2-d-gabor filter function in two-dimensional space domain is expressed as:
The 2-d-gabor filter function specific algorithm obtaining after formula (1) is changed is as follows:
G (x, y)=ge(x,y)+jgo(x,y) (2);
Wherein,u0Represent mid frequency;
Using formula (1) as the basic 2-d-gabor filter function set up, the 2-d-gabor filtering letter shown in formula (3) The real part of number to detect the blur portion of PRINTED FABRIC as even symmetry gabor wave filter;2-d-gabor shown in formula (4) The imaginary part of filter function as odd symmetry gabor wave filter, for detecting the marginal portion of PRINTED FABRIC;
Step 1.2, the real part of the 2-d-gabor filter function set up using step 1.1 build gabor wave filter, specifically Implement in accordance with the following methods:
The real part of the 2-d-gabor filter function set up in step 1.1 is used for carrying out PRINTED FABRIC Defect Detection, only transports Extract being mainly due to of PRINTED FABRIC feature: 2-d-gabor filter function with the real part of 2-d-gabor filter function Imaginary part not only need substantial amounts of calculating, and the effect also for Defect Detection is not significantly improved, therefore gabor filtering The 2d-gabor filter function algorithm specific as follows of device is implemented:
σy=λ σx(5);
Wherein, t1And t2It is the conversion parameter along x-axis and y-axis respectively, λ is the variance ratio between x-axis and y-axis, 2-d- Gabor filter function is obtained by rotating and scaling basic gabor function, and specific direction and size are to PRINTED FABRIC defect Point has powerful power of influence, so it is most important for searching for optimal gabor wave filter in arbitrary direction and size;
Step 1.3, extraction gabor parameter:
Extract gabor parameter from the gabor wave filter constructing through step 1.2, the gabor parameter of extraction is: ω, t1, t2,λ,θ,u0
Gabor parameter ω, t1,t2,λ,θ,u0, determine gabor wave filter shape, the centre coordinate of gabor wave filter and The envelope window of gabor wave filter, thus determining the filtering performance of gabor wave filter, is the important ginseng of construction gabor wave filter Number.
Step 2, utilize genetic algorithm, the gabor parameter extracted through step 1 is carried out successively select according to human body gene, Intersect, make a variation, change the gabor parameter obtaining through step 1;Then the high parameter of selection target function fitness, through intersect and The mutation operation parameter high to the fitness selected enters line translation, generation fitness highest parameter:
Step 2.1, the gabor parameter extracting through step 1 is encoded:
In genetic algorithm, the individuality of each genetic algorithm gabor parameter is made up of 48 binary codes;48 ' 0' table Show that the binary code parameter of minimum is individual;48 ' 1' represents that maximum binary code parameter is individual;Colony represents all ginsengs Number group of individuals;
Step 2.2, construction object function e:
Object function e in genetic algorithm is the standard of assessment gabor parameter, by 2-d-gabor filter function and standard The minima of PRINTED FABRIC difference, to assess gabor parameter, so can make the envelope of gabor wave filter and the information of PRINTED FABRIC Distribution tends to closest, for determining the gabor parameter of optimum, is finally reached effective extraction PRINTED FABRIC texture feature information Purpose;
Optimum gabor wave filter has the envelope most like with grey level's distribution of indefectible PRINTED FABRIC image, To meet PRINTED FABRIC texture feature information, in order to construct an optimum gabor wave filter, object function e is specific as follows Algorithm is implemented:
In formula (6), im is the indefectible PRINTED FABRIC image of input, and ω is gabor coefficient for coordinating indefectible stamp Dependency between the result of gray value im (x, y) of textile image and 2-d-gabor function real part;
During optimizing, variance ratio is limited in [1.0,2.0];Radial frequency has the model of good experimental result Enclose is [1.9,5.7];The size of the Gaussian envelope window of gabor wave filter is 1;Based on the balance of gabor function, direction θ Generally scope is [0, π];
Step 2.3, selection gabor parameter are individual, specifically implement according to following steps:
Step 2.3.1, initial population:
Initial colony is built by binary code, characterizes gabor parameter ω, t using binary code (0 | 1)1, t2, λ, θ, u0So that selection, intersection, mutation operation are conveniently;
Step 2.3.2, the object function e obtaining through step 2.2, select in initial population, remove object function result Maximum individuality, will select the individuality obtaining as optimum individual;
Step 2.3.3, gabor parameter forms two individualities, and two individualities are taken advantage of with crossover probability (0,1) and individual lengths The long-pending crossover location determining is exchanged with each other;
Step 2.3.4, the individuality after step 2.3.3 is intersected, with the product of mutation probability (0,0.1) and individual lengths The variable position determining enters row variation, the binary code 0 of individual variation position will be changed into 1,1 and be changed into 0:
In initial population, 100 change individuality individual by intersecting with mutation operation, using the result of object function e as choosing Select the standard of individuality, often execute once selection step, reduce by 20 object function highest parameters individual, until 100 parameters Individual amount becomes zero, obtains the minimum parameter individuality of object function result, finally will obtain parameter individuality and be converted to decimal scale Gabor parameter.
Step 3, the direction θ and mid frequency u of the gabor parameter being selected according to genetic algorithm0, to obtain through step 2 Gabor parameter carries out rotation transformation, and after specific rotation transformation, the texture extracting effectively indefectible PRINTED FABRIC is special Reference ceases:
The gabor parameter being obtained by genetic algorithm, is specifically pressed following algorithm and implements:
The purpose of operation is to adapt to PRINTED FABRIC texture feature information, realizes Defect Detection;
In formula (7), parameter θgaWith parameter u0gaIt is the gabor parameter obtaining from genetic algorithm respectively, in genetic algorithm, The mid frequency θ of gabor wave filtergaIncrease with the multiple of direction selection range difference 1.9 with the multiple of π/6, through formula (7) the direction θ being converted to and mid frequency u0The gabor wave filter constructing is used for extracting indefectible PRINTED FABRIC texture Background information;The gabor parameter that remaining is obtained by genetic algorithm is directly used in the gabor wave filter of optimum.
Step 4, the convolution of gabor filtering of respectively PRINTED FABRIC image to be detected and indefectible PRINTED FABRIC image being carried out Operation, extracts PRINTED FABRIC grain background information to be detected, and the convolution operation method of gabor filtering is specific as follows:
The filtering image amplitude-frequency response of 2-d-gabor wave filter is implemented according to following algorithm:
I (x, y) is input PRINTED FABRIC image, the image i of outputi(x, y) is the PRINTED FABRIC figure after a filtration Picture, the convolution algorithm that * represents, ge (x, y) and go(x, y) represents real part and the imaginary part of 2-d-gabor filter function respectively;
In the present invention, the real part of 2-d-gabor filter function, as PRINTED FABRIC image filter, realizes PRINTED FABRIC Image filtering is pressed following algorithm and is implemented:
Step 5, the PRINTED FABRIC image to be detected processing through step 4 and indefectible PRINTED FABRIC image are carried out two respectively Value is processed, and obtains PRINTED FABRIC Defect Detection result;
Step 5.1, before binaryzation is carried out to PRINTED FABRIC image to be detected and indefectible PRINTED FABRIC image, in order to Mitigate various noises, with the PRINTED FABRIC image to be detected after median filter smothing filtering and indefectible PRINTED FABRIC image The noise producing;
Step 5.2, after step 5.1 Denoising disposal, respectively by the PRINTED FABRIC image to be detected obtaining and indefectible PRINTED FABRIC image carries out binary conversion treatment, indefectible PRINTED FABRIC is carried out with threshold value determination, threshold value scope, to be checked Survey PRINTED FABRIC part defective and carry out flaw segmentation;
Indefectible PRINTED FABRIC image obtains filter result b (x, y) after step 4 process, by the maximum of filter result Value and minima, respectively as max-thresholds and minimum threshold, form a threshold range;
Threshold value determination method, specifically implements in accordance with the following methods:
(1) indefectible PRINTED FABRIC image is selected to obtain the center window w of filter result b (x, y) through step 4;
(2) highest gray value and the lowest gray value of center window w are calculated respectively, using highest gray value as threshold value λmax, Using lowest gray value as threshold value λmin, specifically implement according to following algorithm:
PRINTED FABRIC flaw dividing method, specifically implements in accordance with the following methods:
PRINTED FABRIC to be detected obtains filtered image b (x, y) through step 4, according to the segmentation threshold λ obtainingmax With segmentation threshold λminSplit, obtained bianry image d (x, y), specifically obtained according to following algorithm:
If the gray value of PRINTED FABRIC image to be detected, within the threshold range obtaining through step 5.1, is entered as 0, It is normal fabric region;
If the gray value of PRINTED FABRIC image to be detected, outside the threshold range obtaining through step 5.1, is entered as 255, as flaw fabric extent.
In the result of PRINTED FABRIC defect detection, false alarm (fa) the i.e. white portion of binary result image comprises phase Defect area in the textile image answered, and comprise to occupy all result of the tests away from others white portion defective 5%.
In detection PRINTED FABRIC and greige goods fabric, the correct verification and measurement ratio of fabric defects reaches 95%.
The principle of the PRINTED FABRIC defect detection method based on gabor wave filter of the present invention and advantage:
The parameter that the PRINTED FABRIC defect detection approach application based on gabor wave filter for the present invention is selected constructs optimum Gabor wave filter solving the problems, such as defect detection, in object function, indefectible PRINTED FABRIC image supervision gabor filtering Device, genetic algorithm reaches the minima of object function, thus finding suitable parameter to generate the gabor wave filter of optimum;Profit With optimum gabor wave filter texture feature extraction, thus detection obtains PRINTED FABRIC fault, the performance of gabor wave filter according to Rely in parameter, and parameter is automatically selecting based on genetic algorithm, it is proposed that fabric defects detect on the basis of this idea New method.
The present invention includes training part and Defect Detection part based on the automatic defect inspection method that graphic image is processed, Escofet employs multiple dimensioned and multidirectional gabor wave filter and carries out fabric defects detection, and this proves a large amount of gabor filtering The feature that device extracts can describe cloth textured feature.The shortcoming of said method is to be led to huge using substantial amounts of wave filter Computation burden, thus stop effectively implement in real time;The present invention based on graphic image process automatic defect inspection method with The method of escofet is compared, and realizes the little successful Defect Detection with pattern fabric of Defect Detection amount of calculation.
Embodiment:
Input indefectible PRINTED FABRIC image first, 100 parameters are individual to substitute into object function, removes object function the most every time High 20 are individual, then individuality intersected, variation, then substitute into object function, selected, cross and variation, until parameter Individuality is changed into 0, preserves object function minimum parameter individual;The parameter obtaining individuality is converted to decimal number, then by center Frequency and direction are changed, and the parameter obtaining is substituted into gabor wave filter, first indefectible PRINTED FABRIC image is filtered Ripple, obtains maximum gradation value and the minimum gradation value of filtering rear center window, using maximum gradation value and minimum gradation value as Big threshold value and minimum threshold, then PRINTED FABRIC image to be measured is filtered, according to the threshold value obtaining, to testing image two-value Change, obtain PRINTED FABRIC defect detection result.

Claims (5)

1. the PRINTED FABRIC defect detection method based on gabor wave filter is it is characterised in that specifically implement according to following steps:
Step 1, set up basic gabor wave filter, extract gabor parameter, specifically implement according to following steps:
Step 1.1, set up 2-d-gabor filter function, specifically implement in accordance with the following methods:
The 2-d-gabor filter function frequency given sine wave and the direction rotating respectively;2-d-gabor filter function be through Two-dimensional Gaussian function modulation, it is directed to three parameters in spatial domain, three parameters are respectively (σx, σy) and direction θ, X and y is rotated to x' and y' value, σ with (0, π) scope by direction θxFor 2-d-gabor filter function along x-axis variance, σyFor 2-d- Gabor filter function is along the variance of y-axis;
The 2-d-gabor filter function in two-dimensional space domain is expressed as:
g ( x , y ) = 1 2 πσ x σ y exp { - 1 2 [ ( x ′ σ x ) 2 + ( y ′ σ y ) 2 ] } exp ( j 2 πu 0 x ′ ) - - - ( 1 ) ;
x ′ y ′ = c o s θ - sin θ s i n θ cos θ x y ;
The 2-d-gabor filter function specific algorithm obtaining after formula (1) is changed is as follows:
G (x, y)=ge(x,y)+jgo(x,y) (2);
g e ( x , y ) = exp { - 1 2 [ ( x ′ σ x ) 2 + ( y ′ σ y ) 2 ] } c o s ( 2 πu 0 x ′ ) - - - ( 3 ) ;
g o ( x , y ) = exp { - 1 2 [ ( x ′ σ x ) 2 + ( y ′ σ y ) 2 ] } sin ( 2 πu 0 x ′ ) - - - ( 4 ) ;
Wherein,u0Represent mid frequency;
Using formula (1) as the basic 2-d-gabor filter function set up, the real part of the 2-d-gabor filter function shown in formula (3) To detect the blur portion of PRINTED FABRIC as even symmetry gabor wave filter;2-d-gabor filter function shown in formula (4) Imaginary part as odd symmetry gabor wave filter, for detecting the marginal portion of PRINTED FABRIC;
Step 1.2, the 2-d-gabor filter function that step 1.1 is set up real part build gabor wave filter, specifically according to Lower method is implemented:
The real part of the 2-d-gabor filter function set up in step 1.1 is used for carrying out PRINTED FABRIC Defect Detection, gabor filters The 2d-gabor filter function algorithm specific as follows of ripple device is implemented:
g e ( x , y ) = exp { - 1 2 [ ( x ′ σ x ) 2 + ( y ′ σ y ) 2 ] } c o s ( 2 πu 0 x ′ )
x ′ y ′ = c o s θ - s i n θ s i n θ cos θ x - t 1 y - t 2 ;
σy=λ σx(5);
Wherein, t1And t2It is the conversion parameter respectively along x-axis and y-axis, λ is the variance ratio between x-axis and y-axis, 2-d-gabor filters Wave function is obtained by rotating and scaling basic gabor function;
Step 1.3, extraction gabor parameter:
Extract gabor parameter from the gabor wave filter constructing through step 1.2, the gabor parameter of extraction is: ω, t1,t2,λ, θ,u0
Step 2, utilize genetic algorithm, the gabor parameter extracted through step 1 carried out successively select, intersect according to human body gene, Variation, changes the gabor parameter obtaining through step 1;Then the high parameter of selection target function fitness, through behaviour of intersecting and make a variation The high parameter of the fitness selected of opposing enters line translation, produces fitness highest parameter, specifically implements according to following steps:
Step 2.1, the gabor parameter extracting through step 1 is encoded:
In genetic algorithm, the individuality of each genetic algorithm gabor parameter is made up of 48 binary codes;48 ' 0' represents Little binary code parameter is individual;48 ' 1' represents that maximum binary code parameter is individual;Colony represents all parameters The set of body;
Step 2.2, construction object function e:
Object function e in genetic algorithm is the standard of assessment gabor parameter, by 2-d-gabor filter function and standard stamp The minima of fabric difference assessing gabor parameter, for determining the gabor parameter of optimum;
Optimum gabor wave filter has the envelope most like with grey level's distribution of indefectible PRINTED FABRIC image, meets PRINTED FABRIC texture feature information, in order to construct an optimum gabor wave filter, object function e algorithm specific as follows is real Apply:
e = min ω , t 1 , t 2 , λ , θ , u 0 [ σ x , y ( i m ( x , y ) - ωg e ( x , y ) ) 2 ] - - - ( 6 ) ;
In above formula, im is the indefectible PRINTED FABRIC image of input, and ω is gabor coefficient for coordinating indefectible PRINTED FABRIC figure Dependency between the result of gray value im (x, y) of picture and 2-d-gabor function real part;
During optimizing, variance ratio is limited in [1.0,2.0];The scope that radial frequency has good experimental result is [1.9,5.7];The size of the Gaussian envelope window of gabor wave filter is 1;Based on the balance of gabor function, the model of direction θ Enclose is [0, π];
Step 2.3, selection gabor parameter are individual;
Step 3, the direction θ and mid frequency u of the gabor parameter being selected according to genetic algorithm0, to the gabor obtaining through step 2 Parameter carries out rotation transformation, after rotation transformation, extracts the texture feature information of effectively indefectible PRINTED FABRIC;
Step 4, respectively PRINTED FABRIC image to be detected and indefectible PRINTED FABRIC image are carried out gabor filtering convolution behaviour Make, extract PRINTED FABRIC grain background information to be detected;
Step 5, the PRINTED FABRIC image to be detected processing through step 4 and indefectible PRINTED FABRIC image are carried out binaryzation respectively Process, obtain PRINTED FABRIC Defect Detection result.
2. the PRINTED FABRIC defect detection method based on gabor wave filter according to claim 1 is it is characterised in that institute State step 2.3 specifically to implement according to following steps:
Step 2.3.1, initial population:
Initial colony is built by binary code, characterizes gabor parameter ω, t using binary code (0 | 1)1, t2, λ, θ, u0
Step 2.3.2, the object function e obtaining through step 2.2, select in initial population, remove object function result maximum Individuality, the individuality that obtains will be selected as optimum individual;
Step 2.3.3, gabor parameter forms two individualities, and two individualities are true with the product of crossover probability (0,1) and individual lengths Fixed crossover location is exchanged with each other;
Step 2.3.4, the individuality after step 2.3.3 is intersected, are determined with the product of mutation probability (0,0.1) and individual lengths Variable position enter row variation, the binary code 0 of individual variation position will be changed into 1,1 and be changed into 0:
In initial population, 100 change individuality individual by intersecting with mutation operation, will be alternatively individual for the result of object function e The standard of body, often executes once selection step, reduces by 20 object function highest parameters individual, until 100 parameter individualities Quantity becomes zero, obtains the minimum parameter individuality of object function result, finally will obtain parameter individuality and be converted to decimal scale gabor Parameter.
3. the PRINTED FABRIC defect detection method based on gabor wave filter according to claim 1 is it is characterised in that institute State the gabor parameter obtaining by genetic algorithm in step 3, specifically press following algorithm and implement:
θ = θ g a - 5 6 π u 0 = u 0 g a - 1.9 - - - ( 7 ) ;
In above formula, parameter θgaWith parameter u0gaIt is the gabor parameter obtaining from genetic algorithm respectively, in genetic algorithm, gabor The mid frequency θ of wave filtergaWith direction selection range respectively 1.9 multiple and increased with the multiple of π/6, converted after obtain Direction θ and mid frequency u0The gabor wave filter constructing is used for extracting indefectible PRINTED FABRIC grain background information;Remaining by The gabor parameter that genetic algorithm obtains directly is used in the gabor wave filter of optimum.
4. the PRINTED FABRIC defect detection method based on gabor wave filter according to claim 1 is it is characterised in that institute State in step 4 gabor filtering convolution operation method specific as follows:
The filtering image amplitude-frequency response of 2-d-gabor wave filter is implemented according to following algorithm:
i i ( x , y ) = { [ g e ( x , y ) * i ( x , y ) ] 2 + [ g o ( x , y ) * i ( x , y ) ] 2 } 1 2 - - - ( 8 ) ;
I (x, y) is input PRINTED FABRIC image, the image i of outputi(x, y) is the PRINTED FABRIC image after a filtration, and * represents Convolution algorithm, ge(x, y) and go(x, y) represents real part and the imaginary part of 2-d-gabor filter function respectively;
The real part of 2-d-gabor filter function, as PRINTED FABRIC image filter, realizes PRINTED FABRIC image filtering by as follows Algorithm is implemented:
i i ( x , y ) = { [ g e ( x , y ) * i ( x , y ) ] 2 } 1 2 - - - ( 9 ) .
5. the PRINTED FABRIC defect detection method based on gabor wave filter according to claim 1 is it is characterised in that institute State step 5 specifically to implement according to following steps:
Step 5.1, before binaryzation is carried out to PRINTED FABRIC image to be detected and indefectible PRINTED FABRIC image, with intermediate value The filtered PRINTED FABRIC image to be detected of filter smoothing and the noise of indefectible PRINTED FABRIC image generation;
Step 5.2, after step 5.1 Denoising disposal, respectively by the PRINTED FABRIC image to be detected obtaining and indefectible stamp Textile image carries out binary conversion treatment, indefectible PRINTED FABRIC is carried out with threshold value determination, threshold value scope, to stamp to be detected Fabric part defective carries out flaw segmentation;
Threshold value determination method, specifically implements in accordance with the following methods:
(1) indefectible PRINTED FABRIC image is selected to obtain the center window w of filter result b (x, y) through step 4;
(2) highest gray value and the lowest gray value of center window w are calculated respectively, using highest gray value as threshold value λmax, will Low gray value is as threshold value λmin, specifically implement according to following algorithm:
λ m a x = m a x x , y &element; w | b ( x , y ) | λ m i n = min x , y &element; w | b ( x , y ) | - - - ( 10 ) ;
PRINTED FABRIC flaw dividing method, specifically implements in accordance with the following methods:
PRINTED FABRIC to be detected obtains filtered image b (x, y) through step 4, according to the segmentation threshold λ obtainingmaxWith point Cut threshold value λminSplit, obtained bianry image d (x, y), specifically obtained according to following algorithm:
d ( x , y ) = 255 b ( x , y ) > &lambda; m a x o r b ( x , y ) < &lambda; min 0 b ( x , y ) &le; &lambda; m a x o r b ( x , y ) &greaterequal; &lambda; min - - - ( 11 ) ;
If the gray value of PRINTED FABRIC image to be detected, within the threshold range obtaining through step 5.1, is entered as 0, as Normal fabric region;
If the gray value of PRINTED FABRIC image to be detected, outside the threshold range obtaining through step 5.1, is entered as 255, that is, For flaw fabric extent.
CN201410155241.3A 2014-04-17 2014-04-17 Method for detecting flaws of printed fabric based on Gabor filter Active CN103955922B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410155241.3A CN103955922B (en) 2014-04-17 2014-04-17 Method for detecting flaws of printed fabric based on Gabor filter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410155241.3A CN103955922B (en) 2014-04-17 2014-04-17 Method for detecting flaws of printed fabric based on Gabor filter

Publications (2)

Publication Number Publication Date
CN103955922A CN103955922A (en) 2014-07-30
CN103955922B true CN103955922B (en) 2017-01-18

Family

ID=51333191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410155241.3A Active CN103955922B (en) 2014-04-17 2014-04-17 Method for detecting flaws of printed fabric based on Gabor filter

Country Status (1)

Country Link
CN (1) CN103955922B (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104751472B (en) * 2015-04-10 2017-06-23 浙江工业大学 Fabric defect detection method based on B-spline small echo and deep neural network
CN105184777A (en) * 2015-08-18 2015-12-23 西安工程大学 Painted design fabric defect detection method based on image decomposition
CN105205828B (en) * 2015-10-20 2019-03-19 江南大学 Knitted fabric flaw detection method based on Optimal Gabor Filters
CN105678767B (en) * 2016-01-07 2019-02-19 无锡信捷电气股份有限公司 A kind of cloth surface flaw detection method based on SoC Hardware/Software Collaborative Design
CN106204543B (en) * 2016-06-29 2019-08-06 江南大学 Fabric defect detection method based on single category support vector machines
CN107016664B (en) * 2017-01-18 2019-08-30 华侨大学 A kind of bad needle flaw detection method of large circle machine
CN108171688B (en) * 2017-12-19 2021-01-08 浙江大学 Wafer surface defect detection method based on Gabor characteristics and random dimensionality reduction
CN108010029B (en) * 2017-12-27 2020-11-03 江南大学 Fabric defect detection method based on deep learning and support vector data description
CN109166118A (en) * 2018-09-05 2019-01-08 深圳灵图慧视科技有限公司 Fabric surface attribute detection method, device and computer equipment
CN109858485A (en) * 2019-01-25 2019-06-07 东华大学 A kind of fabric defects detection method based on LBP and GLCM
CN111127383A (en) * 2019-03-15 2020-05-08 杭州电子科技大学 Digital printing online defect detection system and implementation method thereof
CN110363823B (en) * 2019-06-24 2022-10-21 南京理工大学 Gabor filter-based random image coding method
CN110570397B (en) * 2019-08-13 2020-12-04 创新奇智(重庆)科技有限公司 Method for detecting ready-made clothes printing defects based on deep learning template matching algorithm
CN110636307B (en) * 2019-08-26 2022-03-18 南京理工大学 Deterministic image coding method based on Gabor filter
CN112036541B (en) * 2020-10-16 2023-11-17 西安工程大学 Fabric defect detection method based on genetic algorithm optimization neural network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866427A (en) * 2010-07-06 2010-10-20 西安电子科技大学 Method for detecting and classifying fabric defects
CN102706881A (en) * 2012-03-19 2012-10-03 天津工业大学 Cloth defect detecting method based on machine vision
CN103234976A (en) * 2013-04-03 2013-08-07 江南大学 Warp knitting machine cloth flaw on-line visual inspection method based on Gabor transformation

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6753965B2 (en) * 2001-01-09 2004-06-22 The University Of Hong Kong Defect detection system for quality assurance using automated visual inspection

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101866427A (en) * 2010-07-06 2010-10-20 西安电子科技大学 Method for detecting and classifying fabric defects
CN102706881A (en) * 2012-03-19 2012-10-03 天津工业大学 Cloth defect detecting method based on machine vision
CN103234976A (en) * 2013-04-03 2013-08-07 江南大学 Warp knitting machine cloth flaw on-line visual inspection method based on Gabor transformation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
印花织物的疵点检测;付骞;《西安航空学院学报》;20130930;第31卷(第5期);第50-51页第1节, 第1.1-1.3节 *

Also Published As

Publication number Publication date
CN103955922A (en) 2014-07-30

Similar Documents

Publication Publication Date Title
CN103955922B (en) Method for detecting flaws of printed fabric based on Gabor filter
CN103234976B (en) Based on the online visible detection method of tricot machine Fabric Defect of Gabor transformation
Zhang et al. Fabric defect detection using salience metric for color dissimilarity and positional aggregation
CN105069807B (en) A kind of stamped workpieces defect inspection method based on image procossing
CN107389701A (en) A kind of PCB visual defects automatic checkout system and method based on image
CN108038853A (en) A kind of ceramic tile surface defect identification method based on convolutional neural networks and Active Learning
CN105277567B (en) A kind of fabric defects detection method
CN104268505A (en) Automatic cloth defect point detection and recognition device and method based on machine vision
CN107220649A (en) A kind of plain color cloth defects detection and sorting technique
CN101866427A (en) Method for detecting and classifying fabric defects
CN103208097B (en) Filtering method is worked in coordination with in the principal component analysis of the multi-direction morphosis grouping of image
CN102706881A (en) Cloth defect detecting method based on machine vision
CN103064063B (en) Poly-phase code radar signal waveform automatic identification method based on continuous wave Doppler (CWD) feature
CN107230205A (en) A kind of transmission line of electricity bolt detection method based on convolutional neural networks
Jing et al. Fabric defect detection based on golden image subtraction
CN107240086B (en) A kind of fabric defects detection method based on integral nomography
CN105261006B (en) Medical image segmentation algorithm based on Fourier transformation
Dixit et al. Image texture analysis-survey
CN103279744A (en) Multi-scale tri-mode texture feature-based method and system for detecting counterfeit fingerprints
CN111080574A (en) Fabric defect detection method based on information entropy and visual attention mechanism
CN107590785A (en) A kind of Brillouin spectrum image-recognizing method based on sobel operators
CN112508862B (en) Method for enhancing magneto-optical image of crack by improving GAN
CN113901947A (en) Intelligent identification method for tire surface flaws under small sample
Yan et al. Deeper and mixed supervision for salient object detection in automated surface inspection
CN106683149A (en) Optimization method for extracting synthetic aperture radar image straight lines

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CB03 Change of inventor or designer information

Inventor after: Zhao Jin

Inventor after: Jing Junfeng

Inventor after: Gao Yuan

Inventor before: Jing Junfeng

Inventor before: Li Pengfei

Inventor before: Yang Panpan

Inventor before: Zhang Hongwei

Inventor before: Zhang Lei

Inventor before: Zhang Huanhuan

CB03 Change of inventor or designer information
TR01 Transfer of patent right

Effective date of registration: 20170727

Address after: 710065 Shaanxi province Xi'an Beilin District Road No. 66 industrial innovation cooperation with university innovation and entrepreneurship monument forest community special room 1707-7

Patentee after: XI'AN HUODE IMAGE TECHNOLOGY CO., LTD.

Address before: 710048 Shaanxi province Xi'an Beilin District Jinhua Road No. 19

Patentee before: Xi'an Engineering Univ.

TR01 Transfer of patent right