The following describes how Decompose can be used to extract objects from images. We will cover the following topics:
Before starting this tutorial, make sure you have the following items available:
Unfortunately, not all images are well suited for the extraction of objects. The perfect image has a smooth uniform background and the objects to extract have sharp edges with colors different from the background.
However, most of the time such images are not available. Decompose works well to extract objects from these non-ideal images. Even if your picture has a complex background, if you can clearly distinguish the edges of the objects visually, Decompose will succesfully extract these objects.
![]() |
![]() |
| a well-suited image | an unsuited image |
In this tutorial, we will be working with the image of the dog. Feel free to download a larger version.
Once you are ready, launch Decompose. You will be prompted to choose the desired image.
Once your image is loaded in Decompose, the first step is to give the application a rough idea of the objects to extract. The following tools are available to perform this task:
![]() Brush Tool |
Paints a thick line. The thickness of the line can be adjusted with the Size slider. |
![]() Fill Tool |
Paints a closed region. |
![]() Region Tool |
Paints a region defined by an arbitrary shape. |
![]() Rectangle Tool |
Paints a region defined by a rectangle. |
![]() Color Tool |
Paints all the pixels with a similar color. The tolerance can be adjusted with the Tolerance slider. |
Three regions must be defined when you draw the mask:
![]() Foreground |
Pixels in this region are fully part of the objects to be extracted. |
![]() Contour |
Pixels in this region are either part of the foreground or the background. Decompose will automatically determine it. |
![]() Background |
Pixels in this region are fully part of the background to be removed. |
When drawing the initial mask, Decompose shows the original image with slightly modified colors so you can view to which region each pixel belongs. Dark pixels belong to the background, medium pixels to the contour and light pixels to the foreground. Initially, all pixels in the image are considered to be in the background region and your image seems darker.
The next step is to switch to the
Contour mode and use the
Brush tool to roughly trace the contour of the objects you wish to extract. It is important that you completly cover the edges of the objects to extract since Decompose will look for the edges only in the marked contour regions.
Then, switch to the
Foreground mode and use the
Fill tool to fill the objects to extract with the foreground color. When using the Fill tool to paint the foreground make sure that the contour you previously draw forms a closed shape, otherwise it will spill. If the contour is not a closed shape, you can use one of the other tools at your disposition to paint the foreground.
That's it! You have now succesfully drawn the mask required by Decompose in order to appropriately extract the objects from the image. Note that at any time, you can use the Image/Mask slider to change the view between the original image and the mask. Now that the mask is drawn, Decompose is ready to perform the rest of the extraction automatically.
Click on Result or Matte to initiate the automatic extraction. Decompose will take some time to analyze and process the image and mask before producing the result. The result is then displayed on a translucent background. You can change the color and translucency of the background to test the result using the Background color button found in the right-hand bottom corner of the window.
Finally, you can click on Save from the File menu to save the result as a TIFF image. This image contains the color-corrected extracted objects on a transparent background and is ready to be used in your favorite compositing software.
The following tips will make it easier for Decompose to understand which objects you want to extract and help you obtain better results: