The meaning of code on this program
Afficher commentaires plus anciens
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.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Processing Toolbox 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!