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.
Ältere Kommentare anzeigen
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)
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Image Arithmetic finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!