How can I find out whether OpenCV library was compiled with TBB or CUDA or QT on Windows 7 machine? Should I use dependency walker, and if so, how? Or is there another way to find out?
OpenCV GPU module is written using CUDA, therefore it benefits from the CUDA ecosystem. There is a large community, conferences, publications, many tools and libraries developed such as NVIDIA NPP, CUFFT, Thrust. The GPU module is designed as host API extension.
You can check the build information of OpenCV with getBuildInformation() . getBuildInformation() returns build information as a string.
After installation, it is recommended that you can check the version of OpenCV that Python is using: import cv2 print cv2. __version__ # Should print 3.0. 0-rc1 or newer.
You can know it by opening a python3 REPL in cmdline:
python3
Then importing opencv:
import cv2
Then printing build information:
print(cv2.getBuildInformation())
And look for CUDA and related GPU information.
following up on dpetrini's answer, You can add whatever support to want to regex search in this to pretty-fy the outputs, instead of searching for it in the build-info outputs.
import cv2
import re
cv_info = [re.sub('\s+', ' ', ci.strip()) for ci in cv2.getBuildInformation().strip().split('\n')
if len(ci) > 0 and re.search(r'(nvidia*:?)|(cuda*:)|(cudnn*:)', ci.lower()) is not None]
print(cv_info)
['NVIDIA CUDA: YES (ver 10.0, CUFFT CUBLAS FAST_MATH)', 'NVIDIA GPU arch: 75', 'NVIDIA PTX archs:', 'cuDNN: YES (ver 7.6.5)']
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With