initialising a color map
3 views (last 30 days)
Image Analyst on 16 Jul 2013
whiteColorMap = ones(256,3);
Not sure what good that would be. What's the point?
Iain on 16 Jul 2013
image_dat = uint16(randn(1024,1280)*5+5000); % random image (single colour channel)
imagesc(image_dat) % display it
colorbar % put the scale on the screen
colormap white % use the "white colormap"
custom_colormap = [r1 g1 b1;
r2 g2 b2
r3 g2 ...
rn gn bn];
r1, is the amount of red in the first colormap bin, g2 is the green in the second colormap bin, b3 is the blue in the 3rd colormap bin, (and so on) they are scaled from 0 (none) to 1 (max)
colormap(custom_colormap) % changes the display to the colormap you defined.