I am using the ZED Stereo camera from Stereo labs to acquire rgb and depth images on Jetson TX1. However, when I try to acquire both the streams in parallel on two different threads using CUDA global function, it gives me an error “cannot call a host function in global function”.
I am using “zed->retrieveImage” function of ZED in CUDA global function to retrieve rgb image from the ZED camera. Zed header file is included in the program code.
Please give inputs if anyone has faced similar issues.
I think your error “cannot call a host function in global function” mean that you try to use a CPU method instead of using the GPU one (the global function). Try with the
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2015 NVIDIA Corporation
Built on Sun_Nov_15_11:52:02_CST_2015
Cuda compilation tools, release 7.0, V7.0.72
I am using usb 3.0 port on Jetson TX1.
I am able to view the rgb and depth streams through the zed explorer which comes with the zed sdk, that means zed is setup properly.
I am including zed/Camera.hpp file in the code and then allocating memory on the gpu for zed mat container and calling the global function from main function to retrieve rgb images.
The chunk of code shown below is what I am trying.