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!

取消
显示结果 
搜索替代 
您的意思是: 
Highlighted
Observer zhengjia
Observer
195 次查看
注册日期: ‎07-24-2018

xfopencv 中xf::resize()问题

转到解答

在xfopencv例子中用xf::resize()函数,

makefile中描述为-sds-hw "xf::resize <2,  0, 2160, 3840,1080,1920, 1, 2>"  xf_resize_accel.cpp -files ../../include/imgproc/xf_resize.hpp -clkid 2 -sds-end -dmclkid 2

把xf_resize_tb.cpp中第69行改为static xf::Mat<TYPE, 480, 640, NPC1> imgOutput(480,640);编译过程中会报错,错误如下


[zhengjia@hw53 resize]$ make
sds++ -sds-pf /home/zhengjia/SDSoc/platform183/zcu102_rv_ss/ -sds-hw "xf::resize <2, 0, 2160, 3840,1080,1920, 1, 2>" xf_resize_accel.cpp -files ../../include/imgproc/xf_resize.hpp -clkid 2 -sds-end -dmclkid 2 -O0 -Wall -c -I. -I/home/zhengjia/SDSoc/platform183/zcu102_rv_ss/sw/a53_linux/a53_linux/sysroot/aarch64-xilinx-linux//usr/include -I ../../include -DHLS_NO_XIL_FPO_LIB -mstrict-align -hls-target 1 xf_resize_tb.cpp -o xf_resize_tb.o
Platform system configuration option -sds-sys-config was not specified, searching for a configuration that uses the specified OS linux
Using system configuration -sds-sys-config a53_linux
Analyzing source for RTL template usage
/home/zhengjia/SDSoc/sdsoc183/xfopencv/xfopencv/examples/resize/xf_resize_tb.cpp:80:2: error: no matching function for call to 'resize_accel'
resize_accel(imgInput, imgOutput);
^~~~~~~~~~~~
./xf_resize_config.h:49:6: note: candidate function not viable: no known conversion from 'xf::Mat<XF_8UC1, 480, 640, XF_NPPC1>' to 'xf::Mat<XF_8UC1, 1080, 1920, XF_NPPC1> &' for 2nd argument
void resize_accel(xf::Mat<TYPE, HEIGHT, WIDTH, NPC1> &_src, xf::Mat<TYPE, NEWHEIGHT, NEWWIDTH, NPC1> &_dst);
^
Error while processing /home/zhengjia/SDSoc/sdsoc183/xfopencv/xfopencv/examples/resize/xf_resize_tb.cpp.
ERROR: [TemplateExtract 83-3509] Failed to run clang frontend action of rtl_template_extract!
ERROR: [SdsCompiler 83-5176] RTL template analysis exited with non-zero code processing /home/zhengjia/SDSoc/sdsoc183/xfopencv/xfopencv/examples/resize/xf_resize_tb.cpp
sds++ log file saved as /home/zhengjia/SDSoc/sdsoc183/xfopencv/xfopencv/examples/resize/_sds/reports/sds_xf_resize_tb.log
ERROR: [SdsCompiler 83-5004] Build failed

make: *** [xf_resize_tb.o] Error 1

 

请问如果makefile中描述的转换图像大小确定后,就不能再改变resize输出的图像大小吗?必须输出设置为1080*1920吗?不支持输出大小大小的任意变换?附件为压缩包,其它文件未改动

0 项奖励
1 个已接受解答

已接受的解答
Xilinx Employee
Xilinx Employee
132 次查看
注册日期: ‎05-11-2010

回复: xfopencv 中xf::resize()问题

转到解答

你可以这样试一下么?

static xf::Mat<TYPE, NEWHEIGHT, NEWWIDTH, NPC1> imgOutput(480,640);

1 条回复
Xilinx Employee
Xilinx Employee
133 次查看
注册日期: ‎05-11-2010

回复: xfopencv 中xf::resize()问题

转到解答

你可以这样试一下么?

static xf::Mat<TYPE, NEWHEIGHT, NEWWIDTH, NPC1> imgOutput(480,640);