clear, close all
I = imread('pout.tif'); % this is to read the image pout.tif
for i = 1:size(I,1) % this is loop from 1 to number of rows of the image (REad abou the fnction size)
for j = 1:size(I,2) % this is loop from 1 to number of columns of the image. So basically the loops cover each pixel of the image i.e. each and every element of matrix
if (rem(i,2)==0 && rem(j,2)==0) % if the row, collumn is even
I(i,j) = 0; % repalce the pixel by 0
end
end
end
You can try yourself everything instead of asking a question. Read the documentation of rem.