⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 whscarp.m

📁 图像对齐(inage registration)工具箱
💻 M
字号:
function [HM,ANG,POSI]=whscarp(ST,fil)
% WHSCARP - computes what sign changes around points (one row of pixels)
%               [HM,ANG,POSI]=whscarp(ST,fil)
%
% ST: columns contain perimeter functions, last row=first
% fil: 1D filter to smooth the columns
% HM: number of sign changes in each column
% ANG: for two changes, distance (sharp angle) between them
% POSI: actual positions of sign changes
%
% Copyright Zitova B., Kautsky J., Peters G., Flusser J.
% UTIA, 1998

if nargin<2, fil=1; end

if length(fil) > 1
%    do the filtering here
end

[le,n]=size(ST);
le=le-1;             % no. of steps around "circle"
STsi = ST>=0 ;
STch = (STsi(1:le,:) ~= STsi(2:le+1,:));
HM = sum(STch);
ANG=zeros(1,n);
POSI=zeros(2,n);
for j=1:n
   if HM(j)==2
      tt=find(STch(:,j));
      ttt=tt(2)-tt(1);
      ANG(j)=min(ttt,le-ttt);
      POSI(:,j)=tt;
   end
end

⌨️ 快捷键说明

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