refactor: 项目目录结构重组
- 中文目录名改为英文:cDNA图像处理实例→examples,参考资料→references - web→app(Flask应用标准命名) - 输出目录平移到 data/output/simple/ 和 data/output/full/ - 输入图像统一到 data/input/ - 构建脚本移到 scripts/ - 源码文件改用 snake_case 命名 - 更新所有文件路径引用和文档
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
function indicator = checkstop(old,new,dt)
|
||||
% indicate whether we should performance further iteraions or stop
|
||||
|
||||
% Copyright (c) 2009,
|
||||
% Yue Wu @ ECE Department, Tufts University
|
||||
% All Rights Reserved
|
||||
|
||||
layer = size(new,3);
|
||||
|
||||
for i = 1:layer
|
||||
old_{i} = old(:,:,i);
|
||||
new_{i} = new(:,:,i);
|
||||
end
|
||||
|
||||
if layer
|
||||
ind = find(abs(new)<=.5);
|
||||
M = length(ind);
|
||||
Q = sum(abs(new(ind)-old(ind)))./M;
|
||||
if Q<=dt*.18^2
|
||||
indicator = 1;
|
||||
else
|
||||
indicator = 0;
|
||||
end
|
||||
else
|
||||
ind1 = find(abs(old_{1})<1);
|
||||
ind2 = find(abs(old_{2})<1);
|
||||
M1 = length(ind1);
|
||||
M2 = length(ind2);
|
||||
Q1 = sum(abs(new_{1}(ind1)-old_{1}(ind1)))./M1;
|
||||
Q2 = sum(abs(new_{2}(ind2)-old_{2}(ind2)))./M2;
|
||||
if Q1<=dt*.18^2 && Q2<=dt*.18^2
|
||||
indicator = 1;
|
||||
else
|
||||
indicator = 0;
|
||||
end
|
||||
end
|
||||
return
|
||||
Reference in New Issue
Block a user