next up previous contents
Next: Hugh's examples Up: Lecture 4: Images in Previous: Greyscale images   Contents

Colour images

I HAVEN'T UPDATED HUGH'S PART OF THIS - I HAVE NEVER OPERATED ON COLOUR IMAGES LIKE THIS MYSELF - I HAVE LEFT IT IN FOR REFERENCE THOUGH.

A colour image is really three images, a red one, a green one and a blue one. If you want to do image processing things to a colour image, smoothing for example, then you have to apply your algorithm to the three colours separately. As we have seen, images are stored on computers in various file formats. Just like computer screens, some image formats (tiff, jpeg, ppm, some .png) are 24 bit true colour and store a red, a green and a blue image. Others (.gif, some .png) store an 8-bit image and a colour table to say which value in the image should be what colour.

Try

window,0,retain=2
loadct,39
tvlct,r,g,b,/get
tv,bytscl(meteosat)
write_png,'~jmarsham/out_39.png',tvrd(),r,g,b
and
window,0,retain=2
load_sst_ct
tvlct,r,g,b,/get
tv,bytscl(meteosat)
write_png,'~jmarsham/out_sst.png',tvrd(),r,g,b

The different colour tables make a significant difference.



Subsections

John Marsham 2005-04-22