Dear all,
I run into errors for testing testing opencv cuda.
Python 3.7.1 (default, Dec 14 2018, 19:28:38)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type “help”, “copyright”, “credits” or “license” for more information.
img = cv2.imread(“image.png”, cv2.IMREAD_GRAYSCALE)
Traceback (most recent call last):
File “”, line 1, in
NameError: name ‘cv2’ is not defined
import cv2
img = cv2.imread(“image.png”, cv2.IMREAD_GRAYSCALE)
libpng warning: Application built with libpng-1.6.35 but running with 1.5.13
src = cv2.cuda_GpuMat()
src.upload(img)
clahe = cv2.cuda.createCLAHE(clipLimit=5.0, tileGridSize=(8, 8))
dst = clahe.apply(src, cv2.cuda_Stream.Null())
Traceback (most recent call last):
File “”, line 1, in
cv2.error: OpenCV(4.5.1) /usr/public/pytorch/source/OpenCV-gpu/opencv_contrib-4.5.1/modules/cudaimgproc/src/cuda/clahe.cu:398: error: (-217:Gpu API call) invalid configuration argument in function ‘transform’
I build OpenCV (4,5.1) with cuda10.0/toolkit/10.0.130 , gcc7.4 and Anaconda on linux cluster successfully. GPU is NVIDIA V100, I did cmake with CUDA_ARCH_BIN=7.0
My basic configuration file as below:
– Unavailable: alphamat cnn_3dobj cvv freetype java julia matlab ovis python2 sfm viz
- NVIDIA CUDA: YES (ver 10.0, CUFFT CUBLAS FAST_MATH)
– NVIDIA GPU arch: 70
– NVIDIA PTX archs:
– cuDNN: YES (ver 7.6.5)
– OpenCL: YES (no extra features)
– Include path: /opencv-4.5.1/3rdparty/include/opencl/1.2
– Link libraries: Dynamic load
– Python 3:
/anaconda3/bin/python3 (ver 3.7.1)
– Libraries: /anaconda3/lib (ver 3.7.1)
– numpy: /anaconda3/lib/python3.7/site-packages/numpy/core/include/numpy (ver 1.15.4)
– install path: lib/python3.7/site-packages/cv2/python-3.7
–
– Python (for build): /anaconda3/bin/python3
– Install to: /anaconda3
Any suggestion for fixing this problem? Appreciate your help!
Thanks!
Wei