CN102779342A - Edge detection method for voice coil motor magnet - Google Patents
Edge detection method for voice coil motor magnet Download PDFInfo
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 12
- 238000003708 edge detection Methods 0.000 title claims abstract description 9
- 238000005260 corrosion Methods 0.000 claims description 2
- 230000007797 corrosion Effects 0.000 claims description 2
- 238000004364 calculation method Methods 0.000 abstract description 3
- 230000010339 dilation Effects 0.000 abstract description 2
- 238000001514 detection method Methods 0.000 description 4
- 239000000284 extract Substances 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001629 suppression Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 230000003628 erosive effect Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000010191 image analysis Methods 0.000 description 1
- 230000000877 morphologic effect Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 238000007781 pre-processing Methods 0.000 description 1
- 238000007670 refining Methods 0.000 description 1
- 239000013589 supplement Substances 0.000 description 1
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
技术领域 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进行先膨胀后腐蚀的数学形态学运算,即闭合运算
3)采用二维高斯函数
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)
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)
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)
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 |
-
2012
- 2012-06-15 CN CN2012102010189A patent/CN102779342A/en active Pending
Patent Citations (3)
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)
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)
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 |