What is Image Segmentation

It is the process of grouping areas of adjacent pixels of similar color/intensity into zones of color that best represent the original image.

Segmentation can be applied to 24bit 16.7million color and 8bit 256 grayscale color images. Other image color depths will automatically be converted to one of these before being  segmented. Segmentation is applied to the whole image.

To better illustrate segmentation we will use the following Lilly flower image, highlighting just a part for clarity.

16M color image with part highlighted Part of 16M color image

If we were to simply Reduce colors automatically  then we would have the following results. Each pixel and its color would be reduced without any relevance given to its significance with respect to any adjacent pixel colors. The results could not  easily be vectorized without further manual color reduction.

Automatic reduction 256 color Automatic reduction 32 color

The following segmentation examples at various settings of color reduction illustrate the greatly enhanced benefits of segmentation. Any of the images below could be used for Picture/Photo or Outline vectorization.

Segmented 256 color Segmented 32 color
Segmented 16 color Segmented 6 color


To Apply Segmentation

1. Select Raster Effects Menu > Segment.
2. You should now be presented with the Segment Colors dialog.

3. The Preview Window  will immediately show the results of any changes made using the following sliders and button on the right hand side of the dialogue.
The sliders and button affect the whole image.

4.   Feature Definition slider

This slider affects the degree of sharpness applied to image elements when segmenting.

If you have relatively small image elements you wish to ensure are retained then set the slider towards the ‘High’ mark.

If you wish to reduce the significance of smaller image elements (such as noise) then set the slider towards  the ‘Low’ mark

5.   Maximum Colors slider

Set the maximum number of colors that are required after segmentation.

The slider has a range selection of 2-32, 64,128 and 256 colors.

Segmentation will normally consider all colors in the original image and select the best set of colors to represent the image.

You can however restrict the initial range of colors considered. Before calling this dialog, window onto a selected area of the full image in the Scan2CAD main viewing window. If a window has been selected then it will be highlighted by a green rectangle in the Preview Window. Only the colors within that window will be considered in the final colors selection that will be applied to the whole image. This can be very useful if dealing with portrait images where you may only want to consider colors relevant to the subject rather than including any background colors.

The color selection will always include Black and White even if they are not present on the image.

6.   Minimum Feature Size slider

This allows the removal of any image feature size up to the value selected.

The slider has a range selection of 0-63 pixels.

7.   Remove single pixel contours button

This allows the removal of single pixel wide contour lines.

8. Manual Color Reduction

This allows the user to manually refine the final color selection required. As the Maximum Colors setting is reduced the automatic color reduction may opt to retain one of two or more colors when the user would prefer an alternative.

In the above example displayed in the dialog image we have 2 green colors, one slightly darker than the other.

If we click on these 2 colors with the lighter green being clicked second, then in the ‘Change selection to’ we click the ‘Last selected’ button you will see that both greens are now the lighter green.

Alternatively if in the ‘Change selection to’ we had clicked the ‘Combination’ button you would see that both greens are now a combined green color.

Colors can be selected either from the image in the preview window of from the list displayed.

Manual color reduction should ideally be the final action when segmenting – changing other options on the dialog after manual reduction will reset the manually reduced colors.


Have questions on this topic? Talk to us