Creating checkerboard image without inbuilt function and for loop
Afficher commentaires plus anciens
Hi,
I saw this code online and it works! It can indeed generate the checboard image but I hope you can enlighten me how each line actually works in creating the checkboard.
Thank you!
im=255*ones(800,800,'uint8');
im(1:100,101:200,:)=zeros(100,100,'uint8');
im(1:100,201:400,:)=im(1:100,1:200,:);
im(1:100,401:800,:)=im(1:100,1:400,:);
im(101:200,1:700,:)=im(1:100,101:800,:);
im(201:400,:,:)=im(1:200,:,:);
im(401:800,:,:)=im(1:400,:,:);
imshow(im)
rectangle('position',[1 1 799 799]);
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Image Processing and Computer Vision dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!