フィルターのクリア

cdata and cmap problem

2 ビュー (過去 30 日間)
Anusha
Anusha 2013 年 10 月 23 日
コメント済み: Image Analyst 2013 年 10 月 23 日
this is color map and palette of an image
[cdata cmap]=imread('pc.gif');
cdata=index matrix
correspoding palette(RGB) is stored in a cmap...
if i take a cmap and change the position cdata will automatically should changed..
Please tell what to do with that..
This is my big doubt

回答 (1 件)

Image Analyst
Image Analyst 2013 年 10 月 23 日
I have no idea what you are trying to do. Please read this: http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer. The only thing I can figure out is that you're reading in a .gif file and want to display it with the proper colormap. So you do this
[indexedImage, customColorMap] = imread('pc.gif');
imshow(indexedImage);
colormap(customColorMap);
I have no idea why you're messing around with cdata, and I can't figure out if you're talking about the actual cdata of the axes, or the cdata which you mistakenly called your indexed image.
  2 件のコメント
Anusha
Anusha 2013 年 10 月 23 日
I swap the colormap according to the condition..
When swap the colormap, the position changed.. I want the corresponding indeximage also want to changed
Image Analyst
Image Analyst 2013 年 10 月 23 日
What condition? What condition are you checking? What if the condition is not met?
If you change the image, it will look different. You may have to apply the colormap again though (not sure).

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by