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.
Afficher commentaires plus anciens
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)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Arithmetic dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!