### 9.3. Distance Map

#### 9.3.1. Overview

Each pixel in the image is replaced with a gray value dependent on the distance to the nearest obstacle pixel, generally a boundary pixel. Different methods can be used to calculate the distance.

#### 9.3.2. Activating the Filter

This filter is found in the main menu under Filters → Generic → Distance Map….

#### 9.3.3. Options

شكل 17.189. “Distance Map” options

Presets, “Input Type”, Clipping, Blending Options, Preview, Merge filter, Split view

  | ياداشت
  These options are described in قسمت 2, “Common Features” .

Metric

  “Metric” is a topology term. Three methods are available:

  Euclidean

    The distance is a straight line.

  Manhattan

    The distance is the sum of the one-dimensional distances along the X and Y axes.

  Chebyshev

    The distance is the maximum of the one-dimensional distances along the X and Y axes.

Edge handling

  This defines how areas outside the input are considered when calculating distance. Choices are: Below threshold and Above threshold.

Threshold low

  Default is 0. Increasing this value selects higher lightness pixels

  Original image for examples. Threshold low will be progressively increased. Lightness: dark red = 0.070; bright red = 0.223; green = 0.133

  شكل 17.190. “Threshold low” example

  Threshold low = 0: only border distances are visible.

  Threshold low = 0.070: “dark red” circle appears.

  Threshold low = 0.133: “green” circle appears.

  Threshold low = 0.223: “bright red” circle appears.

Threshold high

  Default is 1. Decreasing this value makes result darker.

Grayscale Averaging

  Number of computations for grayscale averaging.

Normalize

  This option is checked by default. When checked, all distances are normalized into a range of 0.0 to 1.0.

  If you uncheck this option, non-obstacle pixels will appear white because their calculated distance will be greater than or equal to 1.0.

  شكل 17.191. “Normalize” example

  Normalize option checked.

  Normalize option unchecked.

9.2. Convolution Matrix |  | 9.4. Normal Map

Report a bug in GIMP Report a documentation error