NumCpp  1.0
A C++ implementation of the Python Numpy library
Filter/Filters/Filters2d/laplace.hpp
Go to the documentation of this file.
1 #pragma once
30 
32 #include "NumCpp/NdArray.hpp"
33 
34 namespace nc
35 {
36  namespace filter
37  {
38  //============================================================================
39  // Method Description:
50  template<typename dtype>
51  NdArray<dtype> laplace(const NdArray<dtype>& inImageArray, Boundary inBoundaryType = Boundary::REFLECT, dtype inConstantValue = 0)
52  {
53  NdArray<dtype> kernel = { {0, 1, 0}, {1, -4, 1}, {0, 1, 0} };
54  return convolve(inImageArray, 3, kernel, inBoundaryType, inConstantValue);
55  }
56  }
57 }
nc::filter::laplace
NdArray< dtype > laplace(const NdArray< dtype > &inImageArray, Boundary inBoundaryType=Boundary::REFLECT, dtype inConstantValue=0)
Definition: Filter/Filters/Filters2d/laplace.hpp:51
nc::NdArray< dtype >
NdArray.hpp
nc::filter::convolve
NdArray< dtype > convolve(const NdArray< dtype > &inImageArray, uint32 inSize, const NdArray< dtype > &inWeights, Boundary inBoundaryType=Boundary::REFLECT, dtype inConstantValue=0)
Definition: convolve.hpp:63
nc::filter::Boundary::REFLECT
@ REFLECT
nc
Definition: Coordinate.hpp:45
nc::filter::Boundary
Boundary
Boundary condition to apply to the image filter.
Definition: Boundary.hpp:38
convolve.hpp