Can someone explain this code please? This was my question: Add the pixels of image1 to image2 in order to create a new image using for loops.
古いコメントを表示
Can someone please explain my code? especially this part "im12 = zeros(r,c,n,'uint8')"
img1 = imread("image1 (1).png")
img2 = imread("image2 (1).png")
[r,c,n]=size(img1)
im12 = zeros(r,c,n,'uint8')
for i = 1 : r
for j = 1 : c
im12(i,j) = img1(i,j)+img2(i,j);
end
end
imshow(im12)
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Image Arithmetic についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!