 |
NumCpp
1.0
A C++ implementation of the Python Numpy library
|
Go to the documentation of this file.
58 template<
typename dtype>
68 constexpr
uint32 MIN_KERNEL_SIZE = 5;
70 if (kernelSize % 2 == 0)
75 const double kernalHalfSize =
static_cast<double>(kernelSize / 2);
79 for (
double row = 0; row < kernelSize; ++row)
81 for (
double col = 0; col < kernelSize; ++col)
83 kernel(
static_cast<uint32>(row),
static_cast<uint32>(col)) =
96 inConstantValue).template astype<dtype>();
value_type item() const
Definition: NdArrayCore.hpp:2950
double gaussian(double inX, double inY, double inSigma) noexcept
Definition: gaussian.hpp:49
std::uint32_t uint32
Definition: Types.hpp:41
NdArray< dtype > convolve(const NdArray< dtype > &inImageArray, uint32 inSize, const NdArray< dtype > &inWeights, Boundary inBoundaryType=Boundary::REFLECT, dtype inConstantValue=0)
Definition: convolve.hpp:63
NdArray< dtype > sum(Axis inAxis=Axis::NONE) const
Definition: NdArrayCore.hpp:4411
Definition: Coordinate.hpp:45
#define THROW_INVALID_ARGUMENT_ERROR(msg)
Definition: Error.hpp:37
Boundary
Boundary condition to apply to the image filter.
Definition: Boundary.hpp:38
NdArray< dtype > max(const NdArray< dtype > &inArray, Axis inAxis=Axis::NONE)
Definition: max.hpp:46
NdArray< dtype > gaussianFilter(const NdArray< dtype > &inImageArray, double inSigma, Boundary inBoundaryType=Boundary::REFLECT, dtype inConstantValue=0)
Definition: gaussianFilter.hpp:59
dtype ceil(dtype inValue) noexcept
Definition: ceil.hpp:49