June 1, 2004

Contents

RGB Overlay - Koala Example

Making an RGB image from separate TIFF files.

It is often advantageous to show two or three registered images as an RGB overlay - showing one image in red, one in green and one in blue, or for two images, one in both red and blue, and the other in green.  For stereo analyglyphs, you can display the left image as the red component, and the right image as either blue or green, or both.

This example shows how to combine three images into a color image (color composite or RGB overlay). The individual gray level images were obtained by separating the colors of a color image to make it obvious when the right images are shown with the right colors. This is because they can be mixed easily using Image. If the three images are micrographs or xray maps, for example, it may not be obvious without careful inspection what the color overlay should look like.

 On the Mac, the images will be stacked like this. On the PC, the arrangement will be similar.

Note that the Windows menu looks something like this.

The order of the windows at the bottom determines their order in the stack. This is the order that the files were loaded.

ImageJ:  The Window menu looks like this. 

The order of the windows does not matter for Image / Color / RGB-Merge.

  The three images have been made into a stack. Slice 1 is the green image (for this case) which will be shown in red. ImageJ:  The three images have been made into an RGB color image.  

 


These steps are not applicable to ImageJ:

 With dither:  Without dither:

Dithering helps to hide the effect of the limited number of colors available (8 bit = 256 colors). Note - the original three gray level images could specify up to 256*256*256 colors.

Note that the colors are wrong. This is because the images are in the wrong order. To correct this,

Note that the images are in the correct order in the Windows menu.

 

 The colors are now more correct.

The image has less than 50 colors in it - the colors were chosen by the palletization algorithm in Image.

The above steps are not applicable to ImageJ.


 

 For comparison, here is a JPEG'd version of the 24 bit color image with 20:1 compression. This is an 8 bit image made with Photoshop, that uses 256 colors.  For comparison, this is the RGB image from ImageJ, as a JEPG file, with no compression.