MATLAB Answers

Assigning white pixels to specific locations

2 views (last 30 days)
med-sweng on 7 Feb 2015
Commented: Jan on 7 Feb 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?


Sign in to comment.

Accepted Answer

Tapan on 7 Feb 2015
I = zeros(64); I(32:35,32:35)=1;

  1 Comment

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

Sign in to comment.

More Answers (0)

Sign in to answer this question.