CN102779342A - Edge detection method for voice coil motor magnet - Google Patents

Edge detection method for voice coil motor magnet Download PDF

Info

Publication number
CN102779342A
CN102779342A CN2012102010189A CN201210201018A CN102779342A CN 102779342 A CN102779342 A CN 102779342A CN 2012102010189 A CN2012102010189 A CN 2012102010189A CN 201210201018 A CN201210201018 A CN 201210201018A CN 102779342 A CN102779342 A CN 102779342A
Authority
CN
China
Prior art keywords
image
edge
magnet
voice coil
coil motor
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.)
Pending
Application number
CN2012102010189A
Other languages
Chinese (zh)
Inventor
潘丰
杨莉
张相胜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangnan University
Original Assignee
Jiangnan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jiangnan University filed Critical Jiangnan University
Priority to CN2012102010189A priority Critical patent/CN102779342A/en
Publication of CN102779342A publication Critical patent/CN102779342A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本发明提供一种基于数学形态学和canny算子的音圈马达(Voice Coil Motor简称VCM)磁体边缘检测方法,属于计算机图像识别领域。其基本步骤为(1)输入VCM图像进行去除背景及二值化处理,得到磁体的二值图像;(2)对二值图像进行先腐蚀后膨胀运算;然后再进行先膨胀后腐蚀运算;(3)采用高斯滤波器对步骤(2)得到的图像进行平滑处理;(4)进行梯度计算,得到每个像素点的梯度值;(5)对每个像素点和梯度值进行非极大值抑制,得到初步边缘点;(6)对步骤(5)得到的初步边缘点进行双阈值计算,得到完整的边缘。采用本发明方法能稳定高效地检测出VCM磁体的边缘。

The invention provides a voice coil motor (Voice Coil Motor for short VCM) magnet edge detection method based on mathematical morphology and a canny operator, which belongs to the field of computer image recognition. The basic steps are (1) input the VCM image for background removal and binarization processing to obtain the binary image of the magnet; (2) first corrode and then dilate the binary image; and then perform dilation and then corrode; ( 3) adopt Gaussian filter to carry out smooth processing to the image that step (2) obtains; (4) carry out gradient calculation, obtain the gradient value of each pixel point; (5) carry out non-maximum value to each pixel point and gradient value Suppress to obtain preliminary edge points; (6) Perform double-threshold calculation on the preliminary edge points obtained in step (5) to obtain a complete edge. The edge of the VCM magnet can be detected stably and efficiently by adopting the method of the invention.

Description

一种音圈马达磁体边缘检测方法A method for detecting the edge of a voice coil motor magnet

技术领域 technical field

本发明涉及一种基于数学形态学和canny算子的音圈马达磁体边缘检测方法,属于计算机图像识别领域,适用于音圈马达磁体的边缘提取。The invention relates to a method for detecting the edge of a voice coil motor magnet based on mathematical morphology and a canny operator, which belongs to the field of computer image recognition and is suitable for edge extraction of a voice coil motor magnet.

背景技术 Background technique

音圈马达(Voice Coil Motor简称VCM)是硬盘中不可缺少的零件,它上面的磁体会形成磁场,利用这个磁场来驱动硬盘里的读写臂,所以VCM磁体的边缘信息是保证硬盘质量的重要因素之一。然而在实际检测中,因为VCM形状较为复杂,采集磁体边缘信息时往往会出现虚假边缘,造成磁体边缘定位不准确。Voice Coil Motor (VCM for short) is an indispensable part of the hard disk. The magnet on it will form a magnetic field, which is used to drive the read-write arm in the hard disk. Therefore, the edge information of the VCM magnet is important to ensure the quality of the hard disk. one of the factors. However, in actual detection, because the VCM shape is relatively complex, false edges often appear when collecting magnet edge information, resulting in inaccurate magnet edge positioning.

数学形态学以几何学为基础对图像进行分析,将结构元素应用于输入图像,从而得到与输入图像同等大小的输出图像,其基本思想是用具有一定形态的结构元素来探测和提取图像特征以达到对图像分析和识别的目的。膨胀、腐蚀、开启和闭合是数学形态学中基本的运算。Mathematical morphology analyzes images based on geometry, and applies structural elements to the input image to obtain an output image of the same size as the input image. The basic idea is to use structural elements with a certain shape to detect and extract image features to To achieve the purpose of image analysis and recognition. Dilation, erosion, opening and closing are basic operations in mathematical morphology.

Canny算子是一个具有滤波、增强和检测的多阶段的优化算子。Canny给出评价边缘检测性能的3个指标:Canny operator is a multi-stage optimization operator with filtering, enhancement and detection. Canny gives three indicators for evaluating edge detection performance:

1)高信噪比准则,即非边缘点被误判为边缘点或者边缘点被误判为非边缘点的概率要低,使输出的信噪比达到最大;1) High signal-to-noise ratio criterion, that is, the probability of non-edge points being misjudged as edge points or edge points being misjudged as non-edge points is low, so that the output signal-to-noise ratio reaches the maximum;

2)高定位精度准则,即检测出的图像边缘点要尽可能在实际图像边缘的中心;2) High positioning accuracy criterion, that is, the detected image edge point should be as close as possible to the center of the actual image edge;

3)单一边缘响应准则,即要保证单个边缘只有一个像素相应,并且使虚假边缘的响应在最大程度上得到抑制。3) Single edge response criterion, that is, to ensure that only one pixel corresponds to a single edge, and to suppress the response of false edges to the greatest extent.

发明内容 Contents of the invention

针对上述问题,本发明的目的在于提供一种基于数学形态学和canny算子的VCM磁体边缘检测方法,其能够实时稳定高效地检测VCM磁体的边缘。In view of the above problems, the object of the present invention is to provide a VCM magnet edge detection method based on mathematical morphology and canny operator, which can detect the edge of the VCM magnet stably and efficiently in real time.

基于数学形态学和canny算子的VCM磁体边缘检测方法,包括以下步骤:The VCM magnet edge detection method based on mathematical morphology and canny operator comprises the following steps:

步骤1),输入VCM的TIFF图像进行去除背景及二值化处理,得到磁体的二值图像;Step 1), input the TIFF image of VCM to remove the background and binarize to obtain the binary image of the magnet;

步骤2),对二值图像运用半径为15的圆盘型结构元素进行先腐蚀后膨胀的数学形态学运算,即开启运算;然后再运用半径为8的钻石型结构元素进行先膨胀后腐蚀运算,即闭合运算;Step 2), using a disc-shaped structural element with a radius of 15 to perform a mathematical morphological operation of first corroding and then expanding on the binary image, that is, opening the operation; and then using a diamond-shaped structural element with a radius of 8 to perform the operation of first expanding and then corroding , that is, the closing operation;

步骤3),采用高斯滤波器对步骤2)得到的图像进行平滑处理,过滤图像噪声;Step 3), using a Gaussian filter to smooth the image obtained in step 2), and filter the image noise;

步骤4),采用canny算子进行梯度计算,得到图像中每个像素点的梯度值;Step 4), using the canny operator to calculate the gradient, to obtain the gradient value of each pixel in the image;

步骤5),采用步骤4)得到的图像中每个像素点的梯度值,对每个像素点和梯度值进行非极大值抑制,得到初步的图像边缘点;Step 5), using the gradient value of each pixel in the image obtained in step 4), carrying out non-maximum suppression to each pixel and gradient value, to obtain preliminary image edge points;

步骤6),对步骤5)得到的初步边缘点进行双阈值计算,进一步精化边缘点,剔除假边缘点和补全边缘缺口,得到完整的边缘。Step 6), performing double threshold calculation on the preliminary edge points obtained in step 5), further refining the edge points, eliminating false edge points and filling in edge gaps to obtain a complete edge.

本发明采用上述技术方案,利用数学形态学算法对VCM图像进行预处理以及图像特征提取可以有效的去除干扰并保留图像的细节信息,将处理后的图像运用canny算子进行边缘检测可以得到清晰的VCM磁体形状边缘。The present invention adopts the above-mentioned technical scheme, uses the mathematical morphology algorithm to preprocess the VCM image and extracts the image features, which can effectively remove the interference and retain the detailed information of the image, and use the canny operator to perform edge detection on the processed image to obtain a clear image. VCM magnet shape edge.

附图说明 Description of drawings

图1为基于数学形态学和canny算子的VCM磁体边缘检测方法的流程图。Fig. 1 is a flow chart of the VCM magnet edge detection method based on mathematical morphology and canny operator.

图2为采集的VCM原始图。Figure 2 is the original image of the collected VCM.

图3为数学形态学预处理后的结果示意图。Figure 3 is a schematic diagram of the results after mathematical morphology preprocessing.

图4为磁体边缘检测结果示意图。Fig. 4 is a schematic diagram of the detection result of the edge of the magnet.

具体实施方式 Detailed ways

下面结合附图对本发明的具体实施方式做进一步说明。The specific embodiments of the present invention will be further described below in conjunction with the accompanying drawings.

1)输入需要检测的VCM图片,做去除背景处理,提取感兴趣的磁体部分,做二值化处理,得到磁体的二值图像X。1) Input the VCM picture to be detected, perform background removal processing, extract the magnet part of interest, and perform binarization processing to obtain the binary image X of the magnet.

2)选取结构元素S1和S2,其中S1为半径为15的圆盘型结构,S2为半径为8的钻石型结构。运用S1对X进行先腐蚀后膨胀的数学形态学运算,即开启运算得到X1,然后再运用S2进行先膨胀后腐蚀的数学形态学运算,即闭合运算 X 1 · S 2 = ( X 1 ⊕ S 2 ) Θ S 2 , 得到X22) Structural elements S 1 and S 2 are selected, wherein S 1 is a disc-shaped structure with a radius of 15, and S 2 is a diamond-shaped structure with a radius of 8. Use S 1 to perform a mathematical morphology operation on X that first erodes and then expands, that is, the opening operation Get X 1 , and then use S 2 to perform the mathematical morphology operation of first expansion and then corrosion, that is, the closing operation x 1 &Center Dot; S 2 = ( x 1 ⊕ S 2 ) Θ S 2 , Get X 2 .

3)采用二维高斯函数 G ( x , y ) = 1 2 πσ 2 e ( - ( x 2 + y 2 ) 2 σ 2 ) 求得一阶导数 ∂ G ∂ x = - x 2 πσ 4 e ( - x 2 + y 2 2 σ 2 ) ,

Figure BSA00000735819400025
与X2进行卷积运算得到
Figure BSA00000735819400026
Figure BSA00000735819400027
计算得到图像中每个像素点的梯度值 A ( i , j ) = E x 2 ( i , j ) + E y 2 ( i , j ) . 3) Using a two-dimensional Gaussian function G ( x , the y ) = 1 2 πσ 2 e ( - ( x 2 + the y 2 ) 2 σ 2 ) Find the first derivative ∂ G ∂ x = - x 2 πσ 4 e ( - x 2 + the y 2 2 σ 2 ) ,
Figure BSA00000735819400025
Convolved with X 2 to get
Figure BSA00000735819400026
and
Figure BSA00000735819400027
Calculate the gradient value of each pixel in the image A ( i , j ) = E. x 2 ( i , j ) + E. the y 2 ( i , j ) .

4)对每个像素点和梯度值进行非极大值抑制即细化梯度幅值图像的屋脊带,只保留幅值局部变化最大的点,若像素点(i,j)的边缘强度A(i,j)不小于梯度方向上两个相邻像素点的梯度幅值,则判断该点为可能的边缘点。4) Perform non-maximum suppression on each pixel point and gradient value, that is, refine the roof band of the gradient magnitude image, and only keep the point with the largest local variation in magnitude. If the edge strength A( i, j) is not less than the gradient magnitude of two adjacent pixel points in the gradient direction, then this point is judged as a possible edge point.

5)设定两个阈值τ1和τ2,对非极大值抑制图像进行双阈值化,可得到两个检测结果,分别是以低阈值τ1分割得到的图像T1和以高阈值τ2分割得到的图像T2。以图像T2为基础连接边缘轮廓,连接到端点时,以图像T1为补充进行边缘连接获得最终的边缘检测效果图。5) Set two thresholds τ 1 and τ 2 , double-threshold the non-maximum suppressed image, and get two detection results, which are the image T 1 segmented by the low threshold τ 1 and the image T 1 segmented by the high threshold τ 2 Segment the resulting image T 2 . Based on the image T 2 to connect the edge contours, when connecting to the endpoint, use the image T 1 as a supplement to perform edge connection to obtain the final edge detection effect map.

以上是本发明的较佳实施例而已,并非对本发明作任何形式上的限制,凡是依据本发明的技术实质对以上实施例所做的任何简单修改、等同变化与修饰,均属于发明技术方案的范围内。The above are only preferred embodiments of the present invention, and are not intended to limit the present invention in any form. All simple modifications, equivalent changes and modifications made to the above embodiments according to the technical essence of the present invention belong to the technical solution of the invention. within range.

Claims (2)

1.一种音圈马达磁体边缘检测方法,其特征在于:先采用数学形态学对音圈马达磁体图像进行处理,再运用canny算子检测出清晰的磁体边缘形状。1. A voice coil motor magnet edge detection method is characterized in that: first adopt mathematical morphology to process the voice coil motor magnet image, and then use the canny operator to detect the clear magnet edge shape. 2.根据权利1要求所述的音圈马达磁体边缘检测方法,其特征在于:所采用的数学形态学对图像进行处理是对二值图像运用半径为15的圆盘型结构元素进行先腐蚀后膨胀的数学形态学运算,即开启运算;然后再运用半径为8的钻石型结构元素进行先膨胀后腐蚀运算,即闭合运算。2. The method for detecting the edge of a voice coil motor magnet according to claim 1, characterized in that: the mathematical morphology used to process the image is to use a disc-shaped structural element with a radius of 15 for the binary image to corrode first and then The mathematical morphology operation of expansion is the opening operation; and then the diamond-shaped structural element with a radius of 8 is used to perform the first expansion and then corrosion operation, that is, the closing operation.
CN2012102010189A 2012-06-15 2012-06-15 Edge detection method for voice coil motor magnet Pending CN102779342A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012102010189A CN102779342A (en) 2012-06-15 2012-06-15 Edge detection method for voice coil motor magnet

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012102010189A CN102779342A (en) 2012-06-15 2012-06-15 Edge detection method for voice coil motor magnet

Publications (1)

Publication Number Publication Date
CN102779342A true CN102779342A (en) 2012-11-14

Family

ID=47124251

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012102010189A Pending CN102779342A (en) 2012-06-15 2012-06-15 Edge detection method for voice coil motor magnet

Country Status (1)

Country Link
CN (1) CN102779342A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104407746A (en) * 2014-12-01 2015-03-11 湖北印象光电信息产业有限公司 Infrared photoelectric technology based multi-point touch system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040126013A1 (en) * 2002-12-30 2004-07-01 Teresa Olson Morphological based segmenter
CN101794372A (en) * 2009-11-30 2010-08-04 南京大学 Method for representing and recognizing gait characteristics based on frequency domain analysis
CN102289824A (en) * 2011-07-06 2011-12-21 湖南大学 Method for positioning plane centroid of pipe orifice image of condenser

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040126013A1 (en) * 2002-12-30 2004-07-01 Teresa Olson Morphological based segmenter
CN101794372A (en) * 2009-11-30 2010-08-04 南京大学 Method for representing and recognizing gait characteristics based on frequency domain analysis
CN102289824A (en) * 2011-07-06 2011-12-21 湖南大学 Method for positioning plane centroid of pipe orifice image of condenser

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ZHAO YU-QIAN ET AL.: "Medical Images Edge Detection Based on Mathematical Morphology", 《PROCEEDINGS OF THE 2005 IEEE ENGINEERING IN MEDICINE AND BIOLOGY 27TH ANNUAL CONFERENCE》 *
欧先锋等: "多结构抗噪膨胀-腐蚀型数字灰度图像边缘检测的研究", 《激光杂志》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104407746A (en) * 2014-12-01 2015-03-11 湖北印象光电信息产业有限公司 Infrared photoelectric technology based multi-point touch system

Similar Documents

Publication Publication Date Title
CN107808378B (en) Detection method for latent defects of complex structural castings based on vertical vertical and horizontal line profile features
CN108460764B (en) Ultrasonic image intelligent segmentation method based on automatic context and data enhancement
CN102693423B (en) One pinpoint method of car plate under intense light conditions
CN102509290B (en) Saliency-based synthetic aperture radar (SAR) image airfield runway edge detection method
CN102034239B (en) Local gray abrupt change-based infrared small target detection method
CN114399522A (en) High-low threshold-based Canny operator edge detection method
CN104268872A (en) Consistency-based edge detection method
CN106446952A (en) Method and apparatus for recognizing score image
CN104318556B (en) Silicon steel plate surface defect image detection method under oil pollution interference
CN103455813A (en) Method for facula center positioning of CCD image measurement system
CN105261015A (en) Automatic eyeground image blood vessel segmentation method based on Gabor filters
CN106778754A (en) A kind of industrial ammeter digit recognition method of robust
CN105894474A (en) Non-linear image enhancement method, and edge detection method using the same
CN112528868A (en) Illegal line pressing judgment method based on improved Canny edge detection algorithm
CN107133952A (en) A kind of alligatoring recognition methods for merging time-frequency characteristics
CN102129694A (en) Method for detecting salient region of image
CN105225244A (en) Based on the noise detection method that minimum local mean square deviation calculates
CN105447489A (en) Character and background adhesion noise elimination method for image OCR system
CN102737230B (en) Non-local mean filtering method based on direction field estimation
CN114022418A (en) A lithium battery pole piece defect detection method and system
CN104732530A (en) Image edge detection method
CN106447686A (en) Method for detecting image edges based on fast finite shearlet transformation
CN104598906B (en) Vehicle outline detection method and its device
CN108776778A (en) A kind of sea horizon detection method based on mathematical morphology
CN106404893A (en) Automatic axial magnetic flux leakage defect signal detection method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20121114