Creating checkerboard image without inbuilt function and for loop
조회 수: 24(최근 30일)
표시 이전 댓글
Arturo Jr. Ongkeko 2021년 3월 17일
답변: Prudhvi Peddagoni 2021년 3월 22일
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.
rectangle('position',[1 1 799 799]);
Prudhvi Peddagoni 2021년 3월 22일
In the image matrix, 255 means highest intensity (white) and 0 means lowest intensity(black). First the white background is created and later the black boxes are added to it. You can add imshow(im) command after each step and instead of running the whole code, you can use step button to run each command and see the changes.
hope this helps.
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!