dorosinthreshold.m
来自「neural network with pscad code」· M 代码 · 共 27 行
M
27 行
function [im2,T] = dorosinthreshold(difim, nbins, mask, usezeros)
if (nargin < 2)
nbins = 256;
end
if (nargin < 3)
mask=1;
end
if (nargin < 4)
usezeros=1;
end
data = removezeros(makelinear((difim+1000).*mask))-1000;
[h,hc] = hist(data, nbins);
%plot(hc,h); pause
if (usezeros == 0)
h(1)=0;
end
T = hc(rosinthreshold(h,1));
im2 = 0+(difim>=T);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?