Skip to content

Instantly share code, notes, and snippets.

View basilevh's full-sized avatar

Basile Van Hoorick basilevh

  • Columbia University
  • New York City
View GitHub Profile
@basilevh
basilevh / bilateral_filter_test.cpp
Last active April 27, 2020 18:38
Vivado HLS test bench for a 2D filter, showing how to convert an image to a stream and vice versa.
// Basile Van Hoorick, April 2020
#include "hls_opencv.h"
// (NOTE: the defined constants and included imports in this gist might be incomplete, but shouldn't be too hard to infer)
int test_bf()
{
cv::Mat src = cv::imread(INPUT_PATH, CV_LOAD_IMAGE_GRAYSCALE);
cv::Mat dst = cv::Mat(DHEIGHT, DWIDTH, CV_8U);