图像局部描述符

本文介绍了图像局部描述符,重点讲解了Harris角点检测算法及其在图像间寻找对应点的应用。同时提到了SIFT描述子的重要性和其在描述子匹配过程中的作用,展示了地理标记图像匹配的结果。
摘要由CSDN通过智能技术生成

Harris角点检测

Harris角点检测算法是最简单的角点检测方法之一。


from pylab import *
from PIL import Image
from PCV.localdescriptors import harris


#读入图像
im = array(Image.open('C:/Users/Administrator/35.jpg').convert('L'))

#检测harris角点
harrisim = harris.compute_harris_response(im)

#Harris响应函数
harrisim1 = 255 - harrisim

figure()
gray()

#画出Harris响应图
subplot(141)
imshow(harrisim1)
print harrisim1.shape
axis('off')
axis('equal')

threshold = [0.01, 0.05, 0.1]
for i, thres in enumerate(threshold):
   filtered_coords = harris.get_harris_points(harrisim, 6, thres)
   subplot(1, 4, i+2)
   imshow(im)
   print im.shape
   plot([p[1] for p in filtered_coords], [p[0] for p in filtered_coords], '*')
   axis('off')

#原书采用的PCV中PCV harris模块
#harris.plot_harris_points(im, filtered_coords)

#plot only 200 strongest
#harris.plot_harris_points(im, filtered_coords[:200])

show()

原图
在这里插入图片描述

得到图片
在这里插入图片描述

在图像间寻找对应点

Harris角点检测器可以给出图像中检测到兴趣点,但它并没有提供在图像间对兴趣点进行比较的方法,我们需要在每个角点添加描述子,以及对这些描述子进行比较。

from pylab import *
from PIL import Image
 
from PCV.localdescriptors import harris
from PCV.tools.imtools import imresize
 
"""
This is the Harris point matching example in Figure 2-2.
"""
 

im1 = array(Image.open("C:/Users/Administrator/36.jpg").convert
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值