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!
