📄 findsp.m
字号:
function SP_POINTS=FindSP(img);
%function SP_POINTS=FindSP(img);
% detects significant points using our new method
% SP_POINTS=FindSP(img)
%
% SP_POINTS: 0-1-array which indicates the found (important) points (1)
% RESULT: original image overlayed with the important points
% img: the image to be processed
% other parameters defined through inout window:
% nsp: number of important points
% M: half size of square to fit locally
% r: size of square for changes, may be any
% s: the minimu allowed distance between SP candidate and straight line
% da: determines the interval, where the angle between SP candidate's edges has to be from
% ds: maximum allowed curvature divergence for straight line candidates
% sps: boolean matrix as X where points are
% t: the minimum allowed distance between two significant points
% Copyright Zitova B., Kautsky J., Peters G., Flusser J.
% UTIA, 1998
prompt={'Number of SPS points:','MEAN computation size:','SIGN change size:','Distance to STRAIGHT lines:','ANGLE difference allowance:','STRAIGHTNESS allowance:','MIN distance between SPS points:'};
def={'30','2','4','1','7','3','12'};
title='Corner detection';
lineNo=1;
answer=inputdlg(prompt,title,lineNo,def);
nsp=str2num(answer{1});
M=str2num(answer{2});
r=str2num(answer{3});
s=str2num(answer{4});
da=str2num(answer{5});
ds=str2num(answer{6});
t=str2num(answer{7});
[HGF,C,HM,ANG,POS1,POS2]=sigptst1(img,1,M,1,r);
[SP_POINTS,RESULT]=shsigpts(img,1,nsp,HGF,C,HM,ANG,M,r,s,da,ds,t);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -