template<int ROWS, int COLS, int SRC_T, int DST_T, int K_ROWS, int K_COLS, typename K_T, typename POINT_T>
void hls::Filter2D( hls::Mat<ROWS, COLS, SRC_T>& src,
                    hls::Mat<ROWS, COLS, DST_T>& dst,
                    hls::Window<K_ROWS, K_COLS, K_T>& kernel,
                    hls::Point_<POINT_T> anchor );


  • src – the input image.
  • dst – the output image.
  • kernel –kernel of 2D filtering, defined by hls::Window class.
  • anchor – anchor of the kernel that indicates the relative position of a filtered point within the kernel.


Applies an arbitrary linear filter to the image image srcusing the specified kernel,and save the result to image dst.This function filters the image by computing correlation using kernel:
Image data must be stored in src, the image data of dst must be empty before invocations. Invoking this function will consume the data in src, and filling the image data of dst.
src and dstmust have the same size and number of channels.

OpenCV reference

cvFilter2D, cv::filter2D