title graphic AIF graphic

Methods for merging images with Photoshop.

To merge grayscale images to make color images with Photoshop, you need to understand two basic concepts. One is Channels. The other is Layers.



Image made by a 2D matrix of pixels. Each square represents one pixel.

Channels:

Any digital image is comprised of a two dimensional array of pixels (or voxels).

In a grayscale image there is one 2D matrix (also known as one color plane or one channel).

In a color image there are three 2D matrices stacked on top of each other. One represents each color red, green, and blue. These are what we call channels and is fully explained in an article from PEI magazine.

Color separation into three channels of the image above right:


red

green

blue

Color separation into three channels and the merged image in a standard photograph:

All channels can be processed at once or each channel may be displayed or operated on by itself.
From the Window-->Palettes-->Show Channels menu, you may display these:


In RGB mode. All channels are shown (all eyes are turned on) and all channels are being operated on (all channels are grayed in).

Only the green channel is shown (the eye is on only in the green channel) and only the green channel is being operated on (only the green channel is grayed in).

All channels are shown (the eyes are turned on) but only the green channel is being operated on (the channel is grayed in).


Instructions for merging:

Let's say you have two grayscale images that you want to merge as red and green.

  1. Take one of the images. For this example, let's say you choose the red image. Change its mode to RGB color.
  2. Take the other image (that you want to be green) and 1.) Select All and 2.) Copy.
  3. Go back to the red image.
  4. Select to operate on the green channel by clicking on the green channel or by typing "2".
  5. Paste.
  6. Select to operate on the blue channel.
  7. 1.) Select All and 2.) Cut. [If the image looks black, you are fine. If the image looks white, invert it.]
  8. Select to operate on the RGB image.
  9. The red and green images should be merged.


Layers:

In the example at the left, there are four images stacked on top of each other. These are layers.

The main purpose for layers is to nondestructively paste objects on top of each other.

For instance, you may paste text, arrows, or scalebars over your images in a separate layer. The original microscope images are preserved and they are annotated in a completely malleable manner. From the Windows menu, you can show the layers pallette. You can turn layers on and off by clicking on the eye. You can draw or paste into a layer by clicking on the layer.


In RGB mode. All channels are shown (all eyes are turned on) and all channels are being operated on (all channels are grayed in).

Only the green channel is shown (the eye is on only in the green channel) and only the green channel is being operated on (only the green channel is grayed in).

All channels are shown (the eyes are turned on) but only the green channel is being operated on (the channel is grayed in).

Normally, each layer is dispayed as 100% opaque in the Normal mode. As such, you will only see the topmost layer; the other layers will be hidden from view. This is analogous to collage with paper. Cut out objects from paper and lay them on top of each other. Layers in Photoshop operate in the same way.

However, in Photoshop layers may have mathematical properties other than opaque. For instance, a layer may be shown only when its pixels are brighter than those in the image below it. Or the difference between the layer and the images below it may be calculated and displayed.

Layers from back to front.

  1. Phase image.
    Background layer.
  2. Fluoresence image in all channels.
    Difference mode. Adjust opacity to taste.
  3. Fluorescence image in only one channel (e.g. red, green, or blue).
    Lighten mode. Opacity 100%.
  4. Fluorescence image in only one channel (e.g. red, green, or blue).
    Color mode. Opacity 100%.

And here's how to stack color images on transmitted light images.

02layers_for_merging.gif (2451 bytes)

 

three_images.jpg (8988 bytes)

To get the middle grayscale image, make a copy of the color image and change modes.

change_mode.gif (2870 bytes)

Paste the three images together.  Simply pasting the fluorescent images directly over the phase contrast image will make the layers.

merging_example_layers.jpg (36546 bytes)

 

the_result.jpg (11229 bytes)

 

return to index next page

Page last revised 4 Jan 2002 by mc