フィルターのクリア

Is 2d colormap supported by matlab?

1 回表示 (過去 30 日間)
Ray Lee
Ray Lee 2017 年 8 月 28 日
回答済み: Image Analyst 2017 年 8 月 28 日
Generally in matlab we use 1D gradient colormap as
How do we use colormap like this
  6 件のコメント
Ray Lee
Ray Lee 2017 年 8 月 28 日
@ImageAnalyst Yes, you are right. The color and the brightness represent two data sets. I found an example here
Stephen23
Stephen23 2017 年 8 月 28 日
編集済み: Stephen23 2017 年 8 月 28 日

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

採用された回答

Image Analyst
Image Analyst 2017 年 8 月 28 日
Ray, if you have two parameters, air pressure and frequency, you can't use a colormap and you'll have to create an RGB image instead. You can get the color like this, assuming air pressure and frequency are the row and column of your "colormap" image:
for col = 1 : columns
for row = 1 : rows
thisColor = colormap2D(frequency(row, column), pressure(row, column), :) % A 1-by-3 vector
rgbImage(row, column, :) = thisColor;
end
end
So it has a pressure image and a frequency image. For exvery pixel, it gets the pressure and frequency and uses those as an index to get the desired color for that pixel, which it assigns to a new RGB image.

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange颜色图 についてさらに検索

Community Treasure Hunt

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

Start Hunting!