How can I calculate my own colormap?

2 ビュー (過去 30 日間)
Tanaporn Pipatnoraseth
Tanaporn Pipatnoraseth 2018 年 11 月 28 日
Hi!
I want to create a new color scale that will be used for mapping to a grayscale picture.
I have three equations for RGB values calculated by linear interpolation with 256 steps scale, but I cannot find the way to calculate it on MATLAB.
Any suggestion would be greatly appreciated.

採用された回答

Image Analyst
Image Analyst 2018 年 11 月 28 日
Make an N by 3 array. So
x = (0:255)';
redMap = your red formula.
greenMap = your green formula
blueMap = your blue formula
cMap = [redMap(:), greenMap(:), blueMap(:)];
colormap(cMap);
  1 件のコメント
Tanaporn Pipatnoraseth
Tanaporn Pipatnoraseth 2018 年 12 月 25 日
Thank you! :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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