change color intensity of matrix for some pixels

1 Ansicht (letzte 30 Tage)
Anvinder  Singh
Anvinder Singh am 12 Mär. 2016
Beantwortet: Walter Roberson am 12 Mär. 2016
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.

Antworten (1)

Walter Roberson
Walter Roberson am 12 Mär. 2016
For example,
a(10:20,32:78,:) = 1/4;

Kategorien

Mehr zu Modify Image Colors finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by