map pixel intensity to rainbow
古いコメントを表示
I am working with a unit16 only in the red channel (ImgRed)
In it's simplest form, I need create a new image (Irainbow) where the highest intensity pixel from ImgRed is represented by blue in Irainbow and the lowest intensity pixel in ImgRed is represented by red in Irainbow.
Any help?
I tried converting to double, indexing, and using colormap(jet). But it looks really bad.
採用された回答
その他の回答 (2 件)
Image Analyst
2011 年 12 月 2 日
0 投票
Don't convert to double. Leave it as integer. You just need to get your colormap correct. Apparently you don't like jet, so go ahead and design your own if you don't like any of the built-in colormaps such as jet, winter, autumn, hsv, etc.
Walter Roberson
2011 年 12 月 2 日
The default jet colormap has 256 colors.
In theory you could construct the 65536 color equivalent by using
jet16 = jet(65536);
after which you could
colormap(jet16)
This is not something I would recommend directly.
I would suggest that you figure out how many bits of resolution you need to represent your results nicely enough. It could even be that imagesc(imgRed) with the normal jet colormap would be enough for your purposes. If not then colormap(jet(512)) and upwards by powers of 2 until you find one that looks okay.
カテゴリ
ヘルプ センター および File Exchange で Red についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!