The meaning of code on this program
Mostrar comentarios más antiguos
Hi.
That is a code which produce a difference picture on Matlab.
That is my professor code, but i cannot fully understand.
The knowledge point is image on Matlab.
% read an image: imread()
% show an image: imshow()
% eg.
clear, close all
I = imread('pout.tif'); % read
for i = 1:size(I,1)
for j = 1:size(I,2)
if (rem(i,2)==0 && rem(j,2)==0)
I(i,j) = 0;
end
end
end
% show a image
imshow(I);
What is the meaning of i = 1:size(I,1) and what is the purpose of rem(i,2) == 0 && rem(j,2) == 0;
Thank you all.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Image Processing Toolbox en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!