MATLAB Answers

Translated by

このページのユーザー投稿コンテンツは機械翻訳によって翻訳されています。「ここ」をクリックすると自動機械翻訳が無効になります。「ヘルプ」ページで設定をオンに変更することができます。

fred bnm
0

How to read map of RGB image by using imread?

fred bnm
さんによって質問されました 2016 9 月 5
最新アクティビティ Stephen Cobeldick
さんによって コメントされました 2018 2 月 13

after run this code the value of map is empty.please guide me.

    [rgb,map] = imread('color.png');

  2 件のコメント

Only indexed images have maps. If the map is empty then you do not have an indexed image:

http://www.mathworks.com/help/matlab/creating_plots/image-types.html

Why do you expect there to be a map ?

fred bnm
2016 9 月 5

if convert gray or each channel of RGB image into indexed image , may That achieved Map ?

サインイン to comment.

2 件の回答

回答者: Thorsten
2016 9 月 5
編集済み: Thorsten
2016 9 月 5

If the value is empty, the image is not in a mapped format, i.e., RGB values are stored for each pixel (true color format), not a single number as an index into the map (palettes image format).

  3 件のコメント

fred bnm
2016 9 月 5

ok.but after convert by rgb2gray('color.png') and imwrite that gray image and run above code , map is empty still.please help.

Thorsten
2016 9 月 5

This is because the image you saved is stored with the gray scale value for each pixel, without any map.

You can use rgb2ind to convert the image to an indexed image, which then can be stored using imwrite(I, map, filename). But why do you want a map/indexed image in first place?

Image Analyst
2016 9 月 5

I agree with Thorsten. There is no map because you saved a gray scale image. Why do you think you need a map? Even if you didn't store one in the file (so that others would be able to see the map you used), you could still read in the gray scale image and apply a colormap after it's been read in and displayed. If you really want one, then create one and save it with imwrite(). Which map are you using, if any, when you call imshow() to display your image?

サインイン to comment.


回答者: sajeela khan 2018 1 月 27
編集済み: Stephen Cobeldick
2018 2 月 13

hello i am new at matlab. i am doing my work on field images .i have rgb images and some images taken from multispectral camera images have to work on it. but i dnt know how and what kind of processig i can do on it. kindly guide me that what kind of functions i can appy and what i can do atleast on these rgb and multispectral images. what cam we do using RGB images for fields

  8 件のコメント

@sajeela khan: I deleted your multiple other one-line "answers" and attached the image to your original "answer". Please do not hijack unrelated threads like this: you should start your own question, as your topic is quite unrelated to the topic of this thread.

hello sir i need some serious help on my project so i talk to him and asked him u deleted my recent messages about which i need his help . i dnt know how to contact him other way. @Image Analyst sir kindly help me and tell me how i can find latitude and longitude of this image. My images are all ariel. I am working on it since 15 days but find nothing helpfull and worthy. I have to work on these images and i cant find that what can i do with them . Atleast one 1st step that i should apply on it . i have converted it into tiff format and try to find latitude and longitude but my function is not working. Can u help me in this regard r do u know any one who can help me .

@sajeela khan: as I wrote earlier, you should start your own question. It would get more help than hiding your discussion in someone else's ancient thread.

サインイン to comment.



Translated by