赞
踩
10行代码实现检测图像中角点
代码如下:
- clc;
- clear;
- close all;
-
- % 导入图像
- [FileName,PathName,FilterIndex]= uigetfile({'*.png;*.jpg;*.bmp';'*.*'});
- filename = fullfile(PathName,FileName);
- img = imread(filename);
- I = rgb2gray(img);
-
- % 采用Harris算法
- corners = detectHarrisFeatures(I,'MinQuality',0.9);
-
- % 采用MinEigen算法
- % corners = detectMinEigenFeatures(I)
-
-
- imshow(I);hold on;
- plot(corners.selectStrongest(50));
角点检测结果:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。