Hello, I would like to ask that how to pass arguments to cuda function reprojectImageTo3D?
The no cuda version works fine xyz = cv2.reprojectImageTo3D(disp.astype(np.float32), self.Q), but I want to improve the calculation speed with the cuda version function. However whatever the arguments I passed, there all has an error.
For example, I pass the GpuMat of disp and numpy array of Q, and the error is:
Traceback (most recent call last):
File "<string>", line 1, in <module>
cv2.error: OpenCV(4.5.3-openvino) :-1: error: (-5:Bad argument) in function 'reprojectImageTo3D'
> Overload resolution failed:
> - disp is not a numpy array, neither a scalar
> - Expected Ptr<cv::cuda::GpuMat> for argument 'Q'
> - Expected Ptr<cv::UMat> for argument 'disp'
Passing disp as a GpuMat does not work for me and causes the following error, that I’m not sure how to interpret:
error: OpenCV(4.5.4) /home/massimo/Downloads/opencv-4.5.4/modules/core/src/matrix_wrap.cpp:111: error: (-213:The function/feature is not implemented) You should explicitly call download method for cuda::GpuMat object in function 'getMat_'
Is it really not implemented in Python?
I’m using OpenCV 4.5.4 and the following minimal working example to understand how to use cv2.cuda.reprojectImageTo3D():
Funny I was going to ask you the same question. I’m a bit busy at the moment it was just by chance I had time yesterday to look into your post. Let me know if u don’t have time either and I’ll submit one in a couple of weeks.