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
value
image block
defect
gray
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)
  • Image Processing (AREA)
  • Investigating Or Analyzing Materials By The Use Of Magnetic Means (AREA)
  • Image Analysis (AREA)

Abstract

本发明公开了一种基于改进的机器视觉注意机制的磁瓦表面缺陷检测方法,步骤为:一、输入磁瓦图像,利用形态学的顶帽和底帽变换相结合的方法,增强图像整体灰度对比度;二、将所得图像均匀分成a*b个图像块,然后利用分块后的图像块的灰度特征量区分缺陷图像块和非缺陷图像块;三、采用改进Itti视觉注意机制模型计算所得缺陷图像块的显著度,选择初级特征用以形成综合显著图;四、选用大津阈值分割算法对综合显著图阈值化,提取缺陷区域。本发明通过利用形态学处理,图像分块和视觉注意机制思想,有效地克服了亮度不均匀、磁瓦缺陷面积较小、磁瓦本身纹理干扰等问题,可以快速、有效地提取各类磁瓦缺陷,具有很强得适应性。

The invention discloses a magnetic tile surface defect detection method based on an improved machine vision attention mechanism. 2. Divide the obtained image evenly into a*b image blocks, and then use the gray feature quantity of the divided image blocks to distinguish defective image blocks from non-defective image blocks; 3. Use the improved Itti visual attention mechanism model to calculate The saliency of the obtained defect image block is selected from the primary features to form a comprehensive saliency map; 4. The Otsu threshold segmentation algorithm is used to threshold the comprehensive saliency map to extract the defect area. The invention effectively overcomes the problems of uneven brightness, small defect area of magnetic tiles, and texture interference of magnetic tiles by using morphological processing, image segmentation and visual attention mechanism, and can quickly and effectively extract various types of magnetic tiles Defects are highly adaptable.

Description

一种基于改进的机器视觉注意机制的磁瓦表面缺陷检测方法A Method for Surface Defect Detection of Magnetic Tile Based on Improved Machine Vision Attention Mechanism

技术领域technical field

本发明涉及机器视觉技术领域,更具体地说,涉及一种基于改进的机器视觉注意机制的磁瓦表面缺陷检测方法。The invention relates to the technical field of machine vision, in particular to a method for detecting surface defects of magnetic tiles based on an improved machine vision attention mechanism.

背景技术Background technique

铁氧体磁瓦是主要用于永磁电机上的一种瓦状磁铁,其品质的高低直接影响了永磁电机的整体性能。在磁瓦生产过程中,由于工艺问题,磁瓦表面容易出现裂纹、破损、麻点等缺陷,直接影响了磁瓦的正常使用。目前工业生产中对磁瓦表面缺陷的判断基本采用人工检测,检测精度差、检测效率低且劳动力成本高。Ferrite magnet tile is a kind of tile-shaped magnet mainly used in permanent magnet motors, and its quality directly affects the overall performance of permanent magnet motors. During the production process of magnetic tiles, due to technological problems, the surface of magnetic tiles is prone to defects such as cracks, damage, pitting, etc., which directly affects the normal use of magnetic tiles. At present, the judgment of the surface defects of magnetic tiles in industrial production basically adopts manual detection, which has poor detection accuracy, low detection efficiency and high labor cost.

随着机器视觉的不断发展,基于机器视觉的缺陷检测技术已经开始在工业产品表面质量监控中得到广泛应用,利用机器视觉自动检测能够提高企业的生产效率、降低劳动成本,增加企业的竞争力。With the continuous development of machine vision, defect detection technology based on machine vision has begun to be widely used in the monitoring of the surface quality of industrial products. The use of machine vision automatic detection can improve the production efficiency of enterprises, reduce labor costs, and increase the competitiveness of enterprises.

针对磁瓦产品,由于其本身具有灰度差不明显,存在表面弧度等特点,易导致光照不均匀,图像灰度对比度低,给开发精度高,速度快的磁瓦检测方法带来一定的难度。李雪琴等在《计算机辅助设计与图形学学报》中提出利用一种非下采样Contourlet域自适应阈值面的磁瓦缺陷自动检测方法,该方法能够保证磁瓦表面缺陷检测具有较高准确率,但是计算时间较长。余永维等依据磁瓦表面灰度值分布情况提出自适应线性形态学算法分割缺陷,但是该方法对噪声较为敏感。Darabi等提出用人工神经网络分割缺陷图像,但该算法较复杂,计算量大,不能满足在线实时检测的要求。上述算法均在检测的精度和速度上有待改进。For magnetic tile products, due to their own characteristics such as inconspicuous grayscale difference and surface curvature, it is easy to cause uneven illumination and low image grayscale contrast, which brings certain difficulties to the development of high-precision and fast-speed magnetic tile detection methods. . In the "Journal of Computer-Aided Design and Graphics", Li Xueqin proposed an automatic detection method for magnetic tile defects using an adaptive threshold surface in the non-subsampled Contourlet domain. This method can ensure a high accuracy of magnetic tile surface defect detection, but Calculation time is long. Yu Yongwei et al. proposed an adaptive linear morphology algorithm to segment defects based on the distribution of gray values on the surface of magnetic tiles, but this method is more sensitive to noise. Darabi et al. proposed to use artificial neural network to segment defect images, but this algorithm is complex and has a large amount of calculation, which cannot meet the requirements of online real-time detection. The above algorithms all need to be improved in terms of detection accuracy and speed.

经检索,中国专利申请号201310020370.7,申请日为2013年1月18日,发明创造名称为:基于机器视觉的磁瓦表面缺陷特征提取及缺陷分类方法;该申请案首先构造适合磁瓦表面缺陷特征提取的5尺度、8方向Gabor滤波器组,并对原始图像进行滤波,得到40幅分量图;再分别提取分量图的灰度均值和方差特征,组成一个80维的特征向量;并用PCA主成分分析法和ICA独立成分分析法对原80维的特征向量进行降维,去除相关性和冗余性,得到20维的特征向量;对特征向量数据归一化预处理,原数据被归一化到[0,1]之间;最后采用网格法和K-CV交叉验证法实现SVM参数寻优,用训练样本数据离线训练SVM模型;在线检测时,将预处理后的测试样本数据输入到支持向量机,就可以实现缺陷的自动分类识别。After searching, the Chinese patent application number 201310020370.7, the application date is January 18, 2013, and the title of the invention is: Magnetic tile surface defect feature extraction and defect classification method based on machine vision; the application first constructs a magnetic tile surface defect feature Extract the 5-scale, 8-direction Gabor filter bank, and filter the original image to obtain 40 component images; then extract the gray mean and variance features of the component images to form an 80-dimensional feature vector; and use the PCA principal component The analysis method and ICA independent component analysis method reduce the dimension of the original 80-dimensional feature vector, remove the correlation and redundancy, and obtain the 20-dimensional feature vector; normalize the preprocessing of the feature vector data, and the original data is normalized to [0, 1]; finally, the grid method and K-CV cross-validation method are used to optimize the SVM parameters, and the SVM model is trained offline with the training sample data; during online detection, the preprocessed test sample data is input to Support vector machine can realize the automatic classification and recognition of defects.

又如中国专利申请号201110061144.4,申请日为2011年3月14日,发明创造名称为:基于机器视觉的磁瓦表面缺陷自动检测方法与装置;该申请案也公开了一种通过机器视觉技术对磁瓦表面缺陷进行检测的方法。具体检测过程为:(1)将被检测磁瓦置于传送带上;(2)启动CCD图像采集装置,采集磁瓦表面图像并传送至图像处理单元;(3)图像处理单元将采集的图像经图像滤波、图像分割、后形态学处理、边缘检测等处理后,将处理结果传输至缺陷检测单元;(4)将图像处理结果经特征提取,转化为一维数字信号;(5)将所得结果经概率模式识别单元训练和测试后,将磁瓦表面质量分为良好磁瓦和缺陷磁瓦两类,以达到缺陷检测的目的。Another example is the Chinese patent application number 201110061144.4, the application date is March 14, 2011, and the title of the invention is: method and device for automatic detection of magnetic tile surface defects based on machine vision; A method for detecting surface defects of magnetic tiles. The specific detection process is: (1) place the detected magnetic tile on the conveyor belt; (2) start the CCD image acquisition device, collect the surface image of the magnetic tile and send it to the image processing unit; (3) the image processing unit passes the collected image through After image filtering, image segmentation, post-morphological processing, edge detection, etc., the processing results are transmitted to the defect detection unit; (4) the image processing results are converted into one-dimensional digital signals through feature extraction; (5) the obtained results are After training and testing by the probabilistic pattern recognition unit, the surface quality of the magnetic tiles is divided into two types: good magnetic tiles and defective magnetic tiles, so as to achieve the purpose of defect detection.

上述申请案均能在一定程度上滤除磁瓦表面纹理的干扰,提取的特征也能够一定程度反映缺陷信息;但上述申请案或存在算法运算量大,检测时间长的问题,或并未考虑磁瓦产品灰度差不明显,存在表面弧度的问题,对磁瓦表面缺陷的检测精度较低,仍需进一步改进。All of the above applications can filter out the interference of the surface texture of the magnetic tiles to a certain extent, and the extracted features can also reflect the defect information to a certain extent; The gray level difference of magnetic tile products is not obvious, and there is a problem of surface curvature. The detection accuracy of the surface defects of magnetic tiles is low, and further improvement is still needed.

发明内容Contents of the invention

1.发明要解决的技术问题1. The technical problem to be solved by the invention

本发明针对现有磁瓦表面缺陷检测算法在检测精度和速度上均存在不足的问题,提供了一种基于改进的机器视觉注意机制的磁瓦表面缺陷检测方法,实现磁瓦缺陷的自动检测。本发明首先采用形态学顶帽和底帽变换增强缺陷区域与背景图像的对比度,然后利用图像分块后各个图像块之间的灰度特征量对比检测磁瓦是否存在缺陷,有效地减小算法运算量;最后为克服磁瓦正常磨削纹理对缺陷提取的干扰,采用改进的视觉注意模型分割图像,通过计算缺陷图像块视觉显著值,实现缺陷分割和提取,本发明能有效地克服噪声干扰,算法准确率高,且对不同缺陷的适应性好,可靠性高。Aiming at the problem that the existing magnetic tile surface defect detection algorithm has insufficient detection accuracy and speed, the invention provides a magnetic tile surface defect detection method based on an improved machine vision attention mechanism to realize automatic detection of magnetic tile defects. The present invention first uses morphological top-hat and bottom-hat transformations to enhance the contrast between the defect area and the background image, and then utilizes the grayscale feature comparison between each image block after the image is divided to detect whether there is a defect in the magnetic tile, effectively reducing the algorithm Calculations; Finally, in order to overcome the interference of the normal grinding texture of the magnetic tile on the defect extraction, the improved visual attention model is used to segment the image, and the defect segmentation and extraction are realized by calculating the visual salient value of the defect image block. The present invention can effectively overcome the noise interference , the algorithm has high accuracy, good adaptability to different defects, and high reliability.

2.技术方案2. Technical solution

为达到上述目的,本发明提供的技术方案为:In order to achieve the above object, the technical scheme provided by the invention is:

本发明的一种基于改进的机器视觉注意机制的磁瓦表面缺陷检测方法,其步骤为:A kind of magnetic tile surface defect detection method based on the improved machine vision attention mechanism of the present invention, its steps are:

步骤一、输入磁瓦表面原始图像,利用形态学的顶帽和底帽变换相结合的方法,增强图像整体灰度对比度;Step 1. Input the original image of the surface of the magnetic tile, and use the method of combining top-hat and bottom-hat transformation of morphology to enhance the overall gray contrast of the image;

步骤二、将步骤一所得磁瓦图像均匀分成a*b个图像块,每个图像块边长为M*N,然后利用分块后的图像块的灰度特征量区分缺陷图像块和非缺陷图像块,判断图像是否存在缺陷并确定缺陷所在图像块位置;Step 2. Divide the magnetic tile image obtained in step 1 into a*b image blocks evenly, and the side length of each image block is M*N, and then use the grayscale feature quantity of the divided image blocks to distinguish defective image blocks from non-defective Image block, to determine whether the image has defects and determine the position of the image block where the defect is located;

步骤三、采用改进Itti视觉注意机制模型计算步骤二所得缺陷图像块的显著度,选择初级特征用以形成显著图,对融合后的综合显著图进行归一化,获得最大注意焦点即为缺陷区域,直接对综合显著图进行分割;Step 3: Use the improved Itti visual attention mechanism model to calculate the saliency of the defect image block obtained in step 2, select the primary features to form a saliency map, normalize the fused comprehensive saliency map, and obtain the maximum attention focus is the defect area , directly segment the comprehensive saliency map;

步骤四、在获得综合显著图后选用大津阈值分割算法对综合显著图阈值化,提取缺陷区域。Step 4: After obtaining the comprehensive saliency map, the Otsu threshold segmentation algorithm is used to threshold the comprehensive saliency map to extract defect areas.

更进一步地,步骤一进行顶帽和底帽变换的过程为:Furthermore, the process of performing top hat and bottom hat transformation in step 1 is:

顶帽变换图That(f)和底帽变换图Bhat(f)的计算公式如下:The calculation formulas of the top hat transformation graph T hat (f) and the bottom hat transformation graph B hat (f) are as follows:

其中,f表示原始图像,γ(f)表示原始图像f的开运算,φ(f)表示原始图像f的闭运算;Among them, f represents the original image, γ(f) represents the opening operation of the original image f, and φ(f) represents the closing operation of the original image f;

将原始图像f减去That(f)来减少图像的明亮细节,再减去Bhat(f)来增强图像对比度,实现强调磁瓦缺陷区域的目的,输出图像用kTH表示,计算公式如下:Subtract That (f) from the original image f to reduce the bright details of the image, and then subtract B hat ( f) to enhance the image contrast to achieve the purpose of emphasizing the defect area of the magnetic tile. The output image is represented by k TH , and the calculation formula is as follows :

kTH=f-λThat(f)-ψBhat(f)k TH =f-λT hat (f)-ψB hat (f)

式中,选用半径为17mm的圆形结构作为形态学中的结构元素,参数因子λ=0.1,ψ=0.1。In the formula, a circular structure with a radius of 17mm is selected as the structural element in the morphology, and the parameter factors λ=0.1, ψ=0.1.

更进一步地,步骤二中所述图像块的灰度特征量包括图像块均值Wm、对四方向灰度共生矩阵叠加的熵值Wc和改进的图像块方差Wd;其中:Further, the gray feature quantity of the image block described in step 2 includes the image block mean value W m , the entropy value W c superimposed on the four-direction gray-scale co-occurrence matrix and the improved image block variance W d ; where:

图像块均值Wm为将图像块像素灰度值从小到大排序后统计前n项的局部均值,计算公式如下:The average value W m of the image block is the local average value of the first n items after sorting the pixel gray value of the image block from small to large, and the calculation formula is as follows:

式中,f(xi,yj)表示局部区域里坐标(xi,yj)的像素灰度值;In the formula, f(x i , y j ) represents the pixel gray value of the coordinate (x i , y j ) in the local area;

对四方向灰度共生矩阵叠加的熵值Wc计算公式如下:The calculation formula of the entropy value Wc superimposed on the four-direction gray-level co-occurrence matrix is as follows:

上式中,k为灰度共生矩阵的边长;p(i,j)表示在矩阵内(i,j)处的统计概率,t表示灰度共生矩阵计算熵值的方向;In the above formula, k is the side length of the gray-scale co-occurrence matrix; p(i, j) represents the statistical probability at (i, j) in the matrix, and t represents the direction in which the gray-scale co-occurrence matrix calculates the entropy value;

改进的图像块方差Wd计算公式如下:The improved calculation formula of image block variance Wd is as follows:

Wd=Std(SN-min(SN))W d =Std(S N -min(S N ))

SN(x)=[SN(x1),......,SN(xN)]S N (x) = [S N (x 1 ), ..., S N (x N )]

上式中,Std()为求均方差公式,SN(x)为将图像块中竖直方向的灰度值相加形成的1×N的矩阵,f(xi,yj)表示坐标为(xi,yj)点的像素灰度值。In the above formula, Std() is the formula for finding the mean square error, S N (x) is a 1×N matrix formed by adding the gray values in the vertical direction of the image block, and f( xi , y j ) represents the coordinate is the pixel gray value of point ( xi , y j ).

更进一步地,步骤二中判断缺陷图像块和非缺陷图像块的标准为:缺陷图像块的Wm值均小于所处行图像块的Wm值,Wc和Wd值均大于所处行图像块的Wc、Wd值,缺陷图像块的Wd值大于所处行图像块第二大Wd值的3倍。Furthermore, the criterion for judging the defective image block and the non-defective image block in step 2 is: the W m value of the defective image block is smaller than the W m value of the row image block, and the W c and W d values are greater than the row The W c and W d values of the image block, the W d value of the defective image block is greater than 3 times the second largest W d value of the image block in the row.

更进一步地,步骤三中选择的初级特征包括:Furthermore, the primary features selected in step 3 include:

a.局部亮度特征:采用局部亮度的均值和方差作为参考,用局部区域中每一个像素的灰度值与该区域的图像块灰度值的均值和方差相减得到差值,并对该差值进行指数函数处理,得到局部亮度显著图Sl(x,y),计算公式如下:a. Local brightness feature: using the mean and variance of the local brightness as a reference, subtract the gray value of each pixel in the local area from the mean and variance of the gray value of the image block in the area to obtain a difference, and calculate the difference Values are processed with an exponential function to obtain a local brightness saliency map S l (x, y), and the calculation formula is as follows:

Ilocal(xi,yj)=f(xi,yj)-(mlocal(x,y)+μ·dlocal(x,y))I local (x i , y j )=f(x i , y j )-(m local (x, y)+μ·d local (x, y))

式中,mlocal(x,y)表示局部灰度平均值,dlocal(x,y)表示局部灰度方差,f(xi,yj)表示灰度值,μ为方差控制因子,取值范围为0~1;In the formula, m local (x, y) represents the local gray value average, d local (x, y) represents the local gray value variance, f(x i , y j ) represents the gray value, μ is the variance control factor, take The value range is 0~1;

b.全局亮度特征:采用全局的平均值作为参考,用每个像素的灰度值与之相减,并对差值进行指数函数处理,得到全局亮度显著Sg(x,y),计算公式如下:b. Global brightness feature: use the global average as a reference, subtract the gray value of each pixel from it, and perform exponential function processing on the difference to obtain the global brightness significant S g (x, y), the calculation formula as follows:

Iglobal(xi,yi)=|f(xi,yi)-mglobal|I global (x i , y i )=|f(x i , y i )-m global |

式中,mglobal为整幅磁瓦图像的灰度平均值,sum(Iglobal(xi,yi))为所有Iglobal(xi,yi)值的和;In the formula, m global is the gray average value of the entire magnetic tile image, and sum(I global ( xi , y i )) is the sum of all I global ( xi , y i ) values;

c.频率特征:利用DoG滤波器,获得频率特征显著图SG(x,y),计算公式如下:c. Frequency feature: use the DoG filter to obtain the frequency feature saliency map S G (x, y), the calculation formula is as follows:

SG(x,y)=|mglobal-IG(x,y)|S G (x, y)=|m global -I G (x, y)|

式中,IG(x,y)为经DoG滤波后的图像,σ1和σ2是高斯核函数的标准差,σ1∶σ2=5∶1。In the formula, I G (x, y) is the DoG filtered image, σ 1 and σ 2 are the standard deviation of the Gaussian kernel function, σ 12 =5:1.

更进一步地,所述的σ1=0.5,σ2=0.1。Furthermore, said σ 1 =0.5, σ 2 =0.1.

更进一步地,步骤三中对于得到的局部亮度显著图、全局亮度显著图、频率特征显著图进行融合,生成综合显著图的计算公式如下:Furthermore, in step 3, the obtained local brightness saliency map, global brightness saliency map, and frequency feature saliency map are fused, and the calculation formula for generating a comprehensive saliency map is as follows:

3.有益效果3. Beneficial effect

采用本发明提供的技术方案,与已有的公知技术相比,具有如下显著效果:Compared with the existing known technology, the technical solution provided by the invention has the following remarkable effects:

(1)本发明的一种基于改进的机器视觉注意机制的磁瓦表面缺陷检测方法,通过形态学的顶帽和底帽变换增强图像中缺陷区域与背景图像对比度,抑制高亮度区域的灰度值,使图像整体灰度对比度得到增强,方便识别出缺陷区域;(1) A magnetic tile surface defect detection method based on an improved machine vision attention mechanism of the present invention enhances the contrast between the defect region and the background image in the image through morphological top-hat and bottom-hat transformations, and suppresses the grayscale of the high-brightness region Value, so that the overall gray contrast of the image is enhanced, and it is convenient to identify the defect area;

(2)本发明的一种基于改进的机器视觉注意机制的磁瓦表面缺陷检测方法,结合图像分块思想,利用缺陷图像块的灰度特征量与非缺陷图像块的差异,有效地区分缺陷图像块和非缺陷图像块,判断图像是否存在缺陷并确定出缺陷所在图像块位置,提高了算法运行效率,减少了运算时间以及降低了分割算法复杂度;(2) A magnetic tile surface defect detection method based on the improved machine vision attention mechanism of the present invention, combined with the idea of image segmentation, utilizes the difference between the gray feature value of the defective image block and the non-defective image block to effectively distinguish the defect Image blocks and non-defective image blocks, to determine whether there is a defect in the image and determine the position of the image block where the defect is located, which improves the efficiency of the algorithm, reduces the calculation time and reduces the complexity of the segmentation algorithm;

(3)本发明的一种基于改进的机器视觉注意机制的磁瓦表面缺陷检测方法,改进了视觉注意机制模型,通过计算缺陷图像块视觉显著值,实现缺陷分割和提取,能够有效克服磁瓦纹理的干扰,准确完成对磁瓦表面的缺陷提取;(3) A magnetic tile surface defect detection method based on the improved machine vision attention mechanism of the present invention improves the visual attention mechanism model, and realizes defect segmentation and extraction by calculating the visual saliency value of the defect image block, which can effectively overcome the magnetic tile surface defect detection method. Texture interference, accurately complete the defect extraction on the surface of the magnetic tile;

(4)本发明的一种基于改进的机器视觉注意机制的磁瓦表面缺陷检测方法,有效地克服了亮度不均匀、磁瓦缺陷面积较小、磁瓦本身纹理干扰等问题,可以快速、有效地提取各类磁瓦缺陷,具有很强的适应性。(4) A magnetic tile surface defect detection method based on an improved machine vision attention mechanism of the present invention effectively overcomes problems such as uneven brightness, small defect area of magnetic tiles, and texture interference of the magnetic tile itself, and can be quickly and effectively It can accurately extract all kinds of magnetic tile defects and has strong adaptability.

附图说明Description of drawings

图1是本发明的磁瓦表面缺陷检测算法流程图;Fig. 1 is the flow chart of magnetic tile surface defect detection algorithm of the present invention;

图2中的(a)~(h)是本发明的原始缺陷图;(a)~(h) among Fig. 2 is original defect figure of the present invention;

图3中的(a)~(h)是本发明的显著图融合图;(a)-(h) in Fig. 3 are saliency map fusion maps of the present invention;

图4中的(a)~(h)是本发明的图像分割图。(a)-(h) in FIG. 4 are image segmentation diagrams of the present invention.

具体实施方式Detailed ways

为进一步了解本发明的内容,结合附图和实施例对本发明作详细描述。In order to further understand the content of the present invention, the present invention will be described in detail in conjunction with the accompanying drawings and embodiments.

实施例1Example 1

结合图1,本实施例的一种基于改进的机器视觉注意机制的磁瓦表面缺陷检测方法,包括以下步骤:In conjunction with FIG. 1, a method for detecting surface defects of magnetic tiles based on an improved machine vision attention mechanism in this embodiment includes the following steps:

第一步:输入磁瓦表面原始图像,在图像处理过程中,由于一些灰度值较低的区域容易与缺陷区域混淆,干扰处理结果。本实施例提出利用形态学的顶帽和底帽变换相结合的方法,提高缺陷区域与背景的对比度,抑制高亮度区域的灰度值,使图像整体灰度对比度得到增强,方便识别出缺陷区域。Step 1: Input the original image of the surface of the magnetic tile. During image processing, some areas with low gray values are easily confused with defect areas, which interferes with the processing results. This embodiment proposes a method of combining the top-hat and bottom-hat transformations of morphology to improve the contrast between the defect area and the background, suppress the gray value of the high-brightness area, enhance the overall gray contrast of the image, and facilitate the identification of the defect area .

进行顶帽和底帽变换的过程为:The process of performing top-hat and bottom-hat transformations is:

顶帽变换图That(f)是从原始图像f减去图像的开运算γ(f),而底帽变换图Bhat(f)是通过原始图像的闭运算φ(f)减去f,计算公式如下:The top hat transformation map T hat (f) is the opening operation γ(f) of the image subtracted from the original image f, while the bottom hat transformation map B hat (f) is the closing operation φ(f) of the original image minus f, Calculated as follows:

在顶帽变换后高亮区域显示的是原始图像f的高灰度值区域,在底帽变换后高亮区域显示的是原始图像f的低灰度值区域。因此为进一步减小偏亮部分的灰度值,可以将原始图像f减去That(f)来减少图像的明亮细节,再减去Bhat(f)来增强图像对比度,实现强调磁瓦缺陷区域。输出图像用kTH表示,计算公式如下:After the top hat transformation, the highlighted area shows the high gray value area of the original image f, and after the bottom hat transformation, the highlighted area shows the low gray value area of the original image f. Therefore, in order to further reduce the gray value of the brighter part, you can subtract That (f) from the original image f to reduce the bright details of the image, and then subtract B hat ( f) to enhance the image contrast and realize the emphasis on magnetic tile defects area. The output image is represented by k TH , and the calculation formula is as follows:

kTH=f-λThat(f)-ψBhat(f)k TH =f-λT hat (f)-ψB hat (f)

上式中,选用半径为17mm的圆形结构作为形态学中的结构元素,参数因子取λ=0.1,ψ=0.1。In the above formula, a circular structure with a radius of 17mm is selected as the structural element in the morphology, and the parameter factors are λ=0.1 and ψ=0.1.

第二步:为了提高算法运行效率,减少运算时间以及降低分割算法复杂度,在图像分割之前应快速检测一幅图像中是否存在缺陷区域。本实施例首先结合图像分块的思想,将步骤一所得磁瓦图像均匀分成a*b个图像块,每个图像块边长为M*N,为了使分块后的图像尺寸适中正好包含缺陷区域,M,N的取值需要多次试验测定。然后利用分块后的图像块的灰度统计量,即分块后的图像块均值,对四方向灰度共生矩阵叠加的熵值和改进的图像块方差等三种灰度特征量,通过对比输入图像的不同图像块的灰度特征量,有效地区分缺陷图像块和非缺陷图像块,判断图像是否存在缺陷并确定出缺陷所在图像块位置。Step 2: In order to improve the efficiency of the algorithm, reduce the calculation time and reduce the complexity of the segmentation algorithm, it is necessary to quickly detect whether there is a defect area in an image before image segmentation. In this embodiment, firstly, combining the idea of image segmentation, the magnetic tile image obtained in step 1 is evenly divided into a*b image blocks, and the side length of each image block is M*N. The values of area, M, and N need multiple tests to be determined. Then, using the grayscale statistics of the divided image blocks, that is, the mean value of the divided image blocks, the entropy value of the four-direction gray-scale co-occurrence matrix superimposition and the improved image block variance and other three gray-scale feature quantities, by comparing The grayscale feature quantities of different image blocks of the input image can effectively distinguish defective image blocks from non-defective image blocks, determine whether the image has defects and determine the position of the image block where the defect is located.

利用上述3种灰度特征量,区分缺陷图像块和非缺陷图像块的具体过程为:Using the above three kinds of gray feature quantities, the specific process of distinguishing defective image blocks from non-defective image blocks is as follows:

由于图像被分割成a行b列,所以要计算a*b个图像块的三种灰度特征量,具体为:Since the image is divided into a row and b column, it is necessary to calculate the three grayscale feature quantities of a*b image blocks, specifically:

a.均值Wm:由于缺陷区域相对于整个图像块面积比较小,对图像均值贡献较小,故计算均值时,可以统计参与计算均值的像素点并将统计范围尽可能限定于缺陷区域。本实施例将像素灰度值从小到大排序后统计前n项的局部均值Wm,在实践过程中可以利用灰度直方图实现,n取值为250较合适。计算公式如下:a. Mean value W m : Since the defect area is relatively small compared to the area of the entire image block, it contributes little to the image mean value. Therefore, when calculating the mean value, the pixels involved in the calculation of the mean value can be counted and the statistical range is limited to the defect area as much as possible. In this embodiment, the pixel gray values are sorted from small to large, and then the local mean W m of the first n items is counted. In practice, gray histograms can be used to achieve this. The value of n is 250, which is more appropriate. Calculated as follows:

式中,f(xi,yj)表示局部区域里坐标(xi,yj)的像素灰度值;In the formula, f(x i , y j ) represents the pixel gray value of the coordinate (x i , y j ) in the local area;

b.熵值Wc:灰度共生矩阵主要反映灰度分布信息,共生矩阵中元素是由分开一定距离的具有相同灰度值的像素点对数目构成的。为减少运算量,本实施例将图像块的灰度等级从0~255压缩至0~15再用一些标量来表征灰度共生矩阵,包括能量、熵、惯性矩和相关性。灰度共生矩阵中熵值Wg能够反映图像的复杂程度,为增加熵值的显著性,可将其四个方向的熵值相加,和为Wc。计算公式如下:b. Entropy value W c : The gray level co-occurrence matrix mainly reflects the gray level distribution information, and the elements in the co-occurrence matrix are composed of the number of pixel point pairs with the same gray value separated by a certain distance. In order to reduce the amount of computation, this embodiment compresses the gray level of the image block from 0-255 to 0-15 and then uses some scalars to represent the gray-level co-occurrence matrix, including energy, entropy, moment of inertia and correlation. The entropy value W g in the gray level co-occurrence matrix can reflect the complexity of the image. In order to increase the significance of the entropy value, the entropy values in the four directions can be added together, and the sum is W c . Calculated as follows:

上式中,k为灰度共生矩阵的边长,将灰度等级压缩至16时,k=16;p(i,j)表示在矩阵内(i,j)处的统计概率,t表示灰度共生矩阵计算熵值的方向。In the above formula, k is the side length of the gray level co-occurrence matrix. When the gray level is compressed to 16, k=16; p(i, j) represents the statistical probability at (i, j) in the matrix, and t represents the gray The degree co-occurrence matrix calculates the direction of the entropy value.

c.方差Wd:为减少磁瓦纹理的影响,本实施例首先将图像块中竖直方向的灰度值相加,形成1×N的矩阵SM(y);为减少因灰度值相加而影响缺陷区域在计算过程中的作用,计算时矩阵各项减去矩阵中的最小值,最后计算矩阵的均方差,计算公式如下:c. Variance W d : In order to reduce the influence of the magnetic tile texture, this embodiment first adds the gray values in the vertical direction in the image block to form a 1×N matrix S M (y); Addition affects the role of the defect area in the calculation process. When calculating, the minimum value in the matrix is subtracted from the matrix items, and finally the mean square error of the matrix is calculated. The calculation formula is as follows:

Wd=Std(SN-min(SN))W d =Std(S N -min(S N ))

SN(x)=[SN(x1),......,SN(xN)]S N (x) = [S N (x 1 ), ..., S N (x N )]

上式中,Std()为求均方差公式,SN(x)为将图像块中竖直方向的灰度值相加形成的1×N的矩阵f(xi,yj)表示坐标为(xi,yj)点的像素灰度值。In the above formula, Std() is the formula for finding the mean square error, and S N (x) is a 1×N matrix f(x i , y j ) formed by adding the gray values in the vertical direction of the image block, indicating that the coordinates are (x i , y j ) pixel gray value.

统计每一行分块后各图像块的均值,熵值和方差。判断有无缺陷块的标准为:有缺陷图像块的Wm值均小于所处行的图像块,Wc和Wd均大于所处行图像块,值得注意的是缺陷图像块Wd值是远大于非缺陷图像块,所以在以Wd为判据应设定一定倍数关系,本实施例取倍数为一行图像块中最大的Wd值大于第二大Wd的3倍。若在一行图像块统计表中有图像块的参数满足以上条件则判断该图像块为缺陷图像块。Count the mean value, entropy value and variance of each image block after each row is divided into blocks. The criterion for judging whether there is a defective block is: the Wm value of the defective image block is smaller than the image block in the row, and the Wc and Wd are larger than the image block in the row. It is worth noting that the Wd value of the defective image block is is much larger than the non-defective image block, so a certain multiple relationship should be set when W d is used as the criterion. In this embodiment, the multiple is taken to be that the largest W d value in a row of image blocks is greater than 3 times the second largest W d . If the parameters of an image block in a row of image block statistics table meet the above conditions, it is judged that the image block is a defective image block.

第三步:由于磁瓦表面纹理较为丰富,直接进行阈值分割难度较大,本实施例采用改进Itti视觉注意机制模型计算步骤二所得缺陷图像块的显著度。从全局显著值和局部显著值角度考虑重新选择初级特征用以形成显著图,对融合后的综合显著图归一化到[0,1],再获得最大注意焦点(即显著值为1的位置)即为缺陷区域,由于缺陷图像块尺寸较小,所以不必考虑其他注意焦点,故可以直接对综合显著图分割。具体过程为:Step 3: Since the surface texture of the magnetic tile is relatively rich, it is difficult to directly perform threshold segmentation. In this embodiment, the improved Itti visual attention mechanism model is used to calculate the saliency of the defect image block obtained in step 2. From the perspective of global saliency value and local saliency value, consider re-selecting the primary features to form a saliency map, normalize the fused comprehensive saliency map to [0, 1], and then obtain the maximum focus of attention (that is, the position with a saliency value of 1 ) is the defect area. Since the block size of the defect image is small, there is no need to consider other focus points, so the integrated saliency map can be directly segmented. The specific process is:

(1)初级特征选择(1) Primary feature selection

a.局部亮度特征:采用局部亮度的均值和方差作为参考,用局部区域中每一个像素的灰度值与该区域的图像块灰度值的均值和方差相减得到差值,并对该差值进行指数函数处理,得到局部亮度显著图Sl(x,y),计算公式如下:a. Local brightness feature: using the mean and variance of the local brightness as a reference, subtract the gray value of each pixel in the local area from the mean and variance of the gray value of the image block in the area to obtain a difference, and calculate the difference Values are processed with an exponential function to obtain a local brightness saliency map S l (x, y), and the calculation formula is as follows:

Ilocal(xi,yj)=f(xi,yj)-(mlocal(x,y)+μ·dlocal(x,y))I local (x i , y j )=f(x i , y j )-(m local (x, y)+μ·d local (x, y))

式中mlocal(x,y)表示局部灰度平均值,dlocal(x,y)表示局部灰度方差,f(xi,yj)表示灰度值,μ为方差控制因子取值范围为0~1。In the formula, m local (x, y) represents the local gray value average, d local (x, y) represents the local gray value variance, f(x i , y j ) represents the gray value, and μ is the value range of the variance control factor It is 0~1.

b.全局亮度特征,在较大缺陷区域中,缺陷区域中部缺乏足够的局部对比度,因此采用全局的平均值作为参考,用每个像素的灰度值与之相减,并对差值进行数值处理,得到全局亮度显著图。全局亮度显著图Sg(x,y)计算公式如下:b. Global brightness feature, in the large defect area, the middle part of the defect area lacks sufficient local contrast, so the global average value is used as a reference, and the gray value of each pixel is subtracted from it, and the difference value is calculated processed to obtain a global brightness saliency map. The calculation formula of the global brightness saliency map S g (x, y) is as follows:

Iglobal(xi,yj)=|f(xi,yj)-mglobal|I global (x i , y j )=|f(x i , y j )-m global |

式中,mglobal为整幅磁瓦图像的灰度平均值,sum(Iglobal(xi,yj))为所有Iglobal(xi,yj)值的和。In the formula, m global is the gray average value of the entire magnetic tile image, and sum(I global ( xi , y j )) is the sum of all I global ( xi , y j ) values.

c.频率特征:由于DoG滤波器在滤除干扰的同时可以增强边缘和其他细节的可见性,所以选用DoG滤波器,计算公式如下:c. Frequency characteristics: Since the DoG filter can enhance the visibility of edges and other details while filtering out interference, the DoG filter is selected, and the calculation formula is as follows:

式中,σ1和σ2是高斯核函数的标准差,它们的比例关系控制滤波器的带宽,当σ1=1.6σ2时,就是边缘检测器,当σ1无穷大时,则将直流分量滤掉,即背景图像滤除。In the formula, σ 1 and σ 2 are the standard deviation of the Gaussian kernel function, and their proportional relationship controls the bandwidth of the filter. When σ 1 = 1.6σ 2 , it is an edge detector. When σ 1 is infinite, the DC component Filter out, that is, the background image is filtered out.

在处理图像数据时,为滤除纹理和其他干扰信息利用一个较小的高斯核窗口,一般采用[1,4,6,4,1]/16。利用DoG滤波器,通过下式获得频率特征显著图:When processing image data, a smaller Gaussian kernel window is used to filter out texture and other interference information, generally [1,4,6,4,1]/16 is used. Using the DoG filter, the frequency feature saliency map is obtained by the following formula:

SG(x,y)=|mglobal-IG(x,y)|S G (x, y)=|m global -I G (x, y)|

式中SG(x,y)为频率特征显著图,IG(x,y)为经DoG滤波后的图像。本实施例中取σ1∶σ2=5∶1,σ1=0.5,σ2=0.1。In the formula, S G (x, y) is the saliency map of frequency features, and I G (x, y) is the image filtered by DoG. In this embodiment, σ 12 =5:1, σ 1 =0.5, σ 2 =0.1.

(2)特征融合:由于局部亮度显著图、全局亮度显著图、频率特征显著图表达特定方向的特性,具有一定的局限性,所以进行融合生成一个综合显著图,用以图像分割。计算公式如下: (2) Feature fusion: Since the local brightness saliency map, the global brightness saliency map, and the frequency feature saliency map have certain limitations in expressing the characteristics of specific directions, a comprehensive saliency map is generated by fusion for image segmentation. Calculated as follows:

第四步:在获得综合显著图后选用大津(Ostu)阈值分割算法对综合显著图进行阈值化,得到综合显著图显著区域和非显著区域(前景和背景),即可实现对原始图像显著区域(缺陷区域)的分割。分割出的显著区域并非完整的对应着原始图像的缺陷区域,可能存在边缘区域和孤立的显著点,但是通过对阈值化图像进行形态学开运算可以消除这些细节。Step 4: After obtaining the comprehensive saliency map, select the Ostu threshold segmentation algorithm to threshold the comprehensive saliency map, and obtain the salient area and non-salient area (foreground and background) of the comprehensive saliency map, which can realize the salient area of the original image (defective region) segmentation. The segmented salient area does not completely correspond to the defect area of the original image, and there may be edge areas and isolated salient points, but these details can be eliminated by performing morphological opening on the thresholded image.

图2中的(a)~(h)是本发明的原始缺陷图,图3中的(a)~(h)是本发明的显著图融合图,从图3可以看出相对于初级特征的显著图,总显著图在抑制纹理信息上有了明显提高。图4中的(a)~(h)是本发明的图像分割效果图,从图4可以看出对综合显著图像分割后,缺陷区域基本得到提取。(a)~(h) in Fig. 2 is the original defect map of the present invention, and (a)~(h) in Fig. 3 is the saliency map fusion map of the present invention, it can be seen from Fig. 3 that relative to primary features The saliency map, the total saliency map has a significant improvement in suppressing texture information. (a)-(h) in Fig. 4 are the image segmentation effect diagrams of the present invention, and it can be seen from Fig. 4 that after the comprehensive salient image is segmented, the defect area is basically extracted.

以上示意性的对本发明及其实施方式进行了描述,该描述没有限制性,附图中所示的也只是本发明的实施方式之一,实际的结构并不局限于此。所以,如果本领域的普通技术人员受其启示,在不脱离本发明创造宗旨的情况下,不经创造性的设计出与该技术方案相似的结构方式及实施例,均应属于本发明的保护范围。The above schematically describes the present invention and its implementation, which is not restrictive, and what is shown in the drawings is only one of the implementations of the present invention, and the actual structure is not limited thereto. Therefore, if a person of ordinary skill in the art is inspired by it, without departing from the inventive concept of the present invention, without creatively designing a structural mode and embodiment similar to the technical solution, it shall all belong to the protection scope of the present 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 (35)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106790898B (en) * 2016-12-08 2019-06-18 华中科技大学 A method and system for automatic detection of mobile phone screen dead pixels based on saliency analysis
CN106600593B (en) * 2016-12-19 2019-08-09 福州大学 A method for detecting surface defects of medium-aluminum ceramic balls
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 北京科技大学 An 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
CN118329910B (en) * 2024-03-15 2025-04-29 广东绿之彩科技股份有限公司 Printing paper defect detection system and method based on machine vision
CN118823407B (en) * 2024-09-18 2024-12-27 吴江市新申铝业科技发展有限公司 Machine vision-based aluminum profile accurate cutting method and system

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
CN103729848A (en) * 2013-12-28 2014-04-16 北京工业大学 Hyperspectral remote sensing image small target detection method based on spectrum saliency
CN103729842A (en) * 2013-12-20 2014-04-16 中原工学院 Fabric defect detection method based on local statistical characteristics and overall significance analysis
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
CN109816644B (en) An automatic detection system for bearing defects based on multi-angle light source images
CN110717455B (en) Method for classifying and detecting grades of scrap steel in storage
Zhang et al. Edge detection algorithm of image fusion based on improved Sobel operator
CN106780486B (en) A method for image extraction of steel plate surface defects
CN107610114B (en) Detection method of cloud, snow and fog in optical satellite remote sensing images based on support vector machine
CN101620060B (en) Automatic detection method of particle size distribution
CN107389701A (en) A kind of PCB visual defects automatic checkout system and method based on image
CN108181316B (en) Bamboo strip defect detection method based on machine vision
CN107203990A (en) A kind of labeling damage testing method based on template matches and image quality measure
CN110349126A (en) A kind of Surface Defects in Steel Plate detection method based on convolutional neural networks tape label
CN109377485A (en) A kind of instant noodles packaging defect machine vision detection method
CN107341790B (en) An image processing method for environmental cleanliness detection
CN108629775A (en) A kind of hot high-speed rod surface image processing method
CN102324099B (en) Step edge detection method oriented to humanoid robot
CN108985170A (en) Transmission line of electricity hanger recognition methods based on Three image difference and deep learning
CN111667475B (en) Machine vision-based Chinese date grading detection method
CN106651831B (en) Bamboo block defect detection method and system
CN113947598B (en) Plastic lunch box defect detection method, device and system based on image processing
CN107437243A (en) Tire method for detecting impurities and device based on x-ray image
CN103778624A (en) Fabric defect detection method based on optical threshold segmentation
CN110070523B (en) A kind of foreign matter detection method for bottle bottom
CN101995412B (en) Robust glass scratch defect detection method and device thereof
CN108389216A (en) Local auto-adaptive threshold segmentation method towards on-line ferrograph image wear Particles Recognition
CN106934801A (en) A kind of fluorescentmagnetic particle(powder) defect inspection method based on Laws texture filterings

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
OL01 Intention to license declared
OL01 Intention to license declared