フィルターのクリア

how to set colorbar not showing values

2 ビュー (過去 30 日間)
nirit
nirit 2016 年 10 月 18 日
回答済み: Walter Roberson 2016 年 10 月 18 日
I have grayscale image with values 0, 11-max(image). I want to show 0 as black , and 11-max(image) as different type of red.
my questions are:
1.how to change the colorbar accordingly? I dont mind showing 0-11 as black, but it will be best if the values 1-10 will not shown at all at the colorbar. or , in other words, can I show at the colorbar only the values :0,11-end?
2. how to make the quantization of the red seem good? (so that the human eye could make the different between the shades )
please help?
thank you.

回答 (1 件)

Walter Roberson
Walter Roberson 2016 年 10 月 18 日
You cannot use colorbar and have a range omitted. You could create your own colorbar replacement.
For the quantization you probably cannot do better than linspace() of the red values between some minimum and maximum in the 0 to 1 range,with number of steps equal to the greatest max value minus 9

カテゴリ

Help Center および File ExchangeBlue についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by