OpenCV4Tegra doesn't support GPU

Hello, It seems that OpenCV4Tegra doesn’t support GPU.
I ran the same code with ros-kinetic-opencv3, I get the frame per second about 3 to 4.12
then, OpenCV4Tegra, I get the frame per second about 3 to 4.64

what is wrong?

my system:

L4T 28.2.1 [ 3.2.1 ]
Board: t186ref
Ubuntu 16.04.6 LTS
Kernel Version: 4.4.38-tegra
CUDA 9.0.252

Thank you for your help

Hi red8341h,

Opencv in jetpack has disabled gpu for long time. If you want opencv with gpu enabled, please download upstream opencv and install it with gpu enabled manually.

Thanks, WayneWWW,

I read an old post, he mentioned this “you can use OpenCV4Tegra and get the best performance”

I am following this but I am not sure if it works with me or not???

I get another one

but both, they didn’t add the opencv_contrib

Please try the installation script written by my colleague.

I’d like to try it but I also didn’t see the opencv_contrib in the script of your colleague.

all of needed, download it, then run the command:


for JetsonTX2, right?

The new version has contrib enabled. Not sure if this matches your request.

Actually, I think you could also reach opencv forum for more info.

Thank you so much, WayneWWW,

I saw opencv_contrib within it.

but can I use for JetsonTX2 without any problem? if YES?

I will use it immediately

I downloaded it, then I modified version from 4.0.0 to 3.4.0 , also CUDA_ARCH_BIN=“7.2” to CUDA_ARCH_BIN=“6.2”

finally, I tried to run it:


I get this output:

Usage: ./ <Install Folder>

what is wrong?

I get it

I built OpenCV from source but I didn’t note any difference between ros-kinetic-opencv3 and opncv with gpu
the same frame per second about 3- 4.86

what is wrong???

Python 2.7.12 (default, Oct  8 2019, 14:14:10) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
sudo ./tegrastats 
RAM 1238/7846MB (lfb 1339x4MB) CPU [0%@345,off,off,0%@345,1%@345,1%@345] EMC_FREQ 15%@204 GR3D_FREQ 0%@140 APE 150 BCPU@45.5C MCPU@45.5C GPU@44C PLL@45.5C Tboard@40C Tdiode@43C PMIC@100C thermal@44.9C VDD_IN 1757/1816 VDD_CPU 229/202 VDD_GPU 152/152 VDD_SOC 381/392 VDD_WIFI 57/78 VDD_DDR 443/441

any ideas or suggestions?

Replied your question in