UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

取消
显示结果 
搜索替代 
您的意思是: 
Observer yanjian
Observer
212 次查看
注册日期: ‎11-28-2018

vivado hls处理图像所有像素值求和时,Sum函数怎么用?获得的值存在哪里?

 hls::Scalar<1,unsigned char> Sum(diff);

 

这样写是否正确? 求和的值存在哪里????

0 项奖励
1 条回复1
Xilinx Employee
Xilinx Employee
171 次查看
注册日期: ‎07-16-2008

回复: vivado hls处理图像所有像素值求和时,Sum函数怎么用?获得的值存在哪里?

同样请阅读UG902对于此函数的描述,调用形式为hls::Sum<type>(in),其中输入为Mat类型的image。

template<typename DST_T, int ROWS, int COLS, int SRC_T>
hls::Scalar<HLS_MAT_CN(SRC_T), DST_T> hls::Sum(
hls::Mat<ROWS, COLS, SRC_T>& src);

文档的说明是其返回值为hls::Scalar类型。

例如定义hls:Scalar<1,uint8_t> var;

val=hls::Sum<uint8_t>(in);

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------