By image composition we usually mean extract one or more objects in different images and put them together 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 and 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 to a background image, the white mask pixels indicate which pixel should be drawn over the background and black ones indicate not. The same principle applies to composite more than two images, where multiple images (each one has a mask) are drawn onto a background in a predefined order and 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 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 the color of Curless' face is different Hertzmann's neck. One way to improve is change the color balance of the layer 1. You can achieve this by choosing "image-->adjust-->color balance" menu and change the R, G, B balance for Curless' face. Then you will see a better result shown bellow.
When carry out any of the operation, 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.
Those are just basic steps to do image composition in Photoshop. Photoshop is a powerful tool and have many features. You can refer its help menu for more information and ask us.
Last modified on January 23, 2002