Distance Bright

Use this filter to measure the distance of every object point from the object's edge. The distances will be coded in gray values. With a binary image the object is white against a black background.

You'll find the Distance Bright filter in the Process > Morphological Filter menu.

Before using the filter

This filter can only be applied to binary images. Therefore, you have to first binarize the image by using the Image > Mode > Binary... command. Otherwise, in the menu for morphological filters, the Distance Bright command is grayed out. You can find more information on binarizing here.

Resulting images

Even if the source image is a binary image, the resulting image is always a gray value image. For this reason, in the dialog box for image processing operations, a message appears at the bottom left when you have clicked the Apply button.

See also

Overview - Morphological Filter

Working with morphological filters

Settings for the filter

The dialog box that is opened when you use an image processing operation is made up in the same way for every operation. Click here to switch to a description of this dialog box.

Application

The Distance Bright filter is often applied as a preprocessing step. With this filter, you can for example analyze the distances between objects.

Distanz_1 Distanz_2

The way the Distance filter works can be demonstrated on a simple binary image. You'll find the source image (1) on the left-hand side. With the Distance Bright filter (2) the white cross is interpreted as image object. When the filtering has been completed, the middle of the cross appears bright, and towards the edges, the gray values decrease continually.

Exactly what happens?

The Distance Bright filter determines the distance between every white pixel and the next black pixel. The pixel is assigned a gray value that is proportional to the calculated distance. Where this is concerned, a greater distance corresponds to a high gray value and vice versa. When the filtering has been completed, the middle of an object is bright. Towards the edges, the intensity steadily decreases. The image background remains black.

The resulting image may possibly appear black. In this case, the objects are so small that the filter has only assigned the pixels low gray values for a short distance from the edge of the object. In this case, optimize the image contrast.

Optimizing image contrast

1.Use the View > Tool Windows > Adjust Display command to make the Adjust Display tool window appear.

2.Select the Auto Contrast option in the Histogram group.

3.Click the Search button.

Comparison with other filters

The filter is an important component when other filters are applied, the Ultimate Erode Bright filter for example.

1755