Thank you for the suggestions but I think the Apriltag detection code is a simple CV and Math base task, so how DeepStream Library is useful in such case?
Deploying OpenCV with CUDA does not make your application automagically use the GPU. Did you adapt your CV2 program code to utilize GPU, e.g. using cuda::GpuMat instead of Mat, setting DNN backend/target to CUDA, …)?
I think you don’t need to change the Python wrapper. its been a while since i have coded in C++ so i can‘t help you here, sorry.
Maybe this helps: Get started with OpenCV CUDA C++ · GitHub
Cuda and Opencv both installed properly but showing this error.
cudaTest.cpp:7:10: fatal error: opencv2/cudaarithm.hpp: No such file or directory
#include <opencv2/cudaarithm.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
You must rewrite your OpenCV code to use OpenCV’s cuda functionalty (eg. cv::foo(image) becomes cv::cuda::foo(image) or use DeepStream to do what you want. OpenCV is probably never going to be as performant as DeepStream on Tegra since it often require a bunch of copies between CPU and GPU to get anything done. cv::cuda just lacks a bunch of basic stuff.
You will have to build it since CUDA support is not built into the OpenCV build provided on Tegra. If you do opencv_version --verbose you’ll probably see NVIDIA CUDA: NO. Best advice I can give is not to use OpenCV on Tegra at all if you can. It only performs well on powerful x86 CPUs or doing very simple things like blob detection on arm.