zcross.m
来自「来自澳大利亚Qeensland大学的计算机视觉Matlab工具箱。 This 」· M 代码 · 共 32 行
M
32 行
%ZCROSS Zero-crossing detector%% IZ = ZCROSS(image)%% Crude zero-crossing detector. Returns a binary image in which set (1)% pixels correspond to negative input pixels adjacent to a transition to% transition to a non-negative value.%% SEE ALSO: ilog%% Copyright (c) Peter Corke, 1999 Machine Vision Toolbox for Matlab% 1997 Peter Corkefunction iz = zcross(im) w = numcols(im); h = numrows(im); % horizontal transitions ineg = im(:,1:w-1) < 0; ipos = im(:,2:w) >= 0; iz = [ineg&ipos zeros(h,1)]; % vertical transitions ineg = im(1:w-1,:) < 0; ipos = im(2:w,:) >= 0; % return if either happened at this pixel iz = iz | [ineg&ipos; zeros(1,w)];
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?