CN106093066A - A kind of magnetic tile surface defect detection method based on the machine vision attention mechanism improved - Google Patents

A kind of magnetic tile surface defect detection method based on the machine vision attention mechanism improved Download PDF

Info

Publication number
CN106093066A
CN106093066A CN201610479587.8A CN201610479587A CN106093066A CN 106093066 A CN106093066 A CN 106093066A CN 201610479587 A CN201610479587 A CN 201610479587A CN 106093066 A CN106093066 A CN 106093066A
Authority
CN
China
Prior art keywords
image block
image
defect
value
formula
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
CN201610479587.8A
Other languages
Chinese (zh)
Other versions
CN106093066B (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.)
Anhui University of Technology AHUT
Original Assignee
Anhui University of Technology AHUT
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 Anhui University of Technology AHUT filed Critical Anhui University of Technology AHUT
Priority to CN201610479587.8A priority Critical patent/CN106093066B/en
Publication of CN106093066A publication Critical patent/CN106093066A/en
Application granted granted Critical
Publication of CN106093066B publication Critical patent/CN106093066B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/95Investigating the presence of flaws or contamination characterised by the material or shape of the object to be examined
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20036Morphological image processing
    • GPHYSICS
    • G06COMPUTING; CALCULATING; 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/30136Metal

Abstract

The invention discloses a kind of magnetic tile surface defect detection method based on the machine vision attention mechanism improved, step is: one, input magnetic shoe image, utilizes morphologic top cap and end cap to convert the method combined, strengthens image overall intensity contrast degree;Two, gained image uniform is divided into a*b image block, then utilizes the gray feature amount of the image block after piecemeal to distinguish defect image block and non-defective image block;Three, employing improves Itti vision noticing mechanism model and calculates the significance of gained defect image block, selects primary features in order to form comprehensive significantly figure;Four, select Otsu threshold partitioning algorithm to comprehensive notable figure thresholding, extract defect area.The present invention is by utilizing Morphological scale-space, image block and vision noticing mechanism thought, effectively overcome the problem such as brightness irregularities, less, the interference of texture of magnetic shoe of magnetic shoe defect area own, all kinds of magnetic shoe defect can be extracted quickly and efficiently, have and obtain the most by force adaptability.

Description

A kind of magnetic tile surface defect detection method based on the machine vision attention mechanism improved
Technical field
The present invention relates to technical field of machine vision, note based on the machine vision improved more particularly, it relates to a kind of The magnetic tile surface defect detection method of mechanism.
Background technology
A kind of tiles Magnet that ferrite magnetic shoe is primarily used on magneto, the height of its quality directly affects forever The overall performance of magneto.In magnetic shoe production process, due to technological problems, easily there is crackle, breakage, pit in magnetic shoe surface Etc. defect, directly affects the normal use of magnetic shoe.In current commercial production, the judgement to magnetic tile surface defect uses people substantially Work detects, and accuracy of detection is poor, detection efficiency is low and labor cost is high.
Along with the development of machine vision, defect detecting technique based on machine vision has begun at industrial products table Face quality monitoring is used widely, utilizes machine vision automatically to detect and can improve the production efficiency of enterprise, reduction work Cost, increases the competitiveness of enterprise.
For magnetic shoe product, inconspicuous owing to itself there is gray scale difference, there is the features such as surface radian, be easily caused illumination Uneven, gradation of image contrast is low, gives exploitation precision high, and fireballing magnetic shoe detection method brings certain difficulty.Li Xue Qins etc. propose to utilize a kind of non-downsampling Contourlet territory adaptive thresholding in " computer-aided design and graphics journal " The magnetic shoe defect automatic testing method in value face, the method ensure that magnetic tile surface defect detection has relatively high-accuracy, but The calculating time is longer.Yu Yongwei etc. propose the segmentation of adaptive line Morphology Algorithm according to magnetic shoe surface grey value profile situation and lack Fall into, but the method is the most sensitive to noise.The proposition artificial neural networks such as Darabi split defect image, but this algorithm is relatively Complexity, computationally intensive, it is impossible to meet the requirement of on-line real-time measuremen.Above-mentioned algorithm all needs to be changed in the accuracy and speed of detection Enter.
Through retrieval, Chinese Patent Application No. 201310020370.7, filing date on January 18th, 2013, innovation and creation name It is referred to as: magnetic tile surface defect feature extraction based on machine vision and defect classification method;First this application case constructs applicable magnetic 5 yardsticks that watt surface defects characteristic extracts, 8 direction Gabor filter groups, and original image is filtered, obtain 40 width and divide Spirogram;Extract gray average and the Variance feature of component map the most respectively, form the characteristic vector of one 80 dimension;And with the main one-tenth of PCA Point analytic process and ICA independent component analysis method carry out dimensionality reduction to the characteristic vectors of former 80 dimensions, remove dependency and redundancy, obtain The characteristic vector of 20 dimensions;To characteristic vector data normalization pretreatment, former data are normalized between [0,1];Finally use Gridding method and K-CV cross-validation method realize SVM parameter optimization, with training sample data off-line training SVM model;On-line checking Time, pretreated test sample data are input to support vector machine, it is possible to realize the automatic Classification and Identification of defect.
And for example Chinese Patent Application No. 201110061144.4, filing date on March 14th, 2011, invention and created name For: magnetic tile surface defect automatic testing method based on machine vision and device;This application case also discloses that one passes through machine The method that magnetic tile surface defect is detected by vision technique.Concrete detection process is: detected magnetic shoe is placed in conveyer belt by (1) On;(2) start ccd image harvester, gather magnetic shoe surface image and be sent to graphics processing unit;(3) image procossing list Unit by gather image through image filtering, image segmentation, after Morphological scale-space, rim detection etc. process after, by result pass Transport to defect detection unit;(4) by processing result image through feature extraction, it is converted into one-dimensional digital signal;(5) by acquired results After the training of conceptual schema recognition unit and test, magnetic shoe surface quality is divided into good magnetic shoe and defect magnetic shoe two class, to reach Purpose to defects detection.
Above-mentioned application case all can filter the interference of magnetic shoe superficial makings to a certain extent, and the feature of extraction also is able to necessarily Degree reflection defect information;But above-mentioned application case or to there is algorithm operation quantity big, the problem of detection time length, or do not consider magnetic Watt product gray scale difference is inconspicuous, the problem that there is surface radian, relatively low to the accuracy of detection of magnetic tile surface defect, still needs to further Improve.
Summary of the invention
1. invention to solve the technical problem that
The present invention is directed to existing magnetic tile surface defect detection algorithm problem of equal Shortcomings in accuracy of detection and speed, Provide a kind of based on the magnetic tile surface defect detection method of machine vision attention mechanism improved, it is achieved magnetic shoe defect automatic Detection.The present invention converts the contrast strengthening defect area with background image, then profit initially with morphology top cap and end cap With the whether existing defects of gray feature amount comparison and detection magnetic shoe between each image block after image block, effectively reduce algorithm Operand;Finally for the interference overcoming magnetic shoe normal grinding texture that defect is extracted, use the visual attention model segmentation improved Image, by calculating defect image block vision saliency value, it is achieved defect Segmentation and extraction, the present invention can do efficiently against noise Disturbing, algorithm accuracy rate is high, and good to the adaptability of different defects, and reliability is high.
2. technical scheme
For reaching above-mentioned purpose, the technical scheme that the present invention provides is:
A kind of based on the machine vision attention mechanism improved the magnetic tile surface defect detection method of the present invention, its step For:
Step one, input magnetic shoe surface original image, utilize morphologic top cap and end cap to convert the method combined, increase Strong image overall intensity contrast degree;
Step 2, step one gained magnetic shoe image uniform being divided into a*b image block, each image block length of side is M*N, so The rear gray feature amount utilizing the image block after piecemeal distinguishes defect image block and non-defective image block, it is judged that whether image exists Defect also determines defect place tile location;
Step 3, employing improve the significance of Itti vision noticing mechanism model calculation procedure two gained defect image block, Select primary features in order to form notable figure, the comprehensive notable figure after merging is normalized, it is thus achieved that maximum focus of attention is i.e. For defect area, directly comprehensive notable figure is split;
Step 4, select Otsu threshold partitioning algorithm to comprehensive notable figure thresholding after obtaining comprehensive notable figure, extract Defect area.
Further, step one carry out top cap and the end cap conversion process be:
Top cap Transformation Graphs That(f) and end cap Transformation Graphs BhatF the computing formula of () is as follows:
T h a t ( f ) = f - γ ( f ) B h a t ( f ) = φ ( f ) - f
Wherein, f represents original image, and γ (f) represents the opening operation of original image f, and φ (f) represents closing of original image f Computing;
Original image f is deducted ThatF () reduces the bright detail of image, then deduct BhatF () strengthens image comparison Degree, it is achieved emphasize the purpose of magnetic shoe defect area, exports image kTHRepresenting, computing formula is as follows:
kTH=f-λ That(f)-ψBhat(f)
In formula, selecting radius is that the circular configuration of 17mm is as the structural element in morphology, parameter factors λ=0.1, ψ =0.1.
Further, the gray feature amount of image block described in step 2 includes image block average Wm, to four directions ash The entropy W of degree co-occurrence matrix superpositioncWith image block variance W improvedd;Wherein:
Image block average WmFor the local mean value of n item before statistics after image block grey scale pixel value is sorted from small to large, meter Calculation formula is as follows:
W m = 1 / n Σ 1 n f ( x i , y j )
In formula, f (xi, yj) represent coordinate (x in regional areai, yj) grey scale pixel value;
As follows to the entropy Wc computing formula of four direction gray level co-occurrence matrixes superpositions:
W c = Σ t = 1 4 W g ( t )
W g = - Σ i = 1 k Σ j = 1 k p ( i , j ) log ( p ( i , j ) )
In above formula, k is the length of side of gray level co-occurrence matrixes;(i j) represents (i, j) statistical probability at place, t table in matrix to p Show that gray level co-occurrence matrixes calculates the direction of entropy;
Image block variance W improveddComputing formula is as follows:
Wd=Std (SN-min(SN))
S N ( x ) = Σ 1 M f ( x i , y j ) ; i = 1 , ... ... , N
SN(x)=[SN(x1) ..., SN(xN)]
In above formula, Std () is for asking mean square deviation formula, SNX () is to be added the gray value of vertical direction in image block to be formed The matrix of 1 × N, f (xi, yj) denotation coordination is (xi, yj) grey scale pixel value put.
Further, the standard judging defect image block and non-defective image block in step 2 is: defect image block WmValue is respectively less than the W of residing row image blockmValue, WcAnd WdValue is all higher than the W of residing row image blockc、WdValue, the W of defect image blockd Value is more than the residing second largest W of row image blockd3 times of value.
Further, the primary features selected in step 3 includes:
A. local luminance feature: the average of employing local luminance and variance are as reference, with each picture in regional area The gray value of element and the average of the image block gray value in this region and variance subtract each other and obtain difference, and this difference is carried out index letter Number processes, and obtains local luminance and significantly schemes Sl(x, y), computing formula is as follows:
Ilocal(xi, yj)=f (xi, yj)-(mlocal(x, y)+μ dlocal(x, y))
S l ( x i , y j ) = 1 - exp ( - I l o c a l ( x i , y j ) s u m ( I l o c a l ( x i , y j ) ) )
In formula, mlocal(x y) represents local gray level meansigma methods, dlocal(x y) represents local gray level variance, f (xi, yj) table Showing gray value, μ is variance controlling elements, and span is 0~1;
B. overall situation brightness: use the meansigma methods of the overall situation as reference, subtract each other therewith with the gray value of each pixel, and Difference is carried out exponential function process, obtains the overall situation notable S of brightnessg(x, y), computing formula is as follows:
Iglobal(xi, yi)=| f (xi, yi)-mglobal|
S g ( x i , y i ) = 1 - exp ( - I g l o b a l ( x i , y i ) s u m ( I g l o b a l ( x i , y i ) ) )
In formula, mglobalFor the average gray of view picture magnetic shoe image, sum (Iglobal(xi, yi)) it is all Iglobal(xi, yi) sum of value;
C. frequecy characteristic: utilize DoG wave filter, it is thus achieved that frequecy characteristic significantly schemes SG(x, y), computing formula is as follows:
D o G ( x , y ) = 1 2 πσ 1 2 e - ( x 2 + y 2 ) 2 σ 1 2 - 1 2 πσ 2 2 e - ( x 2 + y 2 ) 2 σ 2 2
SG(x, y)=| mglobal-IG(x, y) |
In formula, IG(x is y) through the filtered image of DoG, σ1And σ2It is the standard deviation of gaussian kernel function, σ1∶σ2=5: 1.
Further, described σ1=0.5, σ2=0.1.
Further, in step 3, local luminance for obtaining significantly is schemed, overall situation brightness is significantly schemed, frequecy characteristic shows Work figure merges, and the computing formula generating comprehensive notable figure is as follows:
S = ( 0.5 * S l * 0.5 * S g + 0.5 * S G 2 ) .
3. beneficial effect
Use the technical scheme that the present invention provides, compared with existing known technology, there is following remarkable result:
(1) a kind of based on the machine vision attention mechanism improved the magnetic tile surface defect detection method of the present invention, passes through Morphologic top cap and the conversion of end cap strengthen defect area and background image contrast in image, the gray scale of suppression high-brightness region Value, makes image overall intensity contrast degree be strengthened, conveniently identifies defect area;
(2) a kind of based on the machine vision attention mechanism improved the magnetic tile surface defect detection method of the present invention, in conjunction with Image block thought, utilizes the gray feature amount of defect image block and the difference of non-defective image block, efficiently differentiates defect map As block and non-defective image block, it is judged that image whether existing defects also determines defect place tile location, improves algorithm Operational efficiency, decreases operation time and reduces partitioning algorithm complexity;
(3) a kind of based on the machine vision attention mechanism improved the magnetic tile surface defect detection method of the present invention, improves Vision noticing mechanism model, by calculating defect image block vision saliency value, it is achieved defect Segmentation and extraction, it is possible to effective gram Take the interference of magnetic shoe texture, accurately complete the defect to magnetic shoe surface and extract;
(4) a kind of based on the machine vision attention mechanism improved the magnetic tile surface defect detection method of the present invention, effectively Overcome the problem such as brightness irregularities, less, the interference of texture of magnetic shoe of magnetic shoe defect area own, can carry quickly and efficiently Take all kinds of magnetic shoe defect, there is the strongest adaptability.
Accompanying drawing explanation
Fig. 1 is the magnetic tile surface defect detection algorithm flow chart of the present invention;
(a)~(h) in Fig. 2 is the genetic defects figure of the present invention;
(a)~(h) in Fig. 3 is the notable figure fusion figure of the present invention;
(a)~(h) in Fig. 4 is the image segmentation figure of the present invention.
Detailed description of the invention
For further appreciating that present disclosure, the present invention is described in detail in conjunction with the accompanying drawings and embodiments.
Embodiment 1
In conjunction with Fig. 1, a kind of based on the machine vision attention mechanism improved the magnetic tile surface defect detection side of the present embodiment Method, comprises the following steps:
The first step: input magnetic shoe surface original image, in image processing process, due to the region that some gray values are relatively low Easily obscure with defect area, disturb result.The present embodiment proposes to utilize morphologic top cap and the conversion of end cap to combine Method, improve the contrast of defect area and background, the gray value of suppression high-brightness region, make image overall intensity contrast degree Strengthened, conveniently identified defect area.
The process carrying out top cap and the conversion of end cap is:
Top cap Transformation Graphs ThatF () is opening operation γ (f) from original image f subtracted image, and end cap Transformation Graphs Bhat(f) Being that closed operation φ (f) by original image deducts f, computing formula is as follows:
T h a t ( f ) = f - γ ( f ) B h a t ( f ) = φ ( f ) - f
After top cap converts, highlight regions is shown that the high gray value region of original image f, highlighted after end cap converts Region is shown that the low gray value region of original image f.Therefore it is the gray value reducing inclined bright part further, can be by former Beginning, image f deducted ThatF () reduces the bright detail of image, then deduct BhatF () strengthens picture contrast, it is achieved emphasize magnetic Watt defect area.Output image kTHRepresenting, computing formula is as follows:
kTH=f-λ That(f)-ψBhat(f)
In above formula, select radius be the circular configuration of 17mm as the structural element in morphology, parameter factors take λ= 0.1, ψ=0.1.
Second step: in order to improve algorithm operational efficiency, reduces operation time and reduces partitioning algorithm complexity, at image Whether existing defects region should be quickly detected in piece image before segmentation.First the present embodiment combines the thought of image block, Step one gained magnetic shoe image uniform is divided into a*b image block, and each image block length of side is M*N, in order to make the figure after piecemeal Just comprise defect area as moderate dimensions, the value of M, N needs test of many times to measure.Then the image block after piecemeal is utilized Image block average after gray-scale statistical amount, i.e. piecemeal, entropy and the image block of improvement to four direction gray level co-occurrence matrixes superpositions Three kinds of gray feature amounts such as variance, by the gray feature amount of the different images block of contrast input picture, efficiently differentiate defect Image block and non-defective image block, it is judged that image whether existing defects also determines defect place tile location.
Utilizing above-mentioned 3 kinds of gray feature amounts, the detailed process distinguishing defect image block and non-defective image block is:
Owing to image is divided into a row b row, so the three of a*b image block to be calculated kinds of gray feature amounts, particularly as follows:
A. average Wm: owing to defect area is little relative to whole image block Area comparison, less to the contribution of image average, therefore When calculating average, the pixel participating in calculating average can be added up and scope of statistics is defined in as far as possible defect area.This reality Execute local mean value W of the front n item of statistics after grey scale pixel value is sorted by example from small to largem, practice process can utilize gray scale Rectangular histogram realizes, and n value is 250 appropriate.Computing formula is as follows:
W m = 1 / n Σ 1 n f ( x i , y j )
In formula, f (xi, yj) represent coordinate (x in regional areai, yj) grey scale pixel value;
B. entropy Wc: gray level co-occurrence matrixes mainly reflects grayscale distribution information, and in co-occurrence matrix, element is by the most certain Number is constituted by the pixel with same grayscale value of distance.For reducing operand, the present embodiment is by the gray scale of image block Grade is compressed to 0~15 and characterizes gray level co-occurrence matrixes with some scalars again, including energy, entropy, the moment of inertia and phase from 0~255 Guan Xing.Entropy W in gray level co-occurrence matrixesgThe complexity of image can be reflected, for increasing the significance of entropy, can be by its four The entropy in direction is added, and is Wc.Computing formula is as follows:
W g = - Σ i = 1 k Σ j = 1 k p ( i , j ) log ( p ( i , j ) )
W c = Σ t = 1 4 W g ( t )
In above formula, k is the length of side of gray level co-occurrence matrixes, when tonal gradation is compressed to 16, k=16;(i j) represents p In matrix, (i, j) statistical probability at place, t represents that gray level co-occurrence matrixes calculates the direction of entropy.
C. variance Wd: for reducing the impact of magnetic shoe texture, the present embodiment is first by the gray value of vertical direction in image block It is added, forms the matrix S of 1 × NM(y);Defect area effect during calculating is affected because gray value is added for reducing, During calculating, the every minima deducted in matrix of matrix, finally calculates the mean square deviation of matrix, and computing formula is as follows:
Wd=Std (SN-min(SN))
S N ( x ) = Σ 1 M f ( x i , y j ) ; i = 1 , ... ... , N
SN(x)=[SN(x1) ..., SN(xN)]
In above formula, Std () is for asking mean square deviation formula, SNX () is to be added the gray value of vertical direction in image block to be formed The matrix f (x of 1 × Ni, yj) denotation coordination is (xi, yj) grey scale pixel value put.
Add up the average of each image block, entropy and variance after every a line piecemeal.The standard determining whether defect block is: have scarce Fall into the W of image blockmValue is respectively less than the image block of residing row, WcAnd WdIt is all higher than residing row image block, it should be noted that defect map As block WdValue is much larger than non-defective image block, so with WdShould set certain multiple relation for criterion, the present embodiment takes multiple For W maximum in a line image blockdValue is more than second largest Wd3 times.If there being the parameter of image block in a line image block statistical table Meet conditions above and then judge that this image block is defect image block.
3rd step: due to magnetic shoe superficial makings relatively horn of plenty, directly carries out Threshold segmentation difficulty relatively big, and the present embodiment uses Improve the significance of Itti vision noticing mechanism model calculation procedure two gained defect image block.Aobvious from overall situation saliency value and local Work value angle considers that reselecting primary features significantly schemes in order to be formed, and normalizes to [0,1] to the comprehensive notable figure after merging, Maximum focus of attention (i.e. saliency value is the position of 1) of reentrying is defect area, owing to defect image block size is less, so Other focus of attention need not be considered, therefore directly can significantly scheme segmentation to comprehensive.Detailed process is:
(1) primary features selects
A. local luminance feature: the average of employing local luminance and variance are as reference, with each picture in regional area The gray value of element and the average of the image block gray value in this region and variance subtract each other and obtain difference, and this difference is carried out index letter Number processes, and obtains local luminance and significantly schemes Sl(x, y), computing formula is as follows:
Ilocal(xi, yj)=f (xi, yj)-(mlocal(x, y)+μ dlocal(x, y))
S l ( x i , y j ) = 1 - exp ( - I l o c a l ( x i , y j ) s u m ( I l o c a l ( x i , y j ) ) )
M in formulalocal(x y) represents local gray level meansigma methods, dlocal(x y) represents local gray level variance, f (xi, yj) table Show gray value, μ be variance controlling elements span be 0~1.
B. overall situation brightness, in bigger defect area, lacks enough local contrast, therefore in the middle part of defect area Use the meansigma methods of the overall situation as reference, subtract each other therewith with the gray value of each pixel, and difference is carried out numerical value process, obtain Overall situation brightness is significantly schemed.S is significantly schemed in overall situation brightnessg(x, y) computing formula is as follows:
Iglobal(xi, yj)=| f (xi, yj)-mglobal|
S g ( x i , y i ) = 1 - exp ( - I g l o b a l ( x i , y i ) s u m ( I g l o b a l ( x i , y i ) ) )
In formula, mglobalFor the average gray of view picture magnetic shoe image, sum (Iglobal(xi, yj)) it is all Iglobal(xi, yj) sum of value.
C. frequecy characteristic: edge can be strengthened while filtering interfering due to DoG wave filter and other details are visible Property, so selecting DoG wave filter, computing formula is as follows:
D o G ( x , y ) = 1 2 πσ 1 2 e - ( x 2 + y 2 ) 2 σ 1 2 - 1 2 πσ 2 2 e - ( x 2 + y 2 ) 2 σ 2 2
In formula, σ1And σ2Being the standard deviation of gaussian kernel function, their proportionate relationship controls the bandwidth of wave filter, works as σ1= 1.6σ2Time, it is simply that edge detector, work as σ1Time infinitely great, then DC component filtered, i.e. background image filters.
When processing view data, the gaussian kernel window less with other interference Information Pull one for filtering texture, one As use [1,4,6,4,1]/16.Utilize DoG wave filter, obtain frequecy characteristic by following formula and significantly scheme:
SG(x, y)=| mglobal-IG(x, y) |
S in formulaG(x, is y) that frequecy characteristic is significantly schemed, IG(x is y) through the filtered image of DoG.The present embodiment takes σ1∶ σ2=5: 1, σ1=0.5, σ2=0.1.
(2) Feature Fusion: due to local luminance significantly scheme, the overall situation brightness significantly scheme, the notable graph expression of frequecy characteristic specific The characteristic in direction, has certain limitation, generating a comprehensive notable figure so carrying out merging, splitting in order to image.Calculate Formula is as follows:
4th step: select big Tianjin (Ostu) Threshold Segmentation Algorithm that comprehensive notable figure is carried out threshold after obtaining comprehensive notable figure Value, obtains comprehensive notable figure marking area and non-significant region (foreground and background), can realize district notable to original image The segmentation in territory (defect area).The marking area being partitioned into the incomplete defect area that correspond to original image, Ke Nengcun Edge region and isolated point of significance, but by thresholded image carries out morphology opening operation, can to eliminate these thin Joint.
(a)~(h) in Fig. 2 is the genetic defects figure of the present invention, and (a)~(h) in Fig. 3 is that the notable figure of the present invention melts Conjunction figure, has had on suppression texture information relative to the notable figure of primary features, significantly figure as can be seen from Figure 3 and has substantially carried High.(a)~(h) in Fig. 4 is the image segmentation figure of the present invention, after as can be seen from Figure 4 comprehensive specific image being split, Defect area is substantially achieved extraction.
Schematically being described the present invention and embodiment thereof above, this description does not has restricted, institute in accompanying drawing Show is also one of embodiments of the present invention, and actual structure is not limited thereto.So, if the common skill of this area Art personnel enlightened by it, in the case of without departing from the invention objective, designs and this technical scheme without creative Similar frame mode and embodiment, all should belong to protection scope of the present invention.

Claims (7)

1. a magnetic tile surface defect detection method based on the machine vision attention mechanism improved, the steps include:
Step one, input magnetic shoe surface original image, utilize morphologic top cap and end cap to convert the method combined, strengthen figure As overall intensity contrast degree;
Step 2, step one gained magnetic shoe image uniform being divided into a*b image block, each image block length of side is M*N, then profit Defect image block and non-defective image block is distinguished, it is judged that image whether existing defects by the gray feature amount of the image block after piecemeal And determine defect place tile location;
Step 3, employing improve the significance of Itti vision noticing mechanism model calculation procedure two gained defect image block, select Comprehensive notable figure after merging, in order to form notable figure, is normalized, it is thus achieved that maximum focus of attention is scarce by primary features Fall into region;
Step 4, select Otsu threshold partitioning algorithm to comprehensive notable figure thresholding after obtaining comprehensive notable figure, extract defect Region.
A kind of magnetic tile surface defect detection side based on the machine vision attention mechanism improved the most according to claim 1 Method, it is characterised in that: step one carries out the process of top cap and the conversion of end cap and is:
Top cap Transformation Graphs That(f) and end cap Transformation Graphs BhatF the computing formula of () is as follows:
T h a t ( f ) = f - γ ( f ) B h a t ( f ) = φ ( f ) - f
Wherein, f represents original image, and γ (f) represents the opening operation of original image f, and φ (f) represents the closed operation of original image f;
Original image f is deducted ThatF () reduces the bright detail of image, then deduct BhatF () strengthens picture contrast, real Now emphasize the purpose of magnetic shoe defect area, export image kTHRepresenting, computing formula is as follows:
kTH=f-λ That(f)-ψBhat(f)
In formula, the circular configuration selecting radius to be 17mm as the structural element in morphology, parameter factors λ=0.1, ψ= 0.1。
A kind of magnetic tile surface defect detection based on the machine vision attention mechanism improved the most according to claim 1 and 2 Method, it is characterised in that: the gray feature amount of image block described in step 2 includes image block average Wm, to four direction gray scales altogether The entropy W of raw matrix superpositioncWith image block variance W improvedd;Wherein:
Image block average WmFor the local mean value of n item, computing formula before statistics after image block grey scale pixel value is sorted from small to large As follows:
W m = 1 / n Σ 1 n f ( x i , y j )
In formula, f (xi, yi) represent that in regional area, coordinate is (xi, yj) grey scale pixel value put;
Entropy W to four direction gray level co-occurrence matrixes superpositionscComputing formula is as follows:
W c = Σ t = 1 4 W g ( t )
W g = - Σ i = 1 k Σ j = 1 k p ( i , j ) log ( p ( i , j ) )
In above formula, k is the length of side of gray level co-occurrence matrixes;(i j) represents that (i, j) statistical probability at place, t represents ash in matrix to p Degree co-occurrence matrix calculates the direction of entropy;
Image block variance W improveddComputing formula is as follows:
Wd=Std (SN-min(SN))
S N ( x i ) = Σ j = 1 M f ( x i , y j ) ; i = 1 , ... ... , N
SN(x)=[SN(x1) ..., SN(xN)]
In above formula, Std () is for asking mean square deviation formula, SNX () is that the gray value of vertical direction in image block is added the 1 × N formed Matrix, f (xi, yi) denotation coordination is (xi, yj) grey scale pixel value put.
A kind of magnetic tile surface defect detection side based on the machine vision attention mechanism improved the most according to claim 3 Method, it is characterised in that: the standard judging defect image block and non-defective image block in step 2 is: the W of defect image blockmValue is all W less than residing row image blockmValue, WcAnd WdValue is all higher than the W of residing row image blockc、WdValue, the W of defect image blockdValue is more than The residing second largest W of row image blockd3 times of value.
A kind of magnetic tile surface defect detection based on the machine vision attention mechanism improved the most according to claim 1 and 2 Method, it is characterised in that: the primary features selected in step 3 includes:
A. local luminance feature: the average of employing local luminance and variance are as reference, by each pixel in regional area The average of the image block gray value in gray value and this region and variance are subtracted each other and are obtained difference, and carry out this difference at exponential function Reason, obtains local luminance and significantly schemes Sl(x, y), computing formula is as follows:
Ilocal(xi, yi)=f (xi, yi)-(mlocal(x, y)+μ dlocal(x, y))
S l ( x i , y j ) = 1 - exp ( - I l o c a l ( x i , y j ) s u m ( I l o c a l ( x i , y j ) ) )
In formula, mlocal(x y) represents local gray level meansigma methods, dlocal(x y) represents local gray level variance, f (xi, yi) represent and sit It is designated as (xi, yj) grey scale pixel value put, μ is variance controlling elements, and span is 0~1;
B. overall situation brightness: use the meansigma methods of the overall situation as reference, subtract each other therewith with the gray value of each pixel, and to difference Value carries out exponential function process, obtains the overall situation notable S of brightnessg(x, y), computing formula is as follows:
Iglobal(xi, yi)=| f (xi, yi)-mglobal|
S g ( x i , y i ) = 1 - exp ( - I g l o b a l ( x i , y i ) s u m ( I g l o b a l ( x i , y i ) ) )
In formula, mglobalFor the average gray of view picture magnetic shoe image, sum (Iglobal(xi, yi)) it is all Iglobal(xi, yj) value Sum;
C. frequecy characteristic: utilize DoG wave filter, it is thus achieved that frequecy characteristic significantly schemes SG(x, y), computing formula is as follows:
D o G ( x , y ) = 1 2 πσ 1 2 e - ( x 2 + y 2 ) 2 σ 1 2 - 1 2 πσ 2 2 e - ( x 2 + y 2 ) 2 σ 2 2
SG(x, y)=| mglobal-IG(x, y) |
In formula, IG(x is y) through the filtered image of DoG, σ1And σ2It is the standard deviation of gaussian kernel function, σ1∶σ2=5: 1.
A kind of magnetic tile surface defect detection side based on the machine vision attention mechanism improved the most according to claim 5 Method, it is characterised in that: described σ1=0.5, σ2=0.1.
A kind of magnetic tile surface defect detection side based on the machine vision attention mechanism improved the most according to claim 6 Method, it is characterised in that: in step 3, the local luminance for obtaining significantly is schemed, significantly scheme, frequecy characteristic is significantly schemed by brightness for the overall situation Merging, the computing formula generating comprehensive notable figure is as follows:
S = ( 0.5 * S l * 0.5 * S g + 0.5 * S G 2 ) .
CN201610479587.8A 2016-06-24 2016-06-24 A kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism Active CN106093066B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610479587.8A CN106093066B (en) 2016-06-24 2016-06-24 A kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610479587.8A CN106093066B (en) 2016-06-24 2016-06-24 A kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism

Publications (2)

Publication Number Publication Date
CN106093066A true CN106093066A (en) 2016-11-09
CN106093066B CN106093066B (en) 2018-11-30

Family

ID=57253943

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610479587.8A Active CN106093066B (en) 2016-06-24 2016-06-24 A kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism

Country Status (1)

Country Link
CN (1) CN106093066B (en)

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106600593A (en) * 2016-12-19 2017-04-26 福州大学 Aluminum ceramic ball surface detect detection method
CN106790898A (en) * 2016-12-08 2017-05-31 华中科技大学 A kind of mobile phone screen bad point automatic testing method and system based on significance analysis
CN107369163A (en) * 2017-06-15 2017-11-21 西安微电子技术研究所 A kind of quick SAR image object detection method based on best entropy Double Thresholding Segmentation
CN107490583A (en) * 2017-09-12 2017-12-19 桂林电子科技大学 A kind of intermediate plate defect inspection method based on machine vision
CN108305243A (en) * 2017-12-08 2018-07-20 五邑大学 A kind of magnetic tile surface defect detection method based on deep learning
CN109211919A (en) * 2018-09-03 2019-01-15 珠海格力智能装备有限公司 Magnetic shoe collapses recognition methods and the device in missing plot domain
CN109701890A (en) * 2018-12-10 2019-05-03 湖南航天天麓新材料检测有限责任公司 Magnetic tile surface defect detection and method for sorting
CN110210608A (en) * 2019-06-05 2019-09-06 国家广播电视总局广播电视科学研究院 The enhancement method of low-illumination image merged based on attention mechanism and multi-level features
CN110766675A (en) * 2019-10-22 2020-02-07 孟帅帅 Solar cell panel defect detection method
CN110992336A (en) * 2019-12-02 2020-04-10 东莞西尼自动化科技有限公司 Small sample defect detection method based on image processing and artificial intelligence
CN111476784A (en) * 2020-04-14 2020-07-31 孙洁 Product surface defect online detection method based on image enhancement recognition technology
CN111612787A (en) * 2020-06-19 2020-09-01 国网湖南省电力有限公司 Concrete crack high-resolution image lossless semantic segmentation method and device and storage medium
CN112330614A (en) * 2020-10-27 2021-02-05 哈尔滨市科佳通用机电股份有限公司 Bottom plate bolt loss detection method based on image processing

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567731A (en) * 2011-12-06 2012-07-11 北京航空航天大学 Extraction method for region of interest
US20120257039A1 (en) * 2009-12-18 2012-10-11 Yuichi Abe Image Processing Device, Measuring/Testing System, and Program
CN103198322A (en) * 2013-01-18 2013-07-10 江南大学 Magnetic tile surface defect feature extraction and defect classification method based on machine vision
CN103729842A (en) * 2013-12-20 2014-04-16 中原工学院 Fabric defect detection method based on local statistical characteristics and overall significance analysis
CN103729848A (en) * 2013-12-28 2014-04-16 北京工业大学 Hyperspectral remote sensing image small target detection method based on spectrum saliency
CN105354831A (en) * 2015-09-30 2016-02-24 广东工业大学 Multi-defect detection method based on image block variance-weighting eigenvalues

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120257039A1 (en) * 2009-12-18 2012-10-11 Yuichi Abe Image Processing Device, Measuring/Testing System, and Program
CN102567731A (en) * 2011-12-06 2012-07-11 北京航空航天大学 Extraction method for region of interest
CN103198322A (en) * 2013-01-18 2013-07-10 江南大学 Magnetic tile surface defect feature extraction and defect classification method based on machine vision
CN103729842A (en) * 2013-12-20 2014-04-16 中原工学院 Fabric defect detection method based on local statistical characteristics and overall significance analysis
CN103729848A (en) * 2013-12-28 2014-04-16 北京工业大学 Hyperspectral remote sensing image small target detection method based on spectrum saliency
CN105354831A (en) * 2015-09-30 2016-02-24 广东工业大学 Multi-defect detection method based on image block variance-weighting eigenvalues

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HANTAO LIU ET AL.: "Visual Attention in Objective Image Quality Assessment: Based on Eye-Tracking Data", 《IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY》 *
余永维 等: "磁瓦表面图像的自适应形态学滤波缺陷提取方法", 《计算机辅助设计与图形学学报》 *

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790898A (en) * 2016-12-08 2017-05-31 华中科技大学 A kind of mobile phone screen bad point automatic testing method and system based on significance analysis
CN106790898B (en) * 2016-12-08 2019-06-18 华中科技大学 A kind of mobile phone screen bad point automatic testing method and system based on significance analysis
CN106600593B (en) * 2016-12-19 2019-08-09 福州大学 A kind of middle aluminium porcelain ball surface defect inspection method
CN106600593A (en) * 2016-12-19 2017-04-26 福州大学 Aluminum ceramic ball surface detect detection method
CN107369163A (en) * 2017-06-15 2017-11-21 西安微电子技术研究所 A kind of quick SAR image object detection method based on best entropy Double Thresholding Segmentation
CN107490583A (en) * 2017-09-12 2017-12-19 桂林电子科技大学 A kind of intermediate plate defect inspection method based on machine vision
CN108305243A (en) * 2017-12-08 2018-07-20 五邑大学 A kind of magnetic tile surface defect detection method based on deep learning
CN109211919A (en) * 2018-09-03 2019-01-15 珠海格力智能装备有限公司 Magnetic shoe collapses recognition methods and the device in missing plot domain
CN109211919B (en) * 2018-09-03 2021-04-30 珠海格力智能装备有限公司 Method and device for identifying magnetic tile defect area
CN109701890A (en) * 2018-12-10 2019-05-03 湖南航天天麓新材料检测有限责任公司 Magnetic tile surface defect detection and method for sorting
CN110210608B (en) * 2019-06-05 2021-03-26 国家广播电视总局广播电视科学研究院 Low-illumination image enhancement method based on attention mechanism and multi-level feature fusion
CN110210608A (en) * 2019-06-05 2019-09-06 国家广播电视总局广播电视科学研究院 The enhancement method of low-illumination image merged based on attention mechanism and multi-level features
CN110766675B (en) * 2019-10-22 2020-07-10 科士恩科技(上海)有限公司 Solar cell panel defect detection method
CN110766675A (en) * 2019-10-22 2020-02-07 孟帅帅 Solar cell panel defect detection method
CN110992336A (en) * 2019-12-02 2020-04-10 东莞西尼自动化科技有限公司 Small sample defect detection method based on image processing and artificial intelligence
CN111476784A (en) * 2020-04-14 2020-07-31 孙洁 Product surface defect online detection method based on image enhancement recognition technology
CN111612787A (en) * 2020-06-19 2020-09-01 国网湖南省电力有限公司 Concrete crack high-resolution image lossless semantic segmentation method and device and storage medium
CN112330614A (en) * 2020-10-27 2021-02-05 哈尔滨市科佳通用机电股份有限公司 Bottom plate bolt loss detection method based on image processing
CN112330614B (en) * 2020-10-27 2021-06-18 哈尔滨市科佳通用机电股份有限公司 Bottom plate bolt loss detection method based on image processing

Also Published As

Publication number Publication date
CN106093066B (en) 2018-11-30

Similar Documents

Publication Publication Date Title
CN106093066A (en) A kind of magnetic tile surface defect detection method based on the machine vision attention mechanism improved
Liming et al. Automated strawberry grading system based on image processing
Mizushima et al. An image segmentation method for apple sorting and grading using support vector machine and Otsu’s method
Verma Image processing techniques for grading & classification of rice
CN101852768B (en) Workpiece flaw identification method based on compound characteristics in magnaflux environment
CN103593670A (en) Copper sheet and strip surface defect detection method based on-line sequential extreme learning machine
CN108303748A (en) The method for checking equipment and detecting the gun in luggage and articles
CN106815819B (en) More strategy grain worm visible detection methods
CN104298989A (en) Counterfeit identifying method and counterfeit identifying system based on zebra crossing infrared image characteristics
Yu et al. Image edge detection based tool condition monitoring with morphological component analysis
Teimouri et al. On-line separation and sorting of chicken portions using a robust vision-based intelligent modelling approach
CN110009618A (en) A kind of Axle Surface quality determining method and device
Nagoda et al. Rice sample segmentation and classification using image processing and support vector machine
CN103914707A (en) Green channel product auxiliary discriminating method based on support vector machine
CN201041547Y (en) Device for analyzing and recognizing different types of green teas based on multi-spectrum image texture
Wah et al. Analysis on feature extraction and classification of rice kernels for Myanmar rice using image processing techniques
Kaur et al. 2-D geometric shape recognition using canny edge detection technique
Wu et al. Fast processing of foreign fiber images by image blocking
Khandelwal et al. Image Processing Based Quality Analyzer and Controller
CN110415241A (en) A kind of surface of concrete structure quality determining method based on computer vision
Kruglov Using Open Source Libraries in the Development of Control Systems Based on Machine Vision
CN108805855A (en) A kind of concrete cracks method for quickly identifying
Chatterjee et al. Rock-type classification of an iron ore deposit using digital image analysis technique
Zhang et al. Fabric defect detection based on visual saliency map and SVM
Reddy et al. Separation of gangue from coal based on histogram thresholding

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