17 #ifndef _TEST_COMMON_H_
18 #define _TEST_COMMON_H_
23 #include <hls_stream.h>
25 #include "../../harris/include/harris.hpp"
27 #ifdef ROLE_IS_MEDIANBLUR
28 #include "../../median_blur/include/median_blur.hpp"
30 #ifdef ROLE_IS_WARPTRANSFORM
31 #include "../../warp_transform/include/warp_transform.hpp"
34 #include "common/xf_headers.hpp"
37 #include "../../harris/include/xf_harris_config.h"
38 #include "../../harris/include/xf_ocv_ref.hpp"
40 #ifdef ROLE_IS_MEDIANBLUR
41 #include "../../median_blur/include/xf_median_blur_config.h"
42 #include "../../median_blur/include/xf_ocv_ref.hpp"
44 #ifdef ROLE_IS_WARPTRANSFORM
45 #include "../../warp_transform/include/xf_warp_transform_config.h"
46 #include "../../warp_transform/include/xf_ocv_ref.hpp"
55 #define THIS_NAME "TB"
57 #define TRACE_OFF 0x0000
58 #define TRACE_URIF 1 << 1
59 #define TRACE_UAF 1 << 2
60 #define TRACE_MMIO 1 << 3
61 #define TRACE_ALL 0xFFFF
63 #define DEBUG_LEVEL (TRACE_ALL)
73 #define DEBUG_TRACE true
75 #define ENABLED (ap_uint<1>)1
76 #define DISABLED (ap_uint<1>)0
90 const std::string inpFileName,
int simCnt);
143 const std::string dataStreamName,
const std::string outFileName,
int simCnt);
154 const std::string outFileName,
int simCnt);
163 std::vector<cv::Point>& hls_points,
164 std::vector<cv::Point>& ocv_points,
165 std::vector<cv::Point>& common_pts);
173 void markPointsOnImage(xf::cv::Mat<OUT_TYPE, HEIGHT, WIDTH, NPIX>& imgOutput, cv::Mat& in_img,
174 cv::Mat& out_img, std::vector<cv::Point>& hls_points);
ap_uint< 64 > pack_ap_uint_64_(ap_uint< 8 > *buffer)
Pack an array of 8 x ap_uint<8> into a ap_uint<64> word.
bool setInputDataStream(stream< UdpWord > &sDataStream, const std::string dataStreamName, const std::string inpFileName, int simCnt)
Initialize an input data stream from a file.
bool readDataStream(stream< UdpWord > &sDataStream, UdpWord *udpWord)
Read data from a stream.
bool dumpDataToFile(UdpWord *udpWord, std::ofstream &outFileStream)
Dump a data word to a file.
bool getOutputDataStream(stream< UdpWord > &sDataStream, const std::string dataStreamName, const std::string outFileName, int simCnt)
Fill an output file with data from an output stream.
unsigned int writeCornersIntoFile(cv::Mat &in_img, cv::Mat &ocv_out_img, cv::Mat &out_img, std::vector< cv::Point > &hls_points, std::vector< cv::Point > &ocv_points, std::vector< cv::Point > &common_pts)
Write the corners found by Harris into a file.
bool dumpImgToFile(xf::cv::Mat< OUT_TYPE, HEIGHT, WIDTH, NPIX > &_img, const std::string outFileName, int simCnt)
Fill an output file with data from an image.
void markPointsOnImage(xf::cv::Mat< OUT_TYPE, HEIGHT, WIDTH, NPIX > &imgOutput, cv::Mat &in_img, cv::Mat &out_img, std::vector< cv::Point > &hls_points)
Mark the points found by Harris into the image.
bool setInputFileToArray(const std::string inpFileName, ap_uint< OUTPUT_PTR_WIDTH > *imgArray, int simCnt)
Initialize an input array from a file with format "tdata tkeep tlast".