论文(设计)基于点特征匹配的SUSAN, Harris 算子比较22541.doc
基于点特征匹配的SUSAN、Harris算子比较张春森(西安科技大学 测量工程系 西安 710054)摘 要:目的 研究分析基于点特征的影像匹配中, SUSAN及Harris算子在特征提取和特征匹配两个方面的表现。方法 根据对真实影像特征点提取的数量、分布及匹配有效性等方面的讨论,对上述两种算子在基于点特征匹配中的效果进行分析比较。结果 编程实现SUSAN、Harris算子影像的点特征提取,基于匹配支持度的松弛匹配算法,从而获得研究实验数据。结论 实验表明,两种算子在点特征提取及影像匹配等方面各有其独特的优势,且均具有操作简单、易于实现的特点。关键词:SUSAN算子 Harris算子 点特征提取 影像匹配中图分类号:TP722 文献标识码:A从图像中提取特征点是基于点特征影像匹配的第一步,这里的特征点通常是指灰度变化剧烈的点,包括物体轮廓上的曲率变化最大的点、直线的交点、单调背景上的孤立点等。关于特征点的提取通常采用:(1)从图像中提取边缘,再在边缘组成的链上搜索曲率最大的,或采用通过精确得到组成交(角)点的两条边缘直线,求解边缘直线交点,从而确定交点特征的方法。(2)首先定义某种算子,通过在灰度图像上寻找该算子的极值提取特征点。(3)定义某种点模板,将模板与图像上同样大小的区域相匹配,把位于模板内图像的每个点乘以模板的相应栅格中指示的数据,然后把结果相加,得到最大输出值的点的位置即为特征点坐标的位置。本文讨论方法(2)。需要说明的是本文所论述的点特征提取,主要是用于基于点特征的影像匹配,而不是用于影像分析和数字摄影测量中影像目标的精确定位。1 SUSAN 点特征提取算子SUSAN算法由Smith S M在1997年提出,SUSAN是“Smallest Univalue Segment Assimilating Nucleus”的缩写,即同化核分割最小值。图1圆形掩模图如图1所示,假设有一个圆形的区域,称其为掩模。它的中心有一个核,假设这个核的灰度值与黑色区域的灰度值相近。在整个区域内移动这个掩模,它与黑色区域将有不同的接触情况。不失一般性,在图中表示了其中的四种情况:在掩模所处的区域内,这些点与掩模核的灰度值如果相近的话,就称这些点构成的区域是USAN(Univalue Segment Assimilating Nucleus),即同化核分割相同值区域。根据这一定义可知图1各种情况下,由设定的掩模所确定的USAN如图2所示:图2 USAN标识图图2是图1中相应掩模位置的USAN标识图,图中黑色区域即为USAN,可以看到USAN包含了图像结构的重要信息。掩模核及掩模完全包含在图像(黑色区域)中时,USAN的值最大;掩模核处在图像的一条直线边缘附近时,USAN值接近其最大值的一半;掩模核若在图像的一个角点处,则USAN值接近最大值的四分之一。在一幅图像中搜索图像角点或边缘点,就是搜索USAN最小(小于一定值)的点,即搜索最小化同化核分割相同值。这样可得到特征点检测的SUSAN算法。构造一个(圆形)掩模,遍历图像的每一个点。判断掩模所掩盖的区域内的点与掩模的相似程度,采用以下相似比较函数 (1) 其中,为掩模核在图像中的坐标,为掩模区域其它点的坐标。、分别为点和 的灰度值。阈值决定了两个点相似的最大差异。C为输出的结果。掩模区域的USAN值可以由式(2) 计算出,其中:为USAN中象素个数,它给出了USAN值。将与某固定阈值相比较,得到SUSAN算法对图像角点的响应函数如下式所示: (3) 其中,(为的最大值),恰好是理想边缘的USAN区大小,而对于实际有噪声影响的图像,边缘的USAN区一般都大于。为提高抗噪声干扰能力,在利用USAN值进行阈值比较时,不仅设定一个上限,有时还设定一个下限,下限的设定是为了排除孤立噪声点的干扰,通常情况下取210个像素。同时,利用USAN重心与核心点连线上的象素点的边缘初始值要相近的条件来消除错误的角点。2.Harris点特征算子Harris算子是C.Harris和J.Stephens在1988年提出的一种基于信号的点特征提取算子。这种算子受信号处理中自相关函数的启发,给出与自相关函数相联系的矩阵M。M阵的特征值是自相关函数的一阶曲率,如果两个曲率值都高,则认为该点是点特征。Harris算子的表达式如下: (4) 其中: (5)为x方向的梯度; 为y方向的梯度;为高斯模板;为卷积操作;为每点的兴趣值;Det为矩阵的行列式;Trac为矩阵的迹;k为默任常数。公式解释如下:1)对操作的灰度图像的每个点,计算该点在横向和纵向的一阶导数,以及二者的乘积。这样可以得到三幅新的图像,三幅图像中的每个像素对应的属性值分别为,和。对这三幅图像进行高斯滤波,最后计算原图像上对应的每个点的兴趣值。2) Harris算法认为,特征点是局部范围内的极大兴趣值对应的象素点。因此,在计算完各点的兴趣值后,要提取出原始图像中的所有局部兴趣值最大的点。实际操作中,可以依次取出每个像素的8邻域中的8个像素,从中心像素和这8个像素中提出最大值,如果中心点像素的兴趣值就是最大值,则该点就是特征点。3)在用公式(5)提取特征点时,凡满足大于某一阈值的象素点均可被认为是特征点。阈值依赖于实际图像的属性如尺寸、纹理等,由于不具有直观的物理意义,其具体值难以确定,为此,采取间接确定的方法:即通过确定图像中所能提取的最大可能的特征点数目来选择值最大的若干象素点作为特征点。局部极值点的数目往往很多,根据值进行排序,取其前个为特征点。对特征点进行加权重心化,可使其达到子象素精度。3.实验分析通过某计算机立体视觉系统分别获取模型汽车的单幅影像与立体影像对,在VisualC+6.0平台上编程实现对SUSAN、Harris算子的点特征提取,并采用基于匹配支持度的松弛匹配算法对立体影像对进行匹配比较。对于单幅影像,由于Harris算子点特征提取操作是通过确定图像中所能提取的最大可能的特征点数目来选择值最大的若干象素点作为特征点,因此,当采用Harris算子提取同一目标物影像中的特征点时,可设置不同数目的来观察提取特征点的分布和数量。图3为设置分别为100、200,高斯模板方差为0.7时,提取出的特征点数目分别为61、134。 图3.分别为100,200的特征提取结果(分别提取出61,134个特征点) 从影像可以看出,随着的不同,提取出特征点的数量和分布在相应不断调整。在SUSAN算子特征提取中,包括掩模核与掩模区域中其它点灰度值最大差异的阈值,SUSAN算法对影像特征点响应的阈值,排除影像孤立噪声点干扰的阈值等多组阈值参数。相比之下,采用Harris算子提取影像中的特征点,其阈值参数的选择就要简单的多,只需选择确定影像中所能提取的最大可能的特征点数目,并可以此作为调整特征点分布的参考。 对于立体影像对,分别采用SUSAN、 Harris算子在提取特征点数目基本相同的情况下(25,31),同时利用基于匹配支持度的松弛法匹配算法对进行立体匹配。匹配结果如图4和图5所示。 图4基于SUSAN算子点特征提取匹配结果 图5基于Harris算子点特征提取匹配结果其中采用SUSAN算子提取特征点并进行立体匹配的正确率为80%,而采用Harris算子提取特征点并进行影像匹配的正确率为93.5%。分析发现,匹配采用SUSAN算子提取点特征并进行匹配的错误处,主要位于影像纹理相近处,如图中模型汽车顶部“HATO BUS”字样的角点处。对于影像纹理信息较丰富区域的角点,如模型汽车的车身部分,两种提取方法都能得到较好的匹配。从所提取特征点的分布看,在提取特征点数目基本相同的情况下,SUSAN算子提取的点特征均匀、合理,基本分布在角点明显处。Harris算子提取的特征点虽然也分布均匀,但在部分区域存在特征点冗余的现象(如图中模型汽车顶部“HATO BUS”字样处)。将影像放大比较,SUSAN算子提取的特征点位于边缘内(黑色区域);Harris算子提取的特征点位于边缘外部(浅色区域),更加贴近特征点的最佳位置。从图4、图5还可看出,在纹理信息丰富的区域,SUSAN算子对明显角点提取的能力较强。在纹理相近处,Harris算子提取角点的能力较强。当对原始图像分别人为加入不同程度的平均噪声时,通过实验得出噪声对两种不同算子特征提取与影像匹配的影响结果。Harris算子抗噪声效果噪声强度原始影像10%20%特征点数312511错误点数343正确率93.5%84%83%SUSAN算子抗噪声效果噪声强度原始影像待添加的隐藏文字内容310%20%特征点数252230错误点数5718正确率80%68%40%从图表可以看出,随着噪声的逐渐增大,采用Harris算子特征点提取并进行影像匹配的抗噪声能力较SUSAN算子强。这与Gouet V 2000 等证明:既使存在有图像的旋转,灰度的变化,噪声影响和视点的变化等情况,Harris算子也是最稳定的一种点特征提取算子的结论相一致。此外Harris算子还具有对光照条件等情况不敏感的特性。当对大小为2400×1600象元的航空影像分别采用上述两种算子进行点特征提取时,整幅影像中SUSAN算子有些房屋角点未能提取出,而Harris算子提出了几乎所有角点特征。但SUSAN算子提取所用时间较Harris算子少近10倍。4.结论Harris算子是计算机视觉界使用较为广泛的一种点特征提取算子,SUSAN算子是国际上新近推出并已得到广泛应用的保持结构算子。与传统点特征算子比较,前者具有简单、稳定、易于实现的特点。由上述点特征提取与随后的立体影像匹配结果分析可得出:利用Harris算子不需设置阈值,整个过程的自动化程度高,可以根据匹配结果,定量调整提取的特征点数。同时它抗干扰强、精度高。SUSAN算子提取特征点分布合理,较适合提取图像边缘上的拐点,由于它不需对图像求导数,所以也有较强的抗噪声能力,利用SUSAN算法提取图像拐点,阈值的选取是关键。它没有自适应算法,也不象Harris算法可根据需要提出一定数目的特征点。但该算法编程容易,易于硬件实现。为克服影像灰度值分布不均对提取SUSAN算子角点的影响,可对影像采取二值化(或多值化)分割,以进一步改进提取效果。参考文献1 Smith S M, Brady J M.SUSAN-A New Approach to Low Level Image ProcessingJ. Journal of Vision,1997,23(1):45782 Harris C G, Stephens M J.A Combined Corner and Edge DetectorC. The 4th Alvey Vision Conference, Manchester, 1988.3张祖勋,张剑清.数字摄影测量M.武汉:武汉测绘科技大学出版社,1996.4谢东海,詹总谦,江万寿.改进Harris算子用于点特征的精确定位J.测绘信息与工程,2003,28(2):22235 Gouet V,Montesinos P,Deriche R,et al.Evaluation de Detecteurs Depoints Dint Eret Pourla CouleurC.Reconnaissance des Formes et Intelligence Artificielle,Paris,2000Editor's note: Judson Jones is a meteorologist, journalist and photographer. He has freelanced with CNN for four years, covering severe weather from tornadoes to typhoons. Follow him on Twitter: jnjonesjr (CNN) - I will always wonder what it was like to huddle around a shortwave radio and through the crackling static from space hear the faint beeps of the world's first satellite - Sputnik. I also missed watching Neil Armstrong step foot on the moon and the first space shuttle take off for the stars. Those events were way before my time.As a kid, I was fascinated with what goes on in the sky, and when NASA pulled the plug on the shuttle program I was heartbroken. Yet the privatized space race has renewed my childhood dreams to reach for the stars.As a meteorologist, I've still seen many important weather and space events, but right now, if you were sitting next to me, you'd hear my foot tapping rapidly under my desk. I'm anxious for the next one: a space capsule hanging from a crane in the New Mexico desert.It's like the set for a George Lucas movie floating to the edge of space.You and I will have the chance to watch a man take a leap into an unimaginable free fall from the edge of space - live.The (lack of) air up there Watch man jump from 96,000 feet Tuesday, I sat at work glued to the live stream of the Red Bull Stratos Mission. I watched the balloons positioned at different altitudes in the sky to test the winds, knowing that if they would just line up in a vertical straight line "we" would be go for launch.I feel this mission was created for me because I am also a journalist and a photographer, but above all I live for taking a leap of faith - the feeling of pushing the envelope into uncharted territory.The guy who is going to do this, Felix Baumgartner, must have that same feeling, at a level I will never reach. However, it did not stop me from feeling his pain when a gust of swirling wind kicked up and twisted the partially filled balloon that would take him to the upper end of our atmosphere. As soon as the 40-acre balloon, with skin no thicker than a dry cleaning bag, scraped the ground I knew it was over.How claustrophobia almost grounded supersonic skydiverWith each twist, you could see the wrinkles of disappointment on the face of the current record holder and "capcom" (capsule communications), Col. Joe Kittinger. He hung his head low in mission control as he told Baumgartner the disappointing news: Mission aborted.The supersonic descent could happen as early as Sunday.The weather plays an important role in this mission. Starting at the ground, conditions have to be very calm - winds less than 2 mph, with no precipitation or humidity and limited cloud cover. The balloon, with capsule attached, will move through the lower level of the atmosphere (the troposphere) where our day-to-day weather lives. It will climb higher than the tip of Mount Everest (5.5 miles/8.85 kilometers), drifting even higher than the cruising altitude of commercial airliners (5.6 miles/9.17 kilometers) and into the stratosphere. As he crosses the boundary layer (called the tropopause), he can expect a lot of turbulence.The balloon will slowly drift to the edge of space at 120,000 feet (22.7 miles/36.53 kilometers). Here, "Fearless Felix" will unclip. He will roll back the door.Then, I would assume, he will slowly step out onto something resembling an Olympic diving platform.Below, the Earth becomes the concrete bottom of a swimming pool that he wants to land on, but not too hard. Still, he'll be traveling fast, so despite the distance, it will not be like diving into the deep end of a pool. It will be like he is diving into the shallow end.Skydiver preps for the big jumpWhen he jumps, he is expected to reach the speed of sound - 690 mph (1,110 kph) - in less than 40 seconds. Like hitting the top of the water, he will begin to slow as he approaches the more dense air closer to Earth. But this will not be enough to stop him completely.If he goes too fast or spins out of control, he has a stabilization parachute that can be deployed to slow him down. His team hopes it's not needed. Instead, he plans to deploy his 270-square-foot (25-square-meter) main chute at an altitude of around 5,000 feet (1,524 meters).In order to deploy this chute successfully, he will have to slow to 172 mph (277 kph). He will have a reserve parachute that will open automatically if he loses consciousness at mach speeds.Even if everything goes as planned, it won't. Baumgartner still will free fall at a speed that would cause you and me to pass out, and no parachute is guaranteed to work higher than 25,000 feet (7,620 meters).It might not be the moon, but Kittinger free fell from 102,800 feet in 1960 - at the dawn of an infamous space race that captured the hearts of many. Baumgartner will attempt to break that record, a feat that boggles the mind. This is one of those monumental moments I will always remember, because there is no way I'd miss this.