46 template<
typename dtype>
52 uint32 boundarySize = inSize / 2;
54 inShape.
rows -= boundarySize * 2;
55 inShape.
cols -= boundarySize * 2;
57 return inImageWithBoundary(
Slice(boundarySize, boundarySize + inShape.
rows),
58 Slice(boundarySize, boundarySize + inShape.
cols));
#define STATIC_ASSERT_ARITHMETIC(dtype)
Definition: StaticAsserts.hpp:39
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:139
const Shape & shape() const noexcept
Definition: NdArrayCore.hpp:4511
A Shape Class for NdArrays.
Definition: Core/Shape.hpp:41
uint32 rows
Definition: Core/Shape.hpp:44
uint32 cols
Definition: Core/Shape.hpp:45
A Class for slicing into NdArrays.
Definition: Slice.hpp:45
Definition: addBoundary1d.hpp:44
NdArray< dtype > trimBoundary2d(const NdArray< dtype > &inImageWithBoundary, uint32 inSize)
Definition: trimBoundary2d.hpp:47
std::uint32_t uint32
Definition: Types.hpp:40