convert indexed image to true color image
rgb = ind2rgb(ind,cmap)
ind2rgb utility function converts an indexed image to true color image for pseudo color visualization.
x=[1:512]; a=sin(2*%pi*x/64); b=kron(a,a'); b=(b-min(b))/max(b-min(b)); b=int32(b*511+1); cmap=jetcolormap(512); c=ind2rgb(b,cmap); imshow(c);
Roger Liu and Isaac Zhi