CN105205828A - Warp knitted fabric flaw detection method based on optimal Gabor filter - Google Patents

Warp knitted fabric flaw detection method based on optimal Gabor filter Download PDF

Info

Publication number
CN105205828A
CN105205828A CN201510686033.0A CN201510686033A CN105205828A CN 105205828 A CN105205828 A CN 105205828A CN 201510686033 A CN201510686033 A CN 201510686033A CN 105205828 A CN105205828 A CN 105205828A
Authority
CN
China
Prior art keywords
gabor
image
particle
warp
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.)
Granted
Application number
CN201510686033.0A
Other languages
Chinese (zh)
Other versions
CN105205828B (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.)
Jiangnan University
Original Assignee
Jiangnan 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 Jiangnan University filed Critical Jiangnan University
Priority to CN201510686033.0A priority Critical patent/CN105205828B/en
Publication of CN105205828A publication Critical patent/CN105205828A/en
Application granted granted Critical
Publication of CN105205828B publication Critical patent/CN105205828B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20024Filtering details
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30124Fabrics; Textile; Paper

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention relates to a warp knitted fabric flaw detection method based on an optimal Gabor filter. The warp knitted fabric flaw detection method is characterized by comprising the following steps: step 1, constructing a Gabor filter and extracting Gabor filtering parameters; step 2, performing Gabor convolution processing on the image of a flawless warp knitted fabric, adopting a Fisher norm to construct a fitness function, and utilizing an quantum-behaved particle swarm optimization algorithm to optimize the Gabor filtering parameters extracted in the step 1 to obtain the optimal parameters of the Gabor filter; step 3, according to the optimal parameters of the Gabor filter, obtained in the step 2, performing Gabor convolution processing the image of the warp knitted fabric to be detected; step 4, performing binarization processing to obtain a flaw detection result of the warp knitted fabric. The flaw detection method can improve the flaw detection efficiency and accuracy of the warp knitted fabric.

Description

Based on the WARP-KNITTING flaw detection method of Optimal Gabor Filters
Technical field
The present invention relates to a kind of WARP-KNITTING flaw detection method based on Optimal Gabor Filters, belong to technical field of image processing.
Background technology
Domestic obtaining through volume industry develops fast, and while becoming the major production base of the world through compiling product, external Countries also emerges gradually through compiling industry, as some countries in Southeast Asia such as India, Vietnam, impels competition to strengthen.Be faced with competition, improve the quality of products and reduce the key that production cost becomes Business survival.Fabric defect is the principal element affecting cloth quality.According to investigations, due to the existence of fault, make fabric price reduce 45-65%, enterprise income is subject to very large loss.Current textile enterprise great majority still take the mode of artificial visually examine to detect fabric defects.The shortcoming of manual detection is: the restriction of (1) visual acuity and easy fatigue cause detecting instability; (2) artificial visually examine's Detection accuracy is low, and the Detection accuracy of skilled labor is difficult to more than 85%; (3) limited view of people, can not detect very wide region, the energy of people is limited simultaneously, often undetected situation can occur; (4) testing cost is higher, comprises the expenditures such as the training cost of a large amount of workman, wage.Therefore, the use of defect detection system in enterprise practical production run based on machine vision can improve the quality that tricot machine goes out cloth greatly, can reduce artificial simultaneously, save the production cost of enterprise, thus increase Competitive Products.
In general, after gathering WARP-KNITTING image, need preprocessing process be carried out, then carry out feature extraction and flaw differentiation.Pre-service, mainly in order to strengthen the contrast of image, making flaw information and the contrast of image background information obviously, needing in addition to carry out image denoising, remove the noise in image.Feature extraction, carries out analyzing and processing to image exactly, therefrom extracts suitable proper vector.Flaw differentiates, defect areas is detected exactly by certain sorter.Wherein feature extraction is the core link of flaw detection method, and in general, the method for feature extraction mainly contains statistic law, modelling and frequency domain method etc.Corpus--based Method method extracts feature can be divided into autocorrelation function, gray level co-occurrence matrixes, the methods such as Mathematical Morphology method and fractal theory.Extract feature based on modelling and have Wold model and Markov random field model etc.Extract feature based on frequency domain method and can be divided into Fourier transform, wavelet transformation and Gabor transformation etc.Gabor function is one group of similar measure through over-rotation and flexible process, it is one group of narrow band filter, good resolution characteristic is all had in spatial domain and frequency field, there are obvious set direction and frequency selective characteristic, can realize the best co-located of spatial domain and frequency domain, therefore Gabor transformation is applicable to the analysis of texture image.
Summary of the invention
The object of the invention is to overcome the deficiencies in the prior art, a kind of WARP-KNITTING flaw detection method based on Optimal Gabor Filters is provided, accuracy rate and the real-time of detection can be improved.
According to technical scheme provided by the invention,
In an embodiment, a kind of WARP-KNITTING flaw detection method based on Optimal Gabor Filters, feature is, comprises the following steps:
Step 1, structure Gabor filter, extract Gabor filtering parameter;
Step 2, Gabor process of convolution is carried out to indefectible WARP-KNITTING image, adopt Fisher criterion structure fitness function, utilization sub-line is that particle group optimizing (QPSO) algorithm carries out optimal treatment to the Gabor filtering parameter that step 1 is extracted, and obtains the optimized parameter of Gabor filter;
Step 3, the Gabor filter optimized parameter obtained by step 2, carry out Gabor process of convolution to WARP-KNITTING image to be detected;
Step 4, binary conversion treatment of carrying out obtain the Defect Detection result of WARP-KNITTING.
Further, described step 1 is implemented according to following steps:
Step 1.1, set up Gabor filter function, specifically implement in accordance with the following methods:
Gabor filter function G (x, y) is formed by two-dimentional Gaussian kernel function g (x, the y) modulation that the multiple sine function of directivity is tuning, and in the spatial domain, Gaussian kernel function relates to three parameter δ x, δ y, θ, wherein δ xfor the scale parameter on Gaussian kernel function x-axis direction, δ yfor the scale parameter on Gaussian kernel function y-axis direction, θ is the anglec of rotation of Gaussian kernel function, (x ', y ') be the coordinate that (x, y) rotates after θ angle; In frequency field, three parameters that Fourier transform relates to frequency are F 0, u 0, v 0, wherein F 0the centre frequency of oval Gabor filter function, u 0the centre frequency of Gabor filter function on x-axis direction, v 0it is the centre frequency of Gabor filter function on y direction;
Gabor filter function in two-dimensional space is expressed as:
G ( x , y ) = g ( x ′ , y ′ ) exp ( 2 π j ( F 0 x ′ 2 + y ′ 2 γ 2 + u 0 x ′ + v 0 y ′ ) ) - - - ( 1 ) ;
Wherein,
g ( x ′ , y ′ ) = 1 2 πδ x δ y exp ( - 1 2 ( x ′ 2 δ x 2 + y ′ 2 δ y 2 ) ) ;
x ′ y ′ = cos θ - sin θ sin θ cos θ x y ;
γ = δ y δ x ;
Step 1.2, Gabor filter function in spatial domain is obtained the Gabor filter function of frequency field through Fourier transform
G ^ ( u , v ) = 2 π α 2 exp ( - ( ( u - u 0 ) ′ 2 + γ ( v - v 0 ) ′ 2 - F 0 ) 2 2 α 2 ) ;
Wherein, α = 1 2 πδ x , ( u - u 0 ) ′ ( v - v 0 ) ′ = c o s θ - s i n θ sin θ cos θ ( u - u 0 ) ( v - v 0 ) ;
Step 1.3, the Gabor filter function constructed from step 1.2 middle extraction 6 Gabor filtering parameters (alpha, gamma, u 0, v 0, F 0, θ).
Further, the middle coefficient F of Gabor filter function G (x, y) of described step 1.1 structure owhen=0, be then modulated to 2-DGabor filter function G (x, y); u 0=0, v 0when=0, be then modulated to oval Gabor filter function G (x, y).
Further, described step 2 is implemented according to following steps:
Step 2.1, initialization population, comprise and determine maximum iteration time, search volume, the number of particle, the position of random initializtion particle;
Step 2.2, when first time iteration, the initial position of each particle is current individual desired positions; Gabor process of convolution is carried out to indefectible WARP-KNITTING image, adopts Fisher criterion structure fitness function, calculate the functional value that each particle is corresponding; The fitness function value of all particles finds the particle with minimum fitness function value after comparing, and the position of this particle is overall desired positions;
Step 2.3, the position of each particle to be upgraded, adopt the fitness function value obtaining each particle with step 2.2 same procedure, upgrade individual desired positions and overall desired positions;
Step 2.4, when reaching iteration termination condition, training terminate, overall desired positions is the optimal value of Gabor filtering parameter to be determined; Otherwise iterations adds 1, forward step 2.3 to.
Further, described step 2.1 is implemented according to following steps: iterations n=0 when establishing initial, and maximum iteration time is max_n; Gabor filtering parameter has (alpha, gamma, u 0, v 0f 0, θ), then search volume is 6 dimensions; The number of particle is M, and the initial position of each particle is wherein i=1,2 ..., M/
Further, in described step 2.2, the image R (x, y) of image after Gabor convolution can be expressed as:
R ( x , y ) = T ( x , y ) * G ( x , y ) = I D E F ( T ^ ( u , v ) G ^ ( u , v ) ) ;
Wherein, T (x, y) is indefectible WARP-KNITTING image, and R (x, y) is the image after Gabor filter convolution, and * is the convolution operation of image, be the Fourier transform of image T (x, y), IDFT is that inverse discrete Fourier transform changes;
The energy of the image R (x, y) after described Gabor convolution is expressed as:
E r ( x , y ) = [ R e ( x , y ) 2 + R o ( x , y ) 2 ] 1 2 ;
Wherein, R e ( x , y ) = I D F T ( T ^ ( u , v ) G e ^ ( u , v ) ) , R o ( x , y ) = I D F T ( T ^ ( u , v ) G o ^ ( u , v ) ) , with g respectively e(x, y) and G othe discrete Fourier transformation of (x, y);
The described objective function according to Fisher criterion structure is expressed as:
F ( Φ ) = - ( μ ( Φ ) σ ( Φ ) ) 2 ;
Wherein, Gabor filtering parameter Φ=(alpha, gamma, u 0, v 0, F 0θ), the average energy value of the image of μ (Φ) and σ (Φ) to be size be respectively X × Y after Gabor convolution and standard deviation;
μ ( Φ ) = 1 X Y Σ x = 1 X Σ y = 1 Y E r ( x , y ) ;
σ ( Φ ) = [ 1 X Y - 1 Σ x = 1 X Σ y = 1 Y ( E r ( x , y ) - μ ( Φ ) ) 2 ] 1 2 ;
Thus, have 6 decision variables, the nonlinear programming problem of 5 constraint conditions can be described as:
min Φ F ( Φ ) = min α , γ , u 0 , v 0 , F 0 , θ F ( α , γ , u 0 , v 0 , F 0 , θ ) ;
s.t.
2 2 π N ≤ a ≤ 1 2 π ;
2 2 π N ≤ a γ ≤ 1 2 π ;
0 ≤ u 0 , v 0 ≤ 1 4 ;
0 ≤ F 0 ≤ 2 4 ;
0≤θ≤π;
When first time iteration, the initial position of each particle is current individual desired positions, namely the objective function constructed by Fisher criterion calculates fitness function value corresponding to each particle;
The fitness function value of all particles finds the particle with minimum fitness function value after comparing, and the position of this particle is overall desired positions.
Further, in described step 2.3, the location updating equation of particle is:
x i d n + 1 = p i d n ± β | C d n - x i d n | ln [ 1 u i d n ] ;
The probability got "+" in formula or get "-" is all 0.5, and wherein β is called converging diverging coefficient, for the uniform random number on interval (0,1), the convergence process of particle i is with point for attractor, its coordinate is:
Wherein it is the upper equally distributed random number in an interval (0,1);
Following formula is adopted when upgrading individual desired positions in described step 2.3:
P i n + 1 = { x i n + 1 , i f F ( x i n + 1 ) < F ( P i n ) P i n , i f F ( x i n + 1 ) &GreaterEqual; F ( P i n ) ;
After the individual desired positions of each particle is determined, according to upgrade overall desired positions.
Further, be that S (x, y) carries out Gabor process of convolution to WARP-KNITTING image to be detected in described step 3, obtain the image Q (x, y) after convolution:
Q ( x , y ) = S ( x , y ) * G * ( x , y ) = I D F T ( S ^ ( u , v ) G * ^ ( u , v ) ) .
Further, in described step 4, binary conversion treatment adopts following formula to carry out:
B ( x , y ) = 0 i f | E r ( x , y ) - &mu; | < c &sigma; 1 i f | F r ( x , y ) - &mu; | &GreaterEqual; c &sigma; ;
Wherein B (x, y) is bianry image, is the net result of Defect Detection, if the value of B (x, y) is 1, then the pixel bit that image to be detected is corresponding is equipped with flaw; If the value of B (x, y) is 0, then the location of pixels that image to be detected is corresponding is indefectible; μ be convolution after the average energy value of image, σ is that energy scale is poor, and c is experimental constant, is obtained by experiment.
The present invention has following beneficial effect:
(1) the present invention adopts the Gabor filter of modulation arbitrarily can be modulated into 2-D-Gabor wave filter, also can be modulated into oval Gabor filter, make the different types of flaw of the more effective detection of Gabor constructed;
(2) the present invention utilizes QPSO Algorithm for Training Gabor filter parameter, uses the single Optimal Gabor Filters of structure, can detect WARP-KNITTING flaw efficiently, accurately, more be used in commercial production during detection;
(3) the present invention is by Fisher criterion structure objective function, obtain Gabor filtering parameter structure Gabor filter and flawless textile image texture more agree with, make the Gabor filter more effective detection WARP-KNITTING flaw constructed.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of WARP-KNITTING flaw detection method of the present invention.
Embodiment
Below in conjunction with concrete accompanying drawing, the invention will be further described.
WARP-KNITTING flaw detection method based on Optimal Gabor Filters of the present invention, as shown in Figure 1, specifically comprises the following steps:
The Gabor filter that step 1, structure can be modulated arbitrarily, obtains the Gabor filtering parameter needing to determine optimal value;
The Gabor filter function that step 1.1, described foundation are modulated arbitrarily, specifically implement in accordance with the following methods:
Setting up Gabor filter function G (x, y), is modulated by the two-dimentional Gaussian kernel function g (x, y) that a kind of multiple sine function of directivity is tuning.The time-frequency combination location of Gabor filter, multiple dimensioned, multidirectional characteristic, makes Gabor filter function through suitable dilation or rotation, can obtain the Gabor filter function of the different directions different scale of self similarity.
In two-dimensional space, Gabor filter function is expressed as:
G ( x , y ) = g ( x &prime; , y &prime; ) exp ( 2 &pi; j ( F 0 x &prime; 2 + y &prime; 2 &gamma; 2 + u 0 x &prime; + v 0 y &prime; ) ) - - - ( 1 ) ;
Gabor filter function G (x, y) of 2-D or ellipse can be modulated into arbitrarily, coefficient F in formula (1) according to formula (1) owhen=0, be modulated to 2-DGabor filter function G (x, y); u 0=0, v 0when=0, be modulated to oval Gabor filter function G (x, y);
Wherein,
g ( x &prime; , y &prime; ) = 1 2 &pi;&delta; x &delta; y exp ( - 1 2 ( x &prime; 2 &delta; x 2 + y &prime; 2 &delta; y 2 ) ) - - - ( 2 ) ;
x &prime; y &prime; = cos &theta; - sin &theta; sin &theta; cos &theta; x y - - - ( 3 ) ;
&gamma; = &delta; y &delta; x - - - ( 4 ) ;
In the spatial domain, Gaussian kernel function relates to three parameter δ x, δ y, θ, wherein δ xfor the scale parameter on Gaussian kernel function x-axis direction, δ yfor the scale parameter on Gaussian kernel function y-axis direction, θ is the anglec of rotation of Gaussian kernel function, (x ', y ') be the coordinate that (x, y) rotates after θ angle.In frequency field, three parameters of frequency involved by Fourier transform are F 0, u 0, v 0, wherein F 0the centre frequency of oval Gabor filter function, u 0the centre frequency of Gabor filter function on x-axis direction, v 0it is the centre frequency of Gabor filter function on y direction.
This any modulation Gabor filter is multiplied by multiple sine function by Gaussian kernel function and obtains, and can be rewritten as:
G(x,y)=G e(x,y)+jG o(x,y)(5);
Wherein, G e(x, y) is the real part of Gabor filter, G o(x, y) is the imaginary part of Gabor filter, can be expressed as follows respectively:
G e ( x , y ) = exp ( - 1 2 ( x 2 &delta; x 2 + y 2 &delta; y 2 ) ) cos ( 2 &pi; ( F 0 x 2 + y 2 &gamma; 2 + u 0 x + v 0 y ) ) ;
G o ( x , y ) = exp ( - 1 2 ( x 2 &delta; x 2 + y 2 &delta; y 2 ) ) sin ( 2 &pi; ( F 0 x 2 + y 2 &gamma; 2 + u 0 x + v 0 y ) ) .
Step 1.2, Gabor filter present powerful image characteristics extraction ability, but calculated amount is larger.In order to simplify calculating, meet requirement of real-time, in spatial domain, Gabor filter function obtains the Gabor filter function of frequency field through Fourier transform
G ^ ( u , v ) = 2 &pi; &alpha; 2 exp ( - ( ( u - u 0 ) &prime; 2 + &gamma; ( v - v 0 ) &prime; 2 - F 0 ) 2 2 &alpha; 2 ) - - - ( 6 ) ;
Wherein, &alpha; = 1 2 &pi;&delta; x , ( u - u 0 ) &prime; ( v - v 0 ) &prime; = c o s &theta; - s i n &theta; sin &theta; cos &theta; ( u - u 0 ) ( v - v 0 ) .
6 Gabor filtering parameters (alpha, gamma, u are had in step 1.3, formula (6) 0, v 0, F 0, θ) need to determine optimal value.
Step 2, Gabor process of convolution is carried out to indefectible WARP-KNITTING image, adopt Fisher criterion structure fitness function, utilization sub-line is that particle group optimizing (QPSO) algorithm carries out optimal treatment to the Gabor filtering parameter extracted, and obtains the optimized parameter of Gabor filter;
Step 2.1, initialization population, comprise and determine maximum iteration time, search volume, the number of particle, the position (being a class value of Gabor filtering parameter) of random initializtion particle.
If iterations n=0 time initial, maximum iteration time is max_n.The parameter determining optimal value is needed to have (alpha, gamma, u 0, v 0, F 0, θ), then search volume is 6 dimensions.The number of particle is M, and the initial position of each particle is wherein i=1,2 ..., M.
Step 2.2, when first time iteration, the initial position of each particle is current individual desired positions.Gabor process of convolution is carried out to indefectible WARP-KNITTING image, adopts Fisher criterion structure fitness function, calculate the functional value that each particle is corresponding.The fitness function value of all particles finds a particle with minimum fitness function value after comparing, and the position of this particle is overall desired positions.
For extracting WARP-KNITTING feature, structure fitness function, carries out Gabor process of convolution to indefectible WARP-KNITTING image.In the spatial domain, calculating convolution will carry out convolution to real part and imaginary part respectively, and then merges.By formula (6), in spatial domain, Gabor filter function obtains the Gabor filter function of frequency field through Fourier transform the Fourier transform of convolution of functions is the product of function Fourier transform, the product in the convolution respective frequencies territory namely in spatial domain.The image R (x, y) of image after Gabor convolution can be expressed as:
R ( x , y ) = T ( x , y ) * G ( x , y ) = I D E F ( T ^ ( u , v ) G ^ ( u , v ) ) - - - ( 7 ) ;
Wherein, T (x, y) is indefectible WARP-KNITTING image, and R (x, y) is the image after Gabor filter convolution, and * is the convolution operation of image, be the Fourier transform of image T (x, y), IDFT is that inverse discrete Fourier transform changes.
In general, the image after the Gabor convolution defined by formula (7) is the image of a plural form, and its energy can be expressed as:
E r ( x , y ) = &lsqb; R e ( x , y ) 2 + R o ( x , y ) 2 &rsqb; 1 2 - - - ( 8 ) ;
Wherein, R e ( x , y ) = I D F T ( T ^ ( u , v ) G e ^ ( u , v ) ) , R o ( x , y ) = I D F T ( T ^ ( u , v ) G o ^ ( u , v ) ) , with g respectively e(x, y) and G othe discrete Fourier transformation of (x, y).
Fitness function can construct according to Fisher criterion, constructs the objective function of optimization problem according to the cost function of Fisher criterion:
F ( &Phi; ) = - ( &mu; ( &Phi; ) &sigma; ( &Phi; ) ) 2 - - - ( 9 ) ;
Wherein, Gabor filtering parameter Φ=(alpha, gamma, u 0, v 0, F 0, θ), average energy value after Gabor convolution of the image of μ (Φ) and σ (Φ) to be size be respectively x × Y and standard deviation.
&mu; ( &Phi; ) = 1 X Y &Sigma; x = 1 X &Sigma; y = 1 Y E r ( x , y ) - - - ( 10 ) ;
&sigma; ( &Phi; ) = &lsqb; 1 X Y - 1 &Sigma; x = 1 X &Sigma; y = 1 Y ( E r ( x , y ) - &mu; ( &Phi; ) ) 2 &rsqb; 1 2 - - - ( 11 ) ;
Thus, have 6 decision variables, the nonlinear programming problem of 5 constraint conditions can be described as:
min &Phi; F ( &Phi; ) = min &alpha; , &gamma; , u 0 , v 0 , F 0 , &theta; F ( &alpha; , &gamma; , u 0 , v 0 , F 0 , &theta; ) - - - ( 12 ) ;
s.t.
2 2 &pi; N &le; a &le; 1 2 &pi; - - - ( 12 a ) ;
2 2 &pi; N &le; a &gamma; &le; 1 2 &pi; - - - ( 12 b ) ;
0 &le; u 0 , v 0 &le; 1 4 - - - ( 12 c ) ;
0 &le; F 0 &le; 2 4 - - - ( 12 d ) ;
0≤θ≤π(12e);
When first time iteration, the initial position of each particle is current individual desired positions, namely fitness function value corresponding to each particle is calculated by formula (9).
The fitness function value of all particles finds a particle with minimum fitness function value after comparing, and the position of this particle is overall desired positions.If the overall desired positions of whole population wherein,
g = arg min 1 &le; i &le; M F ( P i n ) - - - ( 13 ) .
Step 2.3, the position of each particle to be upgraded, adopt the fitness function value obtaining each particle with step 2.2 same procedure, upgrade individual desired positions and overall desired positions.
By QPSO algorithm, the location updating equation of particle is:
x i d n + 1 = P i d n &PlusMinus; &beta; | C d n - x i d n | ln &lsqb; 1 u i d n &rsqb; - - - ( 14 ) ;
The probability got "+" in formula or get "-" is all 0.5.Wherein β is called converging diverging coefficient, and generally, parameter beta can adopt the mode linearly reduced with iterations to control. for the uniform random number on interval (0,1).The convergence process of particle i is with point for attractor, its coordinate is:
Wherein it is the upper equally distributed random number in an interval (0,1).
In formula (14) be called average desired positions, be defined as the average of the individual desired positions of all particles, namely
C d n = 1 M &Sigma; i = 1 M P i d n - - - ( 16 ) ;
After the position of each particle is upgraded, adopt the fitness function value obtaining each particle with step 2.2 same procedure, then upgrade individual desired positions by following formula:
P i n + 1 = { x i n + 1 , i f F ( x i n + 1 ) < F ( P i n ) P i n , i f F ( x i n + 1 ) &GreaterEqual; F ( P i n ) - - - ( 17 ) ;
The individual desired positions of each particle obtained by above formula is preserved: to current, have the position of minimum fitness function value.
The individual desired positions of each particle just can upgrade overall desired positions according to formula (13) after determining.
Step 2.4, when reaching iteration termination condition, training terminate, overall desired positions is one group of optimal value of Gabor filtering parameter to be determined; Otherwise iterations adds 1, forward step 2.3 to.
Iteration termination condition is generally that iterations n equals max_n.
Step 3, construct Optimal Gabor Filters by optimized parameter, Gabor process of convolution is carried out to WARP-KNITTING image to be detected;
Optimized parameter structure Optimal Gabor Filters G* (x, y) obtained by step 2, is that S (x, y) carries out Gabor process of convolution to WARP-KNITTING image to be detected, obtains the image Q (x, y) after convolution:
Q ( x , y ) = S ( x , y ) * G * ( x , y ) = I D F T ( S ^ ( u , v ) G * ^ ( u , v ) ) - - - ( 18 ) .
Step 4, carry out binary conversion treatment and obtain Defect Detection result.
In image Q (x, y) after convolution, flawless region and area image defective have different energy response values, can be obtained the energy value E of each location of pixels by formula (8) r(x, y).Binary conversion treatment is carried out again by following formula:
B ( x , y ) = { 0 i f | E r ( x , y ) - &mu; | < c &sigma; 1 i f | F r ( x , y ) - &mu; | &GreaterEqual; c &sigma; - - - ( 19 ) ;
Wherein B (x, y) is bianry image, according to formula (10) (11), μ be convolution after the average energy value of image, σ is that energy scale is poor, and c is an experimental constant, is obtained by experiment.
B (x, y) is exactly the net result of Defect Detection, is judged whether containing flaw by B (x, y).If the value of B (x, y) is 1, then the pixel bit that image to be detected is corresponding is equipped with flaw; If the value of B (x, y) is 0, then the location of pixels that image to be detected is corresponding is indefectible.

Claims (9)

1., based on a WARP-KNITTING flaw detection method for Optimal Gabor Filters, it is characterized in that, comprise the following steps:
Step 1, structure Gabor filter, extract Gabor filtering parameter;
Step 2, Gabor process of convolution is carried out to indefectible WARP-KNITTING image, adopt Fisher criterion structure fitness function, utilization sub-line is that particle group optimizing (QPSO) algorithm carries out optimal treatment to the Gabor filtering parameter that step 1 is extracted, and obtains the optimized parameter of Gabor filter;
Step 3, the Gabor filter optimized parameter obtained by step 2, carry out Gabor process of convolution to WARP-KNITTING image to be detected;
Step 4, binary conversion treatment of carrying out obtain the Defect Detection result of WARP-KNITTING.
2., as claimed in claim 1 based on the WARP-KNITTING flaw detection method of Optimal Gabor Filters, it is characterized in that: described step 1 is implemented according to following steps:
Step 1.1, set up Gabor filter function, specifically implement in accordance with the following methods:
Gabor filter function G (x, y) is formed by two-dimentional Gaussian kernel function g (x, the y) modulation that the multiple sine function of directivity is tuning, and in the spatial domain, Gaussian kernel function relates to three parameter δ x, δ y, θ, wherein δ xfor the scale parameter on Gaussian kernel function x-axis direction, δ yfor the scale parameter on Gaussian kernel function y-axis direction, θ is the anglec of rotation of Gaussian kernel function, (x ', y ') be the coordinate that (x, y) rotates after θ angle; In frequency field, three parameters that Fourier transform relates to frequency are F 0, u 0, v 0, wherein F 0the centre frequency of oval Gabor filter function, u 0the centre frequency of Gabor filter function on x-axis direction, v 0it is the centre frequency of Gabor filter function on y direction;
Gabor filter function in two-dimensional space is expressed as:
Wherein,
Step 1.2, Gabor filter function in spatial domain is obtained the Gabor filter function of frequency field through Fourier transform
Wherein,
Step 1.3, the Gabor filter function constructed from step 1.2 middle extraction 6 Gabor filtering parameters (alpha, gamma, u 0, v 0, F 0, θ).
3. as claimed in claim 2 based on the WARP-KNITTING flaw detection method of Optimal Gabor Filters, it is characterized in that: coefficient F in Gabor filter function G (x, y) that described step 1.1 constructs owhen=0, be then modulated to 2-DGabor filter function G (x, y); u 0=0, v 0when=0, be then modulated to oval Gabor filter function G (x, y).
4., as claimed in claim 1 based on the WARP-KNITTING flaw detection method of Optimal Gabor Filters, it is characterized in that: described step 2 is implemented according to following steps:
Step 2.1, initialization population, comprise and determine maximum iteration time, search volume, the number of particle, the position of random initializtion particle;
Step 2.2, when first time iteration, the initial position of each particle is current individual desired positions; Gabor process of convolution is carried out to indefectible WARP-KNITTING image, adopts Fisher criterion structure fitness function, calculate the functional value that each particle is corresponding; The fitness function value of all particles finds the particle with minimum fitness function value after comparing, and the position of this particle is overall desired positions;
Step 2.3, the position of each particle to be upgraded, adopt the fitness function value obtaining each particle with step 2.2 same procedure, upgrade individual desired positions and overall desired positions;
Step 2.4, when reaching iteration termination condition, training terminate, overall desired positions is the optimal value of Gabor filtering parameter to be determined; Otherwise iterations adds 1, forward step 2.3 to.
5., as claimed in claim 4 based on the WARP-KNITTING flaw detection method of Optimal Gabor Filters, it is characterized in that: described step 2.1 is implemented according to following steps: iterations n=0 when establishing initial, maximum iteration time is max_n; Gabor filtering parameter has (alpha, gamma, u 0, v 0, F 0, θ), then search volume is 6 dimensions; The number of particle is M, and the initial position of each particle is wherein i=1,2 ..., M/.
6., as claimed in claim 4 based on the WARP-KNITTING flaw detection method of Optimal Gabor Filters, it is characterized in that: in described step 2.2, the image R (x, y) of image after Gabor convolution can be expressed as:
Wherein, T (x, y) is indefectible WARP-KNITTING image, and R (x, y) is the image after Gabor filter convolution, and * is the convolution operation of image, be the Fourier transform of image T (x, y), IDFT is that inverse discrete Fourier transform changes;
The energy of the image R (x, y) after described Gabor convolution is expressed as:
Wherein, with g respectively e(x, y) and G othe discrete Fourier transformation of (x, y);
The described objective function according to Fisher criterion structure is expressed as:
Wherein, Gabor filtering parameter Φ=(alpha, gamma, u 0, v 0, F 0, θ), average energy value after Gabor convolution of the image of μ (Φ) and σ (Φ) to be size be respectively X × Y and standard deviation;
Thus, have 6 decision variables, the nonlinear programming problem of 5 constraint conditions can be described as:
s.t.
0≤θ≤π;
When first time iteration, the initial position of each particle is current individual desired positions, namely the objective function constructed by Fisher criterion calculates fitness function value corresponding to each particle;
The fitness function value of all particles finds the particle with minimum fitness function value after comparing, and the position of this particle is overall desired positions.
7., as claimed in claim 4 based on the WARP-KNITTING flaw detection method of Optimal Gabor Filters, it is characterized in that: in described step 2.3, the location updating equation of particle is:
The probability got "+" in formula or get "-" is all 0.5, and wherein β is called converging diverging coefficient, for the uniform random number on interval (0,1), the convergence process of particle i is with point for attractor, its coordinate is:
Wherein it is the upper equally distributed random number in an interval (0,1);
Following formula is adopted when upgrading individual desired positions in described step 2.3:
After the individual desired positions of each particle is determined, according to upgrade overall desired positions.
8. as claimed in claim 1 based on the WARP-KNITTING flaw detection method of Optimal Gabor Filters, it is characterized in that: be S (x to WARP-KNITTING image to be detected in described step 3, y) carry out Gabor process of convolution, obtain the image Q (x, y) after convolution:
9. as claimed in claim 1 based on the WARP-KNITTING flaw detection method of Optimal Gabor Filters, it is characterized in that: in described step 4, binary conversion treatment adopts following formula to carry out:
Wherein B (x, y) is bianry image, is the net result of Defect Detection, if the value of B (x, y) is 1, then the pixel bit that image to be detected is corresponding is equipped with flaw; If the value of B (x, y) is 0, then the location of pixels that image to be detected is corresponding is indefectible; μ be convolution after the average energy value of image, σ is that energy scale is poor, and c is experimental constant, is obtained by experiment.
CN201510686033.0A 2015-10-20 2015-10-20 Knitted fabric flaw detection method based on Optimal Gabor Filters Active CN105205828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510686033.0A CN105205828B (en) 2015-10-20 2015-10-20 Knitted fabric flaw detection method based on Optimal Gabor Filters

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510686033.0A CN105205828B (en) 2015-10-20 2015-10-20 Knitted fabric flaw detection method based on Optimal Gabor Filters

Publications (2)

Publication Number Publication Date
CN105205828A true CN105205828A (en) 2015-12-30
CN105205828B CN105205828B (en) 2019-03-19

Family

ID=54953489

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510686033.0A Active CN105205828B (en) 2015-10-20 2015-10-20 Knitted fabric flaw detection method based on Optimal Gabor Filters

Country Status (1)

Country Link
CN (1) CN105205828B (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105678767A (en) * 2016-01-07 2016-06-15 无锡信捷电气股份有限公司 SoC software and hardware collaborative design-based cloth surface blemish detection method
CN106204543A (en) * 2016-06-29 2016-12-07 江南大学 Fabric defect detection method based on single category support vector machines
CN107256545A (en) * 2017-05-09 2017-10-17 华侨大学 A kind of broken hole flaw detection method of large circle machine
CN108010029A (en) * 2017-12-27 2018-05-08 江南大学 Fabric defect detection method based on deep learning and support vector data description
CN108986065A (en) * 2018-04-19 2018-12-11 三明学院 A kind of knitted fabric flaw fused filtering detection method, device, equipment and storage medium
CN109816631A (en) * 2018-12-25 2019-05-28 河海大学 A kind of image partition method based on new cost function
CN112036541A (en) * 2020-10-16 2020-12-04 西安工程大学 Fabric defect detection method based on genetic algorithm optimization neural network

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5371808A (en) * 1992-05-14 1994-12-06 The United States Of America As Represented By The Secretary Of Commerce Automated recognition of characters using optical filtering with maximum uncertainty - minimum variance (MUMV) functions
US5684894A (en) * 1994-11-28 1997-11-04 Eastman Kodak Company Scale specific and robust line/edge encoding of images
CN101493520A (en) * 2009-01-16 2009-07-29 北京航空航天大学 SAR image variation detecting method based on two-dimension gamma distribution
CN101882304A (en) * 2010-06-24 2010-11-10 西北工业大学 Self-adaptive de-noising and characteristic enhancing method of SAR (Synthetic Aperture Radar) image
CN102609904A (en) * 2012-01-11 2012-07-25 云南电力试验研究院(集团)有限公司电力研究院 Bivariate nonlocal average filtering de-noising method for X-ray image
CN103020654A (en) * 2012-12-12 2013-04-03 北京航空航天大学 Synthetic aperture radar (SAR) image bionic recognition method based on sample generation and nuclear local feature fusion
CN103955922A (en) * 2014-04-17 2014-07-30 西安工程大学 Method for detecting flaws of printed fabric based on Gabor filter
CN103971329A (en) * 2014-05-26 2014-08-06 电子科技大学 Cellular nerve network with genetic algorithm (GACNN)-based multisource image fusion method
CN104198498A (en) * 2014-09-12 2014-12-10 河海大学常州校区 Method and device for detecting cloth flaws based on adaptive orthogonal wavelet transform
CN104239903A (en) * 2014-10-10 2014-12-24 江南大学 QPSO (quantum-behaved particle swarm optimization) algorithm based image edge detection method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5371808A (en) * 1992-05-14 1994-12-06 The United States Of America As Represented By The Secretary Of Commerce Automated recognition of characters using optical filtering with maximum uncertainty - minimum variance (MUMV) functions
US5684894A (en) * 1994-11-28 1997-11-04 Eastman Kodak Company Scale specific and robust line/edge encoding of images
CN101493520A (en) * 2009-01-16 2009-07-29 北京航空航天大学 SAR image variation detecting method based on two-dimension gamma distribution
CN101882304A (en) * 2010-06-24 2010-11-10 西北工业大学 Self-adaptive de-noising and characteristic enhancing method of SAR (Synthetic Aperture Radar) image
CN102609904A (en) * 2012-01-11 2012-07-25 云南电力试验研究院(集团)有限公司电力研究院 Bivariate nonlocal average filtering de-noising method for X-ray image
CN103020654A (en) * 2012-12-12 2013-04-03 北京航空航天大学 Synthetic aperture radar (SAR) image bionic recognition method based on sample generation and nuclear local feature fusion
CN103955922A (en) * 2014-04-17 2014-07-30 西安工程大学 Method for detecting flaws of printed fabric based on Gabor filter
CN103971329A (en) * 2014-05-26 2014-08-06 电子科技大学 Cellular nerve network with genetic algorithm (GACNN)-based multisource image fusion method
CN104198498A (en) * 2014-09-12 2014-12-10 河海大学常州校区 Method and device for detecting cloth flaws based on adaptive orthogonal wavelet transform
CN104239903A (en) * 2014-10-10 2014-12-24 江南大学 QPSO (quantum-behaved particle swarm optimization) algorithm based image edge detection method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
BODNAROVA等: "Optimal Gabor filters for textile flaw detection", 《PATTERN RECOGNITION》 *
T.RANDEN等: "Texture segmentation using filters with optimized energy separation", 《IEEE TRANS.IMAGE PROCESS》 *
王瑶: "图像分割中关键技术的研究", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
韩润萍等: "基于Gabor滤波器组的织物疵点检测方法", 《计算机工程与应用》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105678767A (en) * 2016-01-07 2016-06-15 无锡信捷电气股份有限公司 SoC software and hardware collaborative design-based cloth surface blemish detection method
CN105678767B (en) * 2016-01-07 2019-02-19 无锡信捷电气股份有限公司 A kind of cloth surface flaw detection method based on SoC Hardware/Software Collaborative Design
CN106204543A (en) * 2016-06-29 2016-12-07 江南大学 Fabric defect detection method based on single category support vector machines
CN106204543B (en) * 2016-06-29 2019-08-06 江南大学 Fabric defect detection method based on single category support vector machines
CN107256545A (en) * 2017-05-09 2017-10-17 华侨大学 A kind of broken hole flaw detection method of large circle machine
CN108010029A (en) * 2017-12-27 2018-05-08 江南大学 Fabric defect detection method based on deep learning and support vector data description
CN108010029B (en) * 2017-12-27 2020-11-03 江南大学 Fabric defect detection method based on deep learning and support vector data description
CN108986065A (en) * 2018-04-19 2018-12-11 三明学院 A kind of knitted fabric flaw fused filtering detection method, device, equipment and storage medium
CN108986065B (en) * 2018-04-19 2021-11-23 三明学院 Warp knitting fabric flaw fusion filtering detection method, device, equipment and storage medium
CN109816631A (en) * 2018-12-25 2019-05-28 河海大学 A kind of image partition method based on new cost function
CN112036541A (en) * 2020-10-16 2020-12-04 西安工程大学 Fabric defect detection method based on genetic algorithm optimization neural network
CN112036541B (en) * 2020-10-16 2023-11-17 西安工程大学 Fabric defect detection method based on genetic algorithm optimization neural network

Also Published As

Publication number Publication date
CN105205828B (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN105205828A (en) Warp knitted fabric flaw detection method based on optimal Gabor filter
CN103955922B (en) Method for detecting flaws of printed fabric based on Gabor filter
Pixia et al. Recognition of greenhouse cucumber disease based on image processing technology
Meyer et al. Perturbation of the eigenvectors of the graph Laplacian: Application to image denoising
CN105844285A (en) Cucumber disease identification method and apparatus based on image information
Nurhaida et al. Performance comparison analysis features extraction methods for batik recognition
CN106295661A (en) The plant species identification method of leaf image multiple features fusion and device
CN105354866A (en) Polygon contour similarity detection method
Wang et al. G-image segmentation: Similarity-preserving fuzzy C-means with spatial information constraint in wavelet space
Wang et al. A weighted fidelity and regularization-based method for mixed or unknown noise removal from images on graphs
CN107767387B (en) Contour detection method based on variable receptive field scale global modulation
CN109919960B (en) Image continuous edge detection method based on multi-scale Gabor filter
Zhao et al. An adaptive method of damage detection for fishing nets based on image processing technology
CN103208097B (en) Filtering method is worked in coordination with in the principal component analysis of the multi-direction morphosis grouping of image
CN105005975A (en) Image de-noising method based on anisotropic diffusion of image entropy and PCNN
CN105277567A (en) Fabric flaw detection method
CN107180436A (en) A kind of improved KAZE image matching algorithms
CN105809173A (en) Bionic vision transformation-based image RSTN (rotation, scaling, translation and noise) invariant attributive feature extraction and recognition method
CN105184777A (en) Painted design fabric defect detection method based on image decomposition
Chaki et al. Recognition of whole and deformed plant leaves using statistical shape features and neuro-fuzzy classifier
CN110021023A (en) A kind of electronics cloth defect segmentation method
CN103390170A (en) Surface feature type texture classification method based on multispectral remote sensing image texture elements
CN104657983B (en) A kind of fabric ball top Density Detection method filtered based on Gabor
CN102184529B (en) Empirical-mode-decomposition-based edge detecting method
Kuang et al. Defect detection of bamboo strips based on LBP and GLCM features by using SVM classifier

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