xpad¶
Defined in xtensor/xpad.hpp
-
enum
xt::pad_mode¶ Defines different algorithms to be used in
xt::pad:constant: Pads with a constant value.symmetric: Pads with the reflection of the vector mirrored along the edge of the array.reflect: Pads with the reflection of the vector mirrored on the first and last values of the vector along each axis.wrap: Pads with the wrap of the vector along the axis. The first values are used to pad the end and the end values are used to pad the beginning.periodic:== wrap(pads with periodic repetitions of the vector).
OpenCV to xtensor:
BORDER_CONSTANT == constantBORDER_REFLECT == symmetricBORDER_REFLECT_101 == reflectBORDER_WRAP == wrap
Values:
-
constant¶
-
symmetric¶
-
reflect¶
-
wrap¶
-
periodic¶
- template <class E, class S = typename std::decay_t<E>::size_type, class V = typename std::decay_t<E>::value_type>
-
auto
xt::pad(E &&e, const std::vector<std::vector<S>> &pad_width, pad_mode mode = pad_mode::constant, V constant_value = 0) Pad an array.
- Return
- The padded array.
- Parameters
e: The array.pad_width: Number of values padded to the edges of each axis:{{before_1, after_1}, ..., {before_N, after_N}}.mode: The type of algorithm to use. [default:xt::pad_mode::constant].constant_value: The value to set the padded values for each axis (used inxt::pad_mode::constant).
- template <class E, class S = typename std::decay_t<E>::size_type, class V = typename std::decay_t<E>::value_type>
-
auto
xt::pad(E &&e, const std::vector<S> &pad_width, pad_mode mode = pad_mode::constant, V constant_value = 0) Pad an array.
- Return
- The padded array.
- Parameters
e: The array.pad_width: Number of values padded to the edges of each axis:{before, after}.mode: The type of algorithm to use. [default:xt::pad_mode::constant].constant_value: The value to set the padded values for each axis (used inxt::pad_mode::constant).
- template <class E, class S = typename std::decay_t<E>::size_type, class V = typename std::decay_t<E>::value_type>
-
auto
xt::pad(E &&e, S pad_width, pad_mode mode = pad_mode::constant, V constant_value = 0) Pad an array.
- Return
- The padded array.
- Parameters
e: The array.pad_width: Number of values padded to the edges of each axis.mode: The type of algorithm to use. [default:xt::pad_mode::constant].constant_value: The value to set the padded values for each axis (used inxt::pad_mode::constant).
- template <class E, class S = typename std::decay_t<E>::size_type>
-
auto
xt::tile(E &&e, std::initializer_list<S> reps) Tile an array.
- Return
- The tiled array.
- Parameters
e: The array.reps: The number of repetitions of A along each axis.
- template <class E, class S = typename std::decay_t<E>::size_type, xtl::check_concept< xtl::is_integral< S > > = 0>
-
auto
xt::tile(E &&e, S reps) Tile an array.
- Return
- The tiled array.
- Parameters
e: The array.reps: The number of repetitions of A along the first axis.