NumCpp  2.8.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Filter/Filters/Filters2d/laplace.hpp
Go to the documentation of this file.
1 #pragma once
29 
31 #include "NumCpp/NdArray.hpp"
32 
33 namespace nc
34 {
35  namespace filter
36  {
37  //============================================================================
38  // Method Description:
49  template<typename dtype>
50  NdArray<dtype> laplace(const NdArray<dtype>& inImageArray,
51  Boundary inBoundaryType = Boundary::REFLECT,
52  dtype inConstantValue = 0)
53  {
54  NdArray<dtype> kernel = { { 0, 1, 0 }, { 1, -4, 1 }, { 0, 1, 0 } };
55  return convolve(inImageArray, 3, kernel, inBoundaryType, inConstantValue);
56  }
57  } // namespace filter
58 } // namespace nc
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition: NdArrayCore.hpp:72
NdArray< dtype > laplace(const NdArray< dtype > &inImageArray, Boundary inBoundaryType=Boundary::REFLECT, dtype inConstantValue=0)
Definition: Filter/Filters/Filters2d/laplace.hpp:50
NdArray< dtype > convolve(const NdArray< dtype > &inImageArray, uint32 inSize, const NdArray< dtype > &inWeights, Boundary inBoundaryType=Boundary::REFLECT, dtype inConstantValue=0)
Definition: convolve.hpp:62
Boundary
Boundary condition to apply to the image filter.
Definition: Boundary.hpp:38
Definition: Coordinate.hpp:45