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.

 채택된 답변

Tapan
Tapan 2015년 2월 7일

0 개 추천

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

댓글 수: 1

Jan
Jan 2015년 2월 7일
32:35 are 4 pixels... I assume the OP can apply the required changes.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

태그

질문:

2015년 2월 7일

댓글:

Jan
2015년 2월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by