代码拉取完成,页面将自动刷新
% 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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。