cyrusbehr / tensorrt-cpp-api

TensorRT C++ API Tutorial
MIT License
543 stars 66 forks source link

OpenCV CPU #59

Closed adrianosantospb closed 1 month ago

adrianosantospb commented 1 month ago

Hello, everyone.

For some reason that I don't know, I can't install OpenCV with GPU support on my Jetson NX board. I believe it has something specifically to do with the versions I am using, but I cannot update them right now. With the latest versions of Jetson Pack, CUDA, and cuDNN, I can install OpenCV with GPU support and run the code. But the version I need has:

L4T 32.7.4 Ubuntu 18.04.6 LTS Kernel Version: 4.9.337-tegra CUDA 10.2.311 CUDNN: 8.2.1.32

But it seems there is some compatibility issue... So, my question is: is there any version/way to use only the CPU version of OpenCV, or even remove this dependency in the code?

Thank you.

cyrusbehr commented 1 month ago

It would take a fair amount of rework to be honest. No easy or fast solution. You can keep data in RAM, do all pre-processing, and then use cudaMalloc to allocate GPU memory and cudaMemcpy to copy transfer the data to the allocated buffer.