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.
Show older comments
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)
Accepted Answer
More Answers (0)
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!