Jump to content
  • 0

V94

Question

Hello,

I am working on video processing using Z7-20 Pcam 5c, for this I have created an IP block which converts rgb image to hsv. Now, I want to filter it to obtain only the yellow color. So for this I am trying to use the hls::range function to threshold the pixels in the range of yellow color. As per the manual, the template is as follows:

template<int ROWS, int COLS, int SRC_T, int DST_T, typename P_T>
void hls::Range (
hls::Mat<ROWS, COLS, SRC_T>& src,
hls::Mat<ROWS, COLS, DST_T>& dst,
P_T start,
P_T end);

I want to understand what does typename  P_T mean and how to define it in the header file. I am getting the following error with the current code that I have written

C:/xilinx/Vivado/2017.4/include/hls/hls_video_arithm.h: In function 'void hls::Range(hls::Mat<ROWS, COLS, SRC1_T>&, hls::Mat<ROWS, COLS, SRC2_T>&, P_T, P_T) [with int ROWS = 720, int COLS = 1280, int SRC_T = 4096, int DST_T = 4096, P_T = hls::Scalar<3, unsigned char>]':
../../../yellow_threshold.cpp:24:32:   instantiated from here
C:/xilinx/Vivado/2017.4/include/hls/hls_video_arithm.h:1042:22: error: conversion from 'hls::Scalar<3, unsigned char>' to non-scalar type 'hls::_AP_T {aka ap_fixed<64, 32, (ap_q_mode)0u>}' requested
make: *** [obj/yellow_threshold.o] Error 1
ERROR: [SIM 211-100] 'csim_design' failed: compilation error(s)

Please find the attached files for more details and suggest me how can I proceed.

Thanks

yellow_threshold.cpp yellow_threshold.h

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...