我如何融合在一起4图片(相同的维度)在一起checkerboard-like时尚吗?
1视图(30天)
显示旧的评论
接受的答案
为副总经理
2021年8月23日
编辑:为副总经理
2021年8月23日
考虑一下这个例子:
%生成测试图像
%这部分使用MIMT FEX,否则不需要
inpict = imread (“cameraman.tif”);%的原始单通道源
= uint8 (repmat(双(inpict) [1 1 3])。*排列(0.3 - 0.8 [1],[1 3 2]));
B = imtweak (A,“lchab”,(1 1 0.25));
C = imtweak (,“lchab”,(1 1 0.50));
D = imtweak (,“lchab”,(1 1 0.75));
%做面具
多=大小(inpict);
squaresize = [32 32];
xx =国防部(0:(多(2)1),squaresize (2) * 2) < squaresize (2);
yy =国防部(0:(多(1)1),squaresize (1) * 2) < squaresize (1);
m = uint8 (xx和yy ');
%结合图片
outpict =。* m + b * circshift (m, squaresize。* [1 0])…
+ c * circshift (m, squaresize。1 * [0])…
+ d * circshift (m, squaresize。* [1]);