# [−][src]Enum imageproc::distance_transform::Norm

```pub enum Norm {
L1,
LInf,
}```

How to measure distance between coordinates. See the `distance_transform` documentation for examples.

Note that this enum doesn't currently include the `L2` norm. As `Norm` is used by the `morphology` functions, this means that we don't support using the `L2` norm for any of those functions.

This module does support calculating the `L2` distance function, via the `euclidean_squared_distance_transform` function, but the signature of this function is not currently compatible with those for computing `L1` and `LInf` distance transforms. It would be nice to unify these functions in future.

## Variants

`L1`

Defines d((x1, y1), (x2, y2)) to be abs(x1 - x2) + abs(y1 - y2). Also known as the Manhattan or city block norm.

`LInf`

Defines d((x1, y1), (x2, y2)) to be max(abs(x1 - x2), abs(y1 - y2)). Also known as the chessboard norm.

## Blanket Implementations

### `impl<T> ToOwned for T where    T: Clone, `[src]

#### `type Owned = T`

The resulting type after obtaining ownership.

### `impl<T, U> TryFrom<U> for T where    U: Into<T>, `[src]

#### `type Error = Infallible`

The type returned in the event of a conversion error.

### `impl<T, U> TryInto<U> for T where    U: TryFrom<T>, `[src]

#### `type Error = <U as TryFrom<T>>::Error`

The type returned in the event of a conversion error.

### `impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where    Dst: ApproxFrom<Src, Scheme>,    Scheme: ApproxScheme, `[src]

#### `type Err = <Dst as ApproxFrom<Src, Scheme>>::Err`

The error type produced by a failed conversion.

### `impl<Src, Dst> ValueInto<Dst> for Src where    Dst: ValueFrom<Src>, `[src]

#### `type Err = <Dst as ValueFrom<Src>>::Err`

The error type produced by a failed conversion.

### `impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where    Scheme: ApproxScheme, `[src]

#### `type Err = NoError`

The error type produced by a failed conversion.

### `impl<Src> ValueFrom<Src> for Src`[src]

#### `type Err = NoError`

The error type produced by a failed conversion.

### `impl<Src> TryFrom<Src> for Src`[src]

#### `type Err = NoError`

The error type produced by a failed conversion.

### `impl<Src, Dst> TryInto<Dst> for Src where    Dst: TryFrom<Src>, `[src]

#### `type Err = <Dst as TryFrom<Src>>::Err`

The error type produced by a failed conversion.