How to Create Alternating Black Columns Across an Image?
Mostra commenti meno recenti
I have an image X and I would like to create black columns going across the image that are 16 pixels thick with a distance of 16 pixels between each column and I have no idea how to do this. The best I could do was make one column using this line of code:
X(:,1:16,:) = 0;
Also I am not allowed to solve the problem using loops.
Risposta accettata
Più risposte (1)
Walter Roberson
il 10 Set 2017
0 voti
2 Commenti
Richard Zareck
il 10 Set 2017
Walter Roberson
il 10 Set 2017
clown(:, 1:32:end, :) = 0;
clown(:, 2:32:end, :) = 0;
clown(:, 3:32:end, :) = 0;
...
clown(:, 16:32:end, :) = 0;
Categorie
Scopri di più su Display Image in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

