加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
reconsFromBlock.m 878 Bytes
一键复制 编辑 原始数据 按行查看 历史
Hui Li(李辉) 提交于 2019-12-21 11:54 . fusion method files
% reconstructioin from image block - 4
function F = getImgBlock(img_temp,img1, img2, img3, img4)
count = img_temp;
[h, w] = size(img_temp);
temp_ones = ones(h, w);
h_cen = floor(h/2);
w_cen = floor(w/2);
img_temp(1:h_cen+2, 1:w_cen+2) = img_temp(1:h_cen+2, 1:w_cen+2)+img1;
count(1:h_cen+2, 1:w_cen+2) = count(1:h_cen+2, 1:w_cen+2)+temp_ones(1:h_cen+2, 1:w_cen+2);
img_temp(1:h_cen+2, w_cen-1:w) = img_temp(1:h_cen+2, w_cen-1:w)+img2;
count(1:h_cen+2, w_cen-1:w) = count(1:h_cen+2, w_cen-1:w)+temp_ones(1:h_cen+2, w_cen-1:w);
img_temp(h_cen-1:h, 1:w_cen+2) = img_temp(h_cen-1:h, 1:w_cen+2)+img3;
count(h_cen-1:h, 1:w_cen+2) = count(h_cen-1:h, 1:w_cen+2)+temp_ones(h_cen-1:h, 1:w_cen+2);
img_temp(h_cen-1:h, w_cen-1:w) = img_temp(h_cen-1:h, w_cen-1:w)+img4;
count(h_cen-1:h, w_cen-1:w) = count(h_cen-1:h, w_cen-1:w)+temp_ones(h_cen-1:h, w_cen-1:w);
F = img_temp./count;
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化