Skip to main content

Module boundary

Module boundary 

Source
Expand description

Boundary modes for the ndimage-style routines (rank filters, morphology, derivative filters and geometric transforms), with SciPy’s names and meanings.

For a row a b c d, the modes extend it as:

  • Reflect: d c b a before and d c b a after (the edge sample is repeated);
  • Mirror: d c b before and c b a after (reflection about the centre of the edge sample);
  • Nearest: a a a before and d d d after;
  • Constant(k): k k k on both sides;
  • Wrap: b c d before and a b c after.

Enums§

Mode
How values beyond the edge of an image are supplied (SciPy’s mode).

Functions§

mode_index
Maps an index into 0..n for a mode; None means “outside, use the constant”.
sample
The value at (r, c) of an image extended by mode.