By image composition we mean the process of extracting one or more objects from different images and putting them together, perhaps with a novel background, to synthesis a new image. In the Intelligent Scissor project, you create a useful tool that allows a user to cut an object out of one image and paste it into another. For example, we can replace Prof. Hertzmann's face on the left image with Prof Curless' face in the middle; the composite image is on the right.
Prof Hertzmann in Japan | Prof Curless in Sieg | Prof Curless in Japan |
The techniques behind the composition is very simple. There basis steps involved are: image segmentation, shape transformation, color adjustment.
Image segmentation can be achieved by using your Intelligent Scissor tool. After you finish a closed contour in the scissor tool and choose "save mask" menu item, you will get a binary mask image, in which the segmented objects in the contour (including the contour) is white and other regions are black. Taking an example of Curless' case, the contour and mask are show below:
When you composite this image onto a background image, the white mask pixels indicate which pixels should be drawn over the background, and black ones indicate which should not. The same principle applies to compositing more than two images, where multiple images (each one has a mask) are drawn onto a background in a predefined order; each mask decide which part of the image should be drawn over the background and images drawn previously.
You can do this mask based operation in Photoshop easily, where each image may consist of several layers.
Then you should be able to see the following picture. The first problem is the sharpness of the edges; you may wish to apply a small Gaussian blur to the mask. The next problem is the original face size does not match the one in the background and they are not aligned either. We need to do some shape transformation.
After the shape transformation, the result is much better. However, the face is still sticking out of the background. One reason is that the color of Curless' face is different than Hertzmann's neck. One way to improve this is to change the color balance of layer 1. You can achieve this by choosing "image-->adjust-->color balance" in the menus and changing the R, G, B balance for Curless' face (for this to work, unlink the mask and foreground). Then you will see the better result shown below.
When carrying out any of the operations, please make sure that you are working on the proper layer. You can choose which layer to work with by selecting appropriate items in the Layers palette.
These are just basic steps to do simple image composition in Photoshop. Photoshop is a powerful tool and has many features. You can refer its help menu for more information, or ask us the TA.
Last modified on March 28, 2003