harris_test_for_image.m

来自「用matlab实现Harris Corner Detector的算法」· M 代码 · 共 29 行

M
29
字号
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% This file gives u the feature points for
% Harris feature Point detector
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Make sure that ur current folder has three files
% 1) Harris.m
% 2) Harris_image.jpg
% 3) harris_test_for_image.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Simply execute this M file and watch the feature 
% points for the provided image
% Regards
% Kashif Shahzad
% Pakistan
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

snap=imread('Harris_image.jpg');
% Parameters for Cornet Detector
sigma=2;
thresh=700;
radius=5;
disp=0;

[crnr rws cols]=harris(snap,sigma,thresh,radius,disp);
imshow(snap);
hold on;
p=[cols rws];
plot(p(:,1),p(:,2),'or');
title('\bf\it Harris Corners')

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?