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

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

Info

Publication number
CN106093066B
CN106093066B CN201610479587.8A CN201610479587A CN106093066B CN 106093066 B CN106093066 B CN 106093066B CN 201610479587 A CN201610479587 A CN 201610479587A CN 106093066 B CN106093066 B CN 106093066B
Authority
CN
China
Prior art keywords
image block
value
image
defect
notable
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610479587.8A
Other languages
Chinese (zh)
Other versions
CN106093066A (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 OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • G06T7/0008Industrial image inspection checking presence/absence
    • 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/20036Morphological image processing
    • 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/30136Metal

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Chemical & Material Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Quality & Reliability (AREA)
  • Analytical Chemistry (AREA)
  • Biochemistry (AREA)
  • General Health & Medical Sciences (AREA)
  • Immunology (AREA)
  • Pathology (AREA)
  • Investigating Or Analyzing Materials By The Use Of Magnetic Means (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism, step is:One, magnetic shoe image is inputted, the method combined is converted using morphologic top cap and bottom cap, enhances image overall intensity contrast degree;Two, gained image uniform is divided into a*b image block, then distinguishes defect image block and non-defective image block using the gray feature amount of the image block after piecemeal;Three, using the significance for improving Itti vision noticing mechanism model calculating gained defect image block, select primary features to form comprehensive notable figure;Four, it selects Otsu threshold partitioning algorithm to comprehensive notable figure thresholding, extracts defect area.The present invention is by utilizing Morphological scale-space, image block and vision noticing mechanism thought, the problems such as effectively overcoming smaller brightness irregularities, magnetic shoe defect area, magnetic shoe interference of texture itself, can quickly and efficiently extract all kinds of magnetic shoe defects, obtain adaptability with very strong.

Description

A kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism
Technical field
The present invention relates to technical field of machine vision, are paid attention to more specifically to one kind based on improved machine vision The magnetic tile surface defect detection method of mechanism.
Background technique
Ferrite magnetic shoe is primarily used for a kind of tiles magnet on magneto, and the height of quality directly affects forever The overall performance of magneto.In magnetic shoe production process, due to technological problems, magnetic shoe surface is easy to appear crackle, breakage, point The defects of, directly affect the normal use of magnetic shoe.People is used substantially to the judgement of magnetic tile surface defect in industrial production at present Work detection, detection accuracy is poor, detection efficiency is low and labor cost is high.
With the continuous development of machine vision, the defect detecting technique based on machine vision is had begun in industrial products table It is used widely in the quality monitoring of face, being detected automatically using machine vision can be improved the production efficiency of enterprise, reduces labour Cost increases the competitiveness of enterprise.
Illumination is easily led to due to the features such as itself has gray scale difference unobvious, and there are surface radians for magnetic shoe product Unevenly, image grayscale contrast is low, and high to exploitation precision, fireballing magnetic shoe detection method brings certain difficulty.Li Xue Qin etc. exists《CAD and graphics journal》Middle proposition utilizes a kind of non-downsampling Contourlet domain adaptive thresholding The magnetic shoe defect automatic testing method in value face, this method can guarantee that magnetic tile surface defect detection has compared with high-accuracy, still It is longer to calculate the time.Yu Yongwei etc. proposes that the segmentation of adaptive line Morphology Algorithm lacks according to magnetic shoe surface grey value profile situation It falls into, but this method is more sensitive to noise.Darabi etc. propose employment artificial neural networks divide defect image, but the algorithm compared with Complexity, it is computationally intensive, it is not able to satisfy the requirement of on-line real-time measuremen.Above-mentioned algorithm needs to be changed in the accuracy and speed of detection Into.
Through retrieving, Chinese Patent Application No. 201310020370.7, the applying date is on January 18th, 2013, innovation and creation name Referred to as:Magnetic tile surface defect feature extraction and defect classification method based on machine vision;This application constructs first is suitble to magnetic 5 scales that watt surface defects characteristic extracts, 8 direction Gabor filter groups, and original image is filtered, obtain 40 width point Spirogram;The gray average and Variance feature for extracting component map respectively again, form the feature vector of one 80 dimension;And with PCA it is main at Divide analytic approach and ICA independent component analysis method to carry out dimensionality reduction to the feature vector of 80 dimension of original, removes correlation and redundancy, obtain The feature vector of 20 dimensions;Characteristic vector data is normalized and is pre-processed, 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 When, pretreated test sample data are input to support vector machines, so that it may realize the automatic Classification and Identification of defect.
For another example Chinese Patent Application No. 201110061144.4, the applying date are on March 14th, 2011, invention and created name For:Magnetic tile surface defect automatic testing method and device based on machine vision;This application also discloses that one kind passes through machine The method that vision technique detects magnetic tile surface defect.Specifically detection process is:(1) detected magnetic shoe is placed in conveyer belt On;(2) start ccd image acquisition device, acquire magnetic shoe surface image and be sent to image processing unit;(3) image procossing list Member by the image of acquisition through image filtering, image segmentation, after after the processing such as Morphological scale-space, edge detection, processing result is passed Transport to defect detection unit;(4) one-dimensional digital signal is converted through feature extraction by processing result image;(5) by acquired results After the training of conceptual schema recognition unit and test, magnetic shoe surface quality is divided into two class of good magnetic shoe and defect magnetic shoe, to reach To the purpose of defects detection.
Above-mentioned application case can filter out the interference of magnetic shoe surface texture to a certain extent, and the feature of extraction also can be certain Degree reflects defect information;But above-mentioned application case or that there are algorithm operation quantities is big, the long problem of detection time, or do not consider magnetic Watt product gray scale difference is unobvious, there are problems that surface radian, lower to the detection accuracy of magnetic tile surface defect, still needs to further It improves.
Summary of the invention
1. technical problems to be solved by the inivention
The present invention existing magnetic tile surface defect detection algorithm aiming at the problem that equal Shortcomings in detection accuracy and speed, A kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism is provided, realizes the automatic of magnetic shoe defect Detection.The present invention uses morphology top cap and bottom cap to convert the contrast of enhancing defect area and background image first, then sharp It whether there is defect with the gray feature amount contrasting detection magnetic shoe between image block each after image block, effectively reduce algorithm Operand;It is finally the interference for overcoming the normal grinding texture of magnetic shoe to extract defect, is divided using improved visual attention model Image realizes defect Segmentation and extraction, the present invention can be dry efficiently against noise by calculating defect image block vision saliency value It disturbs, algorithm accuracy rate is high, and, high reliablity good to the adaptability of different defects.
2. technical solution
In order to achieve the above objectives, technical solution provided by the invention is:
A kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism of the invention, step For:
Step 1: input magnetic shoe surface original image, converts the method combined using morphologic top cap and bottom cap, increases Strong image overall intensity contrast degree;
Step 2: magnetic shoe image uniform obtained by step 1 is divided into a*b image block, each image block side length is M*N, so Defect image block and non-defective image block are distinguished using the gray feature amount of the image block after piecemeal afterwards, judges that image whether there is Defect simultaneously determines tile location where defect;
Step 3: using the significance for improving defect image block obtained by Itti vision noticing mechanism model calculating step 2, It selects primary features to form notable figure, fused comprehensive notable figure is normalized, obtaining maximum focus-of-attention is For defect area, directly comprehensive notable figure is split;
Step 4: selecting Otsu threshold partitioning algorithm to comprehensive notable figure thresholding after obtaining comprehensive notable figure, extract Defect area.
Further, step 1 carries out top cap and the process of bottom cap transformation is:
Top cap Transformation Graphs That(f) and bottom cap Transformation Graphs Bhat(f) calculation formula is as follows:
Wherein, f indicates that original image, γ (f) indicate that the opening operation of original image f, φ (f) indicate closing for original image f Operation;
Original image f is subtracted into That(f) it reduces the bright detail of image, then subtracts Bhat(f) enhance image comparison Degree realizes the purpose for emphasizing magnetic shoe defect area, exports image kTHIt indicates, calculation formula is as follows:
kTH=f- λ That(f)-ψBhat(f)
In formula, select the circular configuration that radius is 17mm 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 mean value Wm, to four directions ash Spend the entropy W of co-occurrence matrix superpositioncWith improved image block variance Wd;Wherein:
Image block mean value WmFor n before counting after image block grey scale pixel value sorts from small to large local mean values, count It is as follows to calculate formula:
In formula, f (xi, yj) indicate coordinate (x in regional areai, yj) grey scale pixel value;
It is as follows to the entropy Wc calculation formula of four direction gray level co-occurrence matrixes superposition:
In above formula, k is the side length of gray level co-occurrence matrixes;P (i, j) indicates the statistical probability in matrix at (i, j), t table Show that gray level co-occurrence matrixes calculate the direction of entropy;
Improved image block variance WdCalculation formula is as follows:
Wd=Std (SN-min(SN))
SN(x)=[SN(x1) ..., SN(xN)]
In above formula, Std () is to ask mean square deviation formula, SNIt (x) is to be added the gray value of vertical direction in image block to be formed 1 × N matrix, f (xi, yj) indicates coordinate be (xi, yj) point grey scale pixel value.
Further, the standard for judging defect image block and non-defective image block in step 2 is:Defect image block WmValue is respectively less than the W of locating row image blockmValue, WcAnd WdValue is all larger than the W of locating row image blockc、WdValue, the W of defect image blockd Value is greater than the locating second largest W of row image blockd3 times of value.
Further, the primary features selected in step 3 include:
A. local luminance feature:Using the mean value and variance of local luminance as reference, with each picture in regional area The mean value and variance of the image block gray value of the gray value and region of element subtract each other to obtain difference, and carry out index letter to the difference Number processing, obtains local luminance notable figure Sl(x, y), calculation formula are as follows:
Ilocal(xi, yj)=f (xi, yj)-(mlocal(x, y)+μ dlocal(x, y))
In formula, mlocal(x, y) indicates local gray level average value, dlocal(x, y) indicates local gray level variance, f (xi, yj) table Show that gray value, μ are variance controlling elements, value range is 0~1;
B. global brightness:Using global average value as reference, subtracted each other therewith with the gray value of each pixel, and Exponential function processing is carried out to difference, obtains the significant S of global brightnessg(x, y), calculation formula are as follows:
Iglobal(xi, yi)=| f (xi, yi)-mglobal|
In formula, mglobalFor the average gray of whole picture magnetic shoe image, sum (Iglobal(xi, yi)) it is all Iglobal(xi, yi) value sum;
C. frequecy characteristic:Using DoG filter, frequecy characteristic notable figure S is obtainedG(x, y), calculation formula are as follows:
SG(x, y)=| mglobal-IG(x, y) |
In formula, IG(x, y) is through the filtered image of DoG, σ1And σ2It is the standard deviation of gaussian kernel function, σ1∶σ2=5: 1.
Further, the σ1=0.5, σ2=0.1.
Further, aobvious for obtained local luminance notable figure, global brightness notable figure, frequecy characteristic in step 3 Work figure is merged, and the calculation formula for generating comprehensive notable figure is as follows:
3. beneficial effect
Using technical solution provided by the invention, compared with existing well-known technique, there is following remarkable result:
(1) a kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism of the invention, passes through Defect area and background image contrast in morphologic top cap and bottom cap transformation enhancing image, inhibit the gray scale of high-brightness region Value, enhances image overall intensity contrast degree, conveniently identifies defect area;
(2) a kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism of the invention, in conjunction with Image block thought efficiently differentiates defect map using the gray feature amount of defect image block and the difference of non-defective image block As block and non-defective image block, image is judged with the presence or absence of defect and determines defect place tile location, improves algorithm Operational efficiency reduces operation time and reduces partitioning algorithm complexity;
(3) a kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism of the invention is improved Vision noticing mechanism model realizes defect Segmentation and extraction by calculating defect image block vision saliency value, can be effective gram The interference of magnetic shoe texture is taken, it is accurate to complete to extract the defect on magnetic shoe surface;
(4) a kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism of the invention, effectively Ground overcomes the problems such as smaller brightness irregularities, magnetic shoe defect area, magnetic shoe interference of texture itself, can quickly and efficiently mention All kinds of magnetic shoe defects are taken, there is very strong adaptability.
Detailed description of the invention
Fig. 1 is magnetic tile surface defect detection algorithm flow chart of the invention;
(a)~(h) in Fig. 2 is genetic defects figure of the invention;
(a)~(h) in Fig. 3 is notable figure fusion figure of the invention;
(a)~(h) in Fig. 4 is image segmentation figure of the invention.
Specific embodiment
To further appreciate that the contents of the present invention, 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 magnetic tile surface defect detection side based on improved machine vision attention mechanism of the present embodiment Method includes the following steps:
The first step:Magnetic shoe surface original image is inputted, during image processing, due to the lower region of some gray values It is easy to obscure with defect area, interferes processing result.The present embodiment proposes to combine using morphologic top cap and the transformation of bottom cap Method, improve defect area and background contrast, inhibit the gray value of high-brightness region, make image overall intensity contrast degree Enhanced, conveniently identifies defect area.
Progress top cap and the process of bottom cap transformation are:
Top cap Transformation Graphs ThatIt (f) is and the bottom cap Transformation Graphs B from the opening operation γ (f) of original image f subtracted imagehat(f) It is that f is subtracted by the closed operation φ (f) of original image, calculation formula is as follows:
The high gray value region of original image f is shown in highlight regions after top cap transformation, highlights after the transformation of bottom cap The low ash angle value region of original image f is shown in region.It therefore, can will be former to further decrease the gray value of inclined bright part Beginning, image f subtracted That(f) it reduces the bright detail of image, then subtracts Bhat(f) enhance picture contrast, realization emphasizes magnetic Watt defect area.Export image kTHIt indicates, calculation formula is as follows:
kTH=f- λ That(f)-ψBhat(f)
In above formula, select radius be 17mm circular configuration as the structural element in morphology, parameter factors take λ= 0.1, ψ=0.1.
Second step:In order to improve algorithm operational efficiency, reducing operation time and reduce partitioning algorithm complexity, in image It should quickly be detected before segmentation in piece image with the presence or absence of defect area.The present embodiment combines the thought of image block first, Magnetic shoe image uniform obtained by step 1 is divided into a*b image block, each image block side length is M*N, in order to make the figure after piecemeal As moderate dimensions just include defect area, the value of M, N need test of many times to measure.Then the image block after piecemeal is utilized Gray-scale statistical amount, i.e., the image block mean value after piecemeal, to the entropy and improved image block of the superposition of four direction gray level co-occurrence matrixes Three kinds of gray feature amounts such as variance, the gray feature amount of the different images block by comparing input picture, efficiently differentiate defect Image block and non-defective image block judge image with the presence or absence of defect and determine defect place tile location.
Using above-mentioned 3 kinds of gray feature amounts, the detailed process for distinguishing defect image block and non-defective image block is:
Since image is divided into a row b column, so to calculate three kinds of gray feature amounts of a*b image block, specially:
A. mean value Wm:It is smaller to the contribution of image mean value since defect area is smaller relative to whole image block area, therefore When calculating mean value, the pixel for participating in calculating mean value can be counted and scope of statistics is defined in defect area as far as possible.This reality Apply n before counting after example sorts grey scale pixel value from small to large local mean value Wm, can use gray scale in practice process Histogram realizes that n value is 250 appropriate.Calculation formula is as follows:
In formula, f (xi, yj) indicate coordinate (x in regional areai, yj) grey scale pixel value;
B. entropy Wc:Gray level co-occurrence matrixes mainly reflect grayscale distribution information, and element is by separately certain in co-occurrence matrix What the pixel with same grayscale value of distance constituted number.To reduce operand, the present embodiment is by the gray scale of image block Grade is compressed to 0~15 from 0~255 and characterizes gray level co-occurrence matrixes, including energy, entropy, the moment of inertia and phase with some scalars again Guan Xing.Entropy W in gray level co-occurrence matrixesgIt is able to reflect the complexity of image, it, can be four by it for the conspicuousness for increasing entropy The entropy in direction is added, and is Wc.Calculation formula is as follows:
In above formula, k is the side length of gray level co-occurrence matrixes, when tonal gradation is compressed to 16, k=16;P (i, j) is indicated Statistical probability in matrix at (i, j), t indicate that gray level co-occurrence matrixes calculate the direction of entropy.
C. variance Wd:For the influence for reducing 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);Effect of the defect area in calculating process is influenced because gray value is added to reduce, Matrix items subtract the minimum value in matrix when calculating, the mean square deviation of last calculating matrix, and calculation formula is as follows:
Wd=Std (SN-min(SN))
SN(x)=[SN(x1) ..., SN(xN)]
In above formula, Std () is to ask mean square deviation formula, SNIt (x) is to be added the gray value of vertical direction in image block to be formed 1 × N matrix f (xi, yj) indicates coordinate be (xi, yj) point grey scale pixel value.
Count the mean value of each image block after every a line piecemeal, entropy and variance.The standard for determining whether defect block is:Have scarce Fall into the W of image blockmValue is respectively less than the image block of locating row, WcAnd WdIt is all larger than locating row image block, it should be noted that defect map As block WdValue is much larger than non-defective image block, so with WdCertain multiple relationship should be set for criterion, the present embodiment takes multiple For maximum W in a line image blockdValue is greater than the second largest Wd3 times.If there is the parameter of image block in a line image block statistical form Meeting conditions above then judges the image block for defect image block.
Third step:Since magnetic shoe surface texture is compared with horn of plenty, directly progress Threshold segmentation difficulty is larger, and the present embodiment uses Improve the significance that Itti vision noticing mechanism model calculates defect image block obtained by step 2.It is aobvious from global saliency value and part The consideration of work value angle reselects primary features to form notable figure, normalizes to [0,1] to fused comprehensive notable figure, Obtain again maximum focus-of-attention (i.e. saliency value be 1 position) be defect area, since defect image block size is smaller, so It need not consider other focus-of-attentions, therefore can be directly to comprehensive notable figure segmentation.Detailed process is:
(1) primary features select
A. local luminance feature:Using the mean value and variance of local luminance as reference, with each picture in regional area The mean value and variance of the image block gray value of the gray value and region of element subtract each other to obtain difference, and carry out index letter to the difference Number processing, obtains local luminance notable figure Sl(x, y), calculation formula are as follows:
Ilocal(xi, yj)=f (xi, yj)-(mlocal(x, y)+μ dlocal(x, y))
M in formulalocal(x, y) indicates local gray level average value, dlocal(x, y) indicates local gray level variance, f (xi, yj) table Show that gray value, μ are that variance controlling elements value range is 0~1.
B. global brightness lacks enough local contrasts, therefore in larger defect area in the middle part of defect area Using global average value as reference, subtracted each other therewith with the gray value of each pixel, and numerical value processing is carried out to difference, obtained Global brightness notable figure.Global brightness notable figure Sg(x, y) calculation formula is as follows:
Iglobal(xi, yj)=| f (xi, yj)-mglobal|
In formula, mglobalFor the average gray of whole picture magnetic shoe image, sum (Iglobal(xi, yj)) it is all Iglobal(xi, yj) value sum.
C. frequecy characteristic:Since the visible of edge and other details can be enhanced in DoG filter while filtering out interference Property, so selecting DoG filter, calculation formula is as follows:
In formula, σ1And σ2It is the standard deviation of gaussian kernel function, the bandwidth of their proportionate relationship control filter works as σ1= 1.6σ2When, it is exactly edge detector, works as σ1When infinitely great, then DC component is filtered, i.e., background image filters out.
When handling image data, to filter out texture and other interference informations using a lesser Gaussian kernel window, one As use [1,4,6,4,1]/16.Using DoG filter, frequecy characteristic notable figure is obtained by following formula:
SG(x, y)=| mglobal-IG(x, y) |
S in formulaG(x, y) is frequecy characteristic notable figure, IG(x, y) is through the filtered image of DoG.σ is taken in the present embodiment1∶ σ2=5: 1, σ1=0.5, σ2=0.1.
(2) Fusion Features:Since local luminance notable figure, global brightness notable figure, the significant graph expression of frequecy characteristic are specific The characteristic in direction has certain limitation, so carrying out fusion generates a comprehensive notable figure, to image segmentation.It calculates Formula is as follows:
4th step:Big saliva (Ostu) Threshold Segmentation Algorithm is selected to carry out threshold to comprehensive notable figure after obtaining comprehensive notable figure Value obtains comprehensive notable figure marking area and non-significant region (foreground and background), can be realized to the significant area of original image The segmentation in domain (defect area).The marking area being partitioned into not completely corresponds to the defect area of original image, Ke Nengcun Edge region and isolated significant point, but these can be eliminated carefully by carrying out morphology opening operation to thresholded image Section.
(a)~(h) in Fig. 2 is genetic defects figure of the invention, and (a)~(h) in Fig. 3 is that notable figure of the invention is melted Figure is closed, as can be seen from Figure 3 relative to the notable figure of primary features, total notable figure has on inhibiting texture information obviously to be mentioned It is high.(a)~(h) in Fig. 4 is image segmentation figure of the invention, after dividing as can be seen from Figure 4 to comprehensive specific image, Defect area is substantially achieved extraction.
Schematically the present invention and embodiments thereof are described above, description is not limiting, institute in attached drawing What is shown is also one of embodiments of the present invention, and actual structure is not limited to this.So if the common skill of this field Art personnel are enlightened by it, without departing from the spirit of the invention, are not inventively designed and the technical solution Similar frame mode and embodiment, are within the scope of protection of the invention.

Claims (6)

1. a kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism, step are:
Step 1: input magnetic shoe surface original image, converts the method combined, enhancing figure using morphologic top cap and bottom cap As overall intensity contrast degree;
Step 2: magnetic shoe image uniform obtained by step 1 is divided into a*b image block, each image block side length is M*N, then sharp Defect image block and non-defective image block are distinguished with the gray feature amount of the image block after piecemeal, judges image with the presence or absence of defect And determine tile location where defect;
Step 3: using the significance for improving defect image block obtained by Itti vision noticing mechanism model calculating step 2, selection Primary features are normalized fused comprehensive notable figure to form notable figure, and obtaining maximum focus-of-attention is to lack Fall into region;Wherein, the primary features of selection include:
A. local luminance feature:Using the mean value and variance of local luminance as reference, with each pixel in regional area The mean value and variance of gray value and the image block gray value in the region subtract each other to obtain difference, and carry out at exponential function to the difference Reason, obtains local luminance notable figure Sl(x, y), calculation formula are as follows:
Ilocal(xi, yj)=f (xi, yj)-(mlocal(x, y)+μ dlocal(x, y))
In formula, mlocal(x, y) indicates local gray level average value, dlocal(x, y) indicates local gray level variance, f (xi, yj) indicate to sit It is designated as (xi, yj) point grey scale pixel value, μ be variance controlling elements, value range be 0~1;
B. global brightness:Using global average value as reference, subtracted each other therewith with the gray value of each pixel, and to difference Value carries out exponential function processing, obtains global brightness notable figure Sg(x, y), calculation formula are as follows:
Iglobal(xi, yj)=| f (xi, yj)-mglobal|
In formula, mglobalFor the average gray of whole picture magnetic shoe image, sum (Iglobal(xi, yj)) it is all Iglobal(xi, yj) value Sum;
C. frequecy characteristic:Using DoG filter, frequecy characteristic notable figure S is obtainedG(x, y), calculation formula are as follows:
SG(x, y)=| mglobal-IG(x, y) |
In formula, IG(x, y) is through the filtered image of DoG, σ1And σ2It is the standard deviation of gaussian kernel function, σ1∶σ2=5: 1;
Step 4: selecting Otsu threshold partitioning algorithm to comprehensive notable figure thresholding after obtaining comprehensive notable figure, defect is extracted Region.
2. a kind of magnetic tile surface defect detection side based on improved machine vision attention mechanism according to claim 1 Method, it is characterised in that:Step 1 carries out top cap and the process of bottom cap transformation is:
Top cap Transformation Graphs That(f) and bottom cap Transformation Graphs Bhat(f) calculation formula is as follows:
Wherein, f indicates that original image, γ (f) indicate that the opening operation of original image f, φ (f) indicate the closed operation of original image f;
Original image f is subtracted into That(f) it reduces the bright detail of image, then subtracts Bhat(f) enhance picture contrast, it is real It now emphasizes the purpose of magnetic shoe defect area, exports image kTHIt indicates, calculation formula is as follows:
kTH=f- λ That(f)-ψBhat(f)
In formula, select the circular configuration that radius is 17mm as the structural element in morphology, parameter factors λ=0.1, ψ= 0.1。
3. a kind of magnetic tile surface defect detection based on improved machine vision attention mechanism according to claim 1 or 2 Method, it is characterised in that:The gray feature amount of image block described in step 2 includes image block mean value Wm, it is total to four direction gray scales The entropy W of raw matrix superpositioncWith improved image block variance Wd;Wherein:
Image block mean value WmFor n before counting after image block grey scale pixel value sorts from small to large local mean values, calculation formula It is as follows:
In formula, f (xi, yj) indicate that coordinate is (x in regional areai, yj) point grey scale pixel value;
To the entropy W of four direction gray level co-occurrence matrixes superpositioncCalculation formula is as follows:
In above formula, k is the side length of gray level co-occurrence matrixes;P (i, j) indicates the statistical probability in matrix at (i, j), and t indicates ash Spend the direction that co-occurrence matrix calculates entropy;
Improved image block variance WdCalculation formula is as follows:
Wd=Std (SN(x)-min(SN(x)))
SN(x)=[SN(x1) ..., SN(xN)]
In above formula, Std () is to ask mean square deviation formula, SN(x) for the gray value of vertical direction in image block is added to be formed 1 × The matrix of N, f (xi, yj) indicates coordinate be (xi, yj) point grey scale pixel value.
4. a kind of magnetic tile surface defect detection side based on improved machine vision attention mechanism according to claim 3 Method, it is characterised in that:The standard for judging defect image block and non-defective image block in step 2 is:The W of defect image blockmValue is equal Less than the W of locating row image blockmValue, WcValue is greater than the W of locating row image blockcValue, the W of defect image blockdValue is greater than locating row figure As the second largest W of blockd3 times of value.
5. a kind of magnetic tile surface defect detection side based on improved machine vision attention mechanism according to claim 4 Method, it is characterised in that:The σ1=0.5, σ2=0.1.
6. a kind of magnetic tile surface defect detection side based on improved machine vision attention mechanism according to claim 5 Method, it is characterised in that:Local luminance notable figure, global brightness notable figure, frequecy characteristic notable figure in step 3 for obtaining It is merged, the calculation formula for generating comprehensive notable figure is as follows:
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 CN106093066A (en) 2016-11-09
CN106093066B true 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)

Families Citing this family (33)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN107369163B (en) * 2017-06-15 2020-12-01 西安微电子技术研究所 Rapid SAR image target detection method based on optimal entropy dual-threshold segmentation
CN107490583A (en) * 2017-09-12 2017-12-19 桂林电子科技大学 A kind of intermediate plate defect inspection method based on machine vision
CN108305243B (en) * 2017-12-08 2021-11-30 五邑大学 Magnetic shoe surface defect detection method based on deep learning
CN108447050A (en) * 2018-03-07 2018-08-24 湘潭大学 A kind of Surface Flaw dividing method based on super-pixel
CN108520274B (en) * 2018-03-27 2022-03-11 天津大学 High-reflectivity surface defect detection method based on image processing and neural network classification
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
CN109858501A (en) * 2019-02-20 2019-06-07 云南农业大学 A kind of two phase flow pattern feature extracting method
CN110033434A (en) * 2019-03-04 2019-07-19 南京航空航天大学 A kind of detection method of surface flaw based on texture conspicuousness
CN110009638B (en) * 2019-04-12 2023-01-03 重庆交通大学 Bridge inhaul cable image appearance defect detection method based on local statistical characteristics
CN110210608B (en) * 2019-06-05 2021-03-26 国家广播电视总局广播电视科学研究院 Low-illumination image enhancement method based on attention mechanism and multi-level feature fusion
CN110751623A (en) * 2019-09-06 2020-02-04 深圳新视智科技术有限公司 Joint feature-based defect detection method, device, equipment and storage medium
CN110766675B (en) * 2019-10-22 2020-07-10 科士恩科技(上海)有限公司 Solar cell panel defect detection method
CN112950526B (en) * 2019-11-25 2024-03-12 合肥欣奕华智能机器股份有限公司 Display defect detection method and device
CN110992336A (en) * 2019-12-02 2020-04-10 东莞西尼自动化科技有限公司 Small sample defect detection method based on image processing and artificial intelligence
CN111210419B (en) * 2020-01-09 2023-10-20 浙江理工大学 Micro magnetic shoe surface defect detection method based on human visual characteristics
CN111476784A (en) * 2020-04-14 2020-07-31 孙洁 Product surface defect online detection method based on image enhancement recognition technology
CN111612787B (en) * 2020-06-19 2021-09-14 国网湖南省电力有限公司 Concrete crack high-resolution image lossless semantic segmentation method and device and storage medium
CN112200826B (en) * 2020-10-15 2023-11-28 北京科技大学 Industrial weak defect segmentation method
CN112330614B (en) * 2020-10-27 2021-06-18 哈尔滨市科佳通用机电股份有限公司 Bottom plate bolt loss detection method based on image processing
CN112435232A (en) * 2020-11-23 2021-03-02 南京信息工程大学 Defect detection method based on haar wavelet combined image variance
CN113702257A (en) * 2021-08-09 2021-11-26 西南石油大学 Conglomerate pore structure characterization method based on CT three-dimensional data volume
CN114240926B (en) * 2021-12-28 2022-12-13 湖南云箭智能科技有限公司 Board card defect type identification method, device and equipment and readable storage medium
CN114004837B (en) * 2022-01-04 2022-03-04 深圳精智达技术股份有限公司 Method for detecting foreign matters on cover glass module and related device
CN114897772B (en) * 2022-03-31 2024-05-14 河南省开仑化工有限责任公司 Method for regulating and controlling forward vulcanization of rubber based on machine vision
CN114627111B (en) * 2022-05-12 2022-07-29 南通英伦家纺有限公司 Textile defect detection and identification device
CN115063400B (en) * 2022-07-22 2022-11-01 山东中艺音美器材有限公司 Musical instrument production defect detection method using visual means
CN115082485B (en) * 2022-08-23 2023-08-29 广东欧达雅包装制品有限公司 Method and system for detecting bubble defects on surface of injection molding product
CN117237270B (en) * 2023-02-24 2024-03-19 靖江仁富机械制造有限公司 Forming control method and system for producing wear-resistant and corrosion-resistant pipeline
CN115861317B (en) * 2023-02-27 2023-04-28 深圳市伟利达精密塑胶模具有限公司 Plastic mold production defect detection method based on machine vision
CN116012659B (en) * 2023-03-23 2023-06-30 海豚乐智科技(成都)有限责任公司 Infrared target detection method and device, electronic equipment and storage medium

Citations (5)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5198420B2 (en) * 2009-12-18 2013-05-15 株式会社日立ハイテクノロジーズ Image processing apparatus, measurement / inspection system, and program

Patent Citations (5)

* 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
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
Visual Attention in Objective Image Quality Assessment: Based on Eye-Tracking Data;Hantao Liu et al.;《IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY》;20110731;第21卷(第7期);第971-982页 *
磁瓦表面图像的自适应形态学滤波缺陷提取方法;余永维 等;《计算机辅助设计与图形学学报》;20120331;第24卷(第3期);第352-354页第1-3节以及图1-4 *

Also Published As

Publication number Publication date
CN106093066A (en) 2016-11-09

Similar Documents

Publication Publication Date Title
CN106093066B (en) A kind of magnetic tile surface defect detection method based on improved machine vision attention mechanism
Liming et al. Automated strawberry grading system based on image processing
CN115294113B (en) Quality detection method for wood veneer
Song et al. Defect detection in random colour textures
Mittal et al. Non-destructive image processing based system for assessment of rice quality and defects for classification according to inferred commercial value
Teimouri et al. On-line separation and sorting of chicken portions using a robust vision-based intelligent modelling approach
CN103034852B (en) The detection method of particular color pedestrian under Still Camera scene
CN108985170A (en) Transmission line of electricity hanger recognition methods based on Three image difference and deep learning
CN106815819B (en) More strategy grain worm visible detection methods
CN111582359B (en) Image identification method and device, electronic equipment and medium
CN110009618A (en) A kind of Axle Surface quality determining method and device
Dong et al. A novel method for extracting information on pores from cast thin-section images
CN108921004A (en) Safety cap wears recognition methods, electronic equipment, storage medium and system
Galsgaard et al. Circular hough transform and local circularity measure for weight estimation of a graph-cut based wood stack measurement
Yro et al. Cocoa beans fermentation degree assessment for quality control using machine vision and multiclass svm classifier
Gurubelli et al. Texture and colour gradient features for grade analysis of pomegranate and mango fruits using kernel-SVM classifiers
Abdellah et al. Defect detection and identification in textile fabric by SVM method
Malathi et al. A survey on plant leaf disease detection using image processing techniques
Wu et al. Fast processing of foreign fiber images by image blocking
Pratap et al. Development of Ann based efficient fruit recognition technique
Yeh et al. Establishing a demerit count reference standard for the classification and grading of leather hides
Chakraborty et al. Recent developments in paper currency recognition system
CN109509168A (en) A kind of details automatic analysis method for picture quality objective evaluating dead leaf figure
CN117330582A (en) Polymer PE film surface crystal point detecting system
CN108154116A (en) A kind of image-recognizing method and system

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