change color intensity of matrix for some pixels

1 回表示 (過去 30 日間)
Anvinder  Singh
Anvinder Singh 2016 年 3 月 12 日
回答済み: Walter Roberson 2016 年 3 月 12 日
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 Center および File ExchangeModify Image Colors についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by