So, I have been trying to use VPI for stereo disparity estimation with CUDA backend. I have encountered two specific problems:
- The parameter
VPIStereoDisparityEstimatorParamsstruct cannot be set to a value greater than 64. The documentation for CUDA backend does not mention any limitation on the value of this parameter. When a higher value than 64 is used, the stream seems to execute, but the output image contains all zeros. How to solve this issue?
- I tried to extend the disparity estimation sample for a zed camera (I can share the script if needed) but encountered the error
vpiStreamSync(stream)was called. The explanation for this error type says that it usually occurs if there no context bound to the current thread. Using gdb, I found that zed-sdk launches its own threads when the camera is initialized. This somehow causes the context of the current thread to be lost. I created a context, following the KLT tracker example and called
vpioperation to make sure that all operations occur in the same context, but still no luck. I have a vague idea that zed-sdk invokes cuda runtime library which maybe causing this problem to persist even after a context creation. I don’t know how to make the context persistent. Please help!