help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rgb2ind and colormap


From: Bertrand Roessli
Subject: rgb2ind and colormap
Date: Wed, 06 May 2009 10:04:55 +0200

Hello,

if I use this code 

[I]=imread('im.jpg');
[data,map]=rgb2ind(I);
imshow(data,map);

(octave 3.1.55) 

I get an error message as the values in the 
colormap are not scaled between automatically between [0:1], 
but range from [0:255].  

I am not sure this is expected. Should the values in 
the colormap not be divided by 256 per default?

Anyway, if I divide the values by 256 (?) I cannot get 
back the original picture. 

Thank you,

Bertrand Roessli 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]