计算机视觉相关材料

Harris特征角点检测

2013年01月09日 ⁄ 综合⁄ 共 63字 ⁄ 字号 小 中 大 ⁄ 评论关闭

 
 
 
 
 
 
 
 
 
 
 
 
rotation invariance,not scale invariance
怎么用描述符表达一个特征点?





距离变换

分类: Image & Video Processing    400人阅读  评论(1)  收藏  举报

距离变换和线性滤波器,形态学变换处于平等位置,是图像处理的一种方法,通过使用两遍扫描光栅算法可以快速计算到曲线或点集的距离。


应用:

水平集

快速斜切匹配

图像拼接

图像混合的羽化

临近点配准


方法:

首先对图像进行二值化处理,然后给每个像素赋值为离它最近的背景像素点与其距离(Manhattan距离or欧氏距离),得到distance metric(距离矩阵),那么离边界越远的点越亮。



实现:

  1. Imgori=imread('test.jpg');
  2. I=rgb2gray(Imgori);
  3. subplot(2,3,1);imshow(I);title('origin');
  4. Threshold=100;
  5. F=I>Threshold;%front
  6. %B=I<=Threshold;%background
  7. subplot(2,3,4);imshow(F,[]);title('binary');
  8. T=bwdist(F,'chessboard');
  9. subplot(2,3,2);imshow(T,[]);title('chessboard distance transform')
  10. %the chessboard distance between (x1,y1) and (x2,y2) is max(│x1 – x2│,│y1 – y2│).
  11. T=bwdist(F,'cityblock');
  12. subplot(2,3,3);imshow(T,[]);title('chessboard distance transform')
  13. %the cityblock distance between (x1,y1) and (x2,y2) is │x1 – x2│ + │y1 – y2│.
  14. T=bwdist(F,'euclidean');
  15. subplot(2,3,5);imshow(T,[]);title('euclidean distance transform')
  16. %use Euclidean distance
  17. T=bwdist(F,'quasi-euclidean');
  18. subplot(2,3,6);imshow(T,[]);title('quasi-euclidean distance transform')
  19. %use quasi-Euclidean distance

或者单纯想看这几个距离函数的区别可以用以下code:

  1. bw = zeros(200,200); bw(50,50) = 1; bw(50,150) = 1;
  2. bw(150,100) = 1;
  3. D1 = bwdist(bw,'euclidean');
  4. D2 = bwdist(bw,'cityblock');
  5. D3 = bwdist(bw,'chessboard');
  6. D4 = bwdist(bw,'quasi-euclidean');
  7. figure
  8. subplot(2,2,1), subimage(mat2gray(D1)), title('Euclidean')
  9. hold on, imcontour(D1)
  10. subplot(2,2,2), subimage(mat2gray(D2)), title('City block')
  11. hold on, imcontour(D2)
  12. subplot(2,2,3), subimage(mat2gray(D3)), title('Chessboard')
  13. hold on, imcontour(D3)
  14. subplot(2,2,4), subimage(mat2gray(D4)), title('Quasi-Euclidean')
  15. hold on, imcontour(D4)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值