Assigning white pixels to specific locations

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.

 Respuesta aceptada

Tapan
Tapan el 7 de Feb. de 2015

0 votos

I = zeros(64); I(32:35,32:35)=1;

1 comentario

Jan
Jan el 7 de Feb. de 2015
32:35 are 4 pixels... I assume the OP can apply the required changes.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Image Processing Toolbox en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 7 de Feb. de 2015

Comentada:

Jan
el 7 de Feb. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by