Assigning white pixels to specific locations

5 vues (au cours des 30 derniers jours)
med-sweng
med-sweng le 7 Fév 2015
Commenté : Jan le 7 Fév 2015
Say that we have a black image (i.e. zeros) of size 64x64, and say that I want to fill those 3x3 windows pixels in the middle of the image with white (i.e. ones), how can I do that in MATLAB?
Thanks.

Réponse acceptée

Tapan
Tapan le 7 Fév 2015
I = zeros(64); I(32:35,32:35)=1;
  1 commentaire
Jan
Jan le 7 Fév 2015
32:35 are 4 pixels... I assume the OP can apply the required changes.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Image Processing Toolbox dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by