How do I represent an image and add a moire pattern?
이전 댓글 표시
Hello,
How can I represent an image(256 x 256 px) and then add a vertical pattern(white,black,white,black,etc) with a dimension of 3px each? Please help me.
Thanks
채택된 답변
추가 답변 (1개)
Note that 256 is not a multiple of 3 (the width of your columns)
img = repmat([zeros(256, 3), ones(256, 3)], 1, ceil(256/6));
imshow(img);
댓글 수: 2
Grosu Andrei
2016년 10월 6일
편집: Grosu Andrei
2016년 10월 6일
Guillaume
2016년 10월 7일
Once the stupid typo I made is corrected (one of the zeros should have been ones, you get what you want (sort of, the image is 256x258 since 256 is not a multiple by 3).
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
