change color intensity of matrix for some pixels

1 次查看(过去 30 天)
I have a matrix and it has 2 squares, i have used "a = ones(256, 256, 3);" so it gives me a white background. I wantt to change it to gray. What should i do ? Thank you.

回答(1 个)

Walter Roberson
Walter Roberson 2016-3-12
For example,
a(10:20,32:78,:) = 1/4;

类别

Help CenterFile Exchange 中查找有关 Modify Image Colors 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by