II tried to compile opencv with cuda and got this error:
error: conversion from ‘cv::cuda::Stream’ to non-scalar type ‘cv::Ptrcv::cuda::Stream’ requested
39041 | Ptrcv::cuda::Stream stream=cuda::Stream::Null();
I put the following 2 commands to compile opencv with cuda:
wget -O opencv.zip https://github.com/opencv/opencv/archive/refs/tags/4.8.0.zip ; wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/refs/tags/4.8.0.zip ; unzip opencv.zip ; unzip opencv_contrib.zip ; mv opencv_contrib-4.8.0 opencv_contrib ; cd opencv-4.8.0/build/ ;
AND:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_CUDA=ON -D OPENCV_DNN_CUDA=ON -D CUDA_ARCH_BIN=7.5 -D CMAKE_C_COMPILER=/usr/bin/gcc-11 -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_opencv_python2=OFF -D BUILD_opencv_java=OFF -D PYTHON3_EXECUTABLE=/home/dani/anaconda3/bin/python3 -D WITH_TBB=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D BUILD_opencv_cudacodec=ON -D WITH_CUDNN=ON -D CUDNN_VERSION=8.9.5 -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_GSTREAMER=ON -D OPENCV_GENERATE_PKGCONFIG=YES -D OPENCV_PC_FILE_NAME=opencv.pc -D OPENCV_ENABLE_NONFREE=ON -D OPENCV_PYTHON3_INSTALL_PATH=/home/dani/anaconda3/lib/python3.11/site-packages -D PYTHON_EXECUTABLE=/home/dani/anaconda3/bin/python -D OPENCV_EXTRA_MODULES_PATH=/home/dani/opencv_contrib/modules -D INSTALL_PYTHON_EXAMPLES=OFF -D INSTALL_C_EXAMPLES=OFF -D BUILD_EXAMPLES=OFF … \
And at 99% i had the next error:
error: conversion from ‘cv::cuda::Stream’ to non-scalar type ‘cv::Ptrcv::cuda::Stream’ requested
39041 | Ptrcv::cuda::Stream stream=cuda::Stream::Null();
My Cuda version is 12.2 , my ubuntu version is 22.04, my cuDNN is 8.7.5 and opencv is 4.8
Thanks in advance for help!!!
Don’t open two issues for same problem
opened 02:04PM - 20 Sep 23 UTC
category: build/install
incomplete
### System Information
II tried to compile opencv with cuda and got this error:…
error: conversion from ‘cv::cuda::Stream’ to non-scalar type ‘cv::Ptr<cv::cuda::Stream>’ requested
39041 | Ptr<cv::cuda::Stream> stream=cuda::Stream::Null();
### Detailed description
II tried to compile opencv with cuda and got this error:
error: conversion from ‘cv::cuda::Stream’ to non-scalar type ‘cv::Ptr<cv::cuda::Stream>’ requested
39041 | Ptr<cv::cuda::Stream> stream=cuda::Stream::Null();
### Steps to reproduce
II tried to compile opencv with cuda and got this error:
error: conversion from ‘cv::cuda::Stream’ to non-scalar type ‘cv::Ptr<cv::cuda::Stream>’ requested
39041 | Ptr<cv::cuda::Stream> stream=cuda::Stream::Null();
### Issue submission checklist
- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
opened 08:13AM - 21 Sep 23 UTC
bug
### System Information
I put the following 2 commands to compile opencv with cu… da:
wget -O opencv.zip https://github.com/opencv/opencv/archive/refs/tags/4.8.0.zip ; wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/refs/tags/4.8.0.zip ; unzip opencv.zip ; unzip opencv_contrib.zip ; mv opencv_contrib-4.8.0 opencv_contrib ; cd opencv-4.8.0/build/ ;
AND:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_CUDA=ON -D OPENCV_DNN_CUDA=ON -D CUDA_ARCH_BIN=7.5 -D CMAKE_C_COMPILER=/usr/bin/gcc-11 -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_opencv_python2=OFF -D BUILD_opencv_java=OFF -D PYTHON3_EXECUTABLE=/home/dani/anaconda3/bin/python3 -D WITH_TBB=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D BUILD_opencv_cudacodec=ON -D WITH_CUDNN=ON -D CUDNN_VERSION=8.9.5 -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_GSTREAMER=ON -D OPENCV_GENERATE_PKGCONFIG=YES -D OPENCV_PC_FILE_NAME=opencv.pc -D OPENCV_ENABLE_NONFREE=ON -D OPENCV_PYTHON3_INSTALL_PATH=/home/dani/anaconda3/lib/python3.11/site-packages -D PYTHON_EXECUTABLE=/home/dani/anaconda3/bin/python -D OPENCV_EXTRA_MODULES_PATH=/home/dani/opencv_contrib/modules -D INSTALL_PYTHON_EXAMPLES=OFF -D INSTALL_C_EXAMPLES=OFF -D BUILD_EXAMPLES=OFF … \
And at 99% i had the next error:
error: conversion from ‘cv::cuda::Stream’ to non-scalar type ‘cv::Ptrcv::cuda::Stream’ requested
39041 | Ptrcv::cuda::Stream stream=cuda::Stream::Null();
My Cuda version is 12.2 , my ubuntu version is 22.04, my cuDNN is 8.7.5 and opencv is 4.8
Thanks in advance for help!!!
### Detailed description
I put the following 2 commands to compile opencv with cuda:
wget -O opencv.zip https://github.com/opencv/opencv/archive/refs/tags/4.8.0.zip ; wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/refs/tags/4.8.0.zip ; unzip opencv.zip ; unzip opencv_contrib.zip ; mv opencv_contrib-4.8.0 opencv_contrib ; cd opencv-4.8.0/build/ ;
AND:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_CUDA=ON -D OPENCV_DNN_CUDA=ON -D CUDA_ARCH_BIN=7.5 -D CMAKE_C_COMPILER=/usr/bin/gcc-11 -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_opencv_python2=OFF -D BUILD_opencv_java=OFF -D PYTHON3_EXECUTABLE=/home/dani/anaconda3/bin/python3 -D WITH_TBB=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D BUILD_opencv_cudacodec=ON -D WITH_CUDNN=ON -D CUDNN_VERSION=8.9.5 -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_GSTREAMER=ON -D OPENCV_GENERATE_PKGCONFIG=YES -D OPENCV_PC_FILE_NAME=opencv.pc -D OPENCV_ENABLE_NONFREE=ON -D OPENCV_PYTHON3_INSTALL_PATH=/home/dani/anaconda3/lib/python3.11/site-packages -D PYTHON_EXECUTABLE=/home/dani/anaconda3/bin/python -D OPENCV_EXTRA_MODULES_PATH=/home/dani/opencv_contrib/modules -D INSTALL_PYTHON_EXAMPLES=OFF -D INSTALL_C_EXAMPLES=OFF -D BUILD_EXAMPLES=OFF … \
And at 99% i had the next error:
error: conversion from ‘cv::cuda::Stream’ to non-scalar type ‘cv::Ptrcv::cuda::Stream’ requested
39041 | Ptrcv::cuda::Stream stream=cuda::Stream::Null();
My Cuda version is 12.2 , my ubuntu version is 22.04, my cuDNN is 8.7.5 and opencv is 4.8
Thanks in advance for help!!!
### Steps to reproduce
I put the following 2 commands to compile opencv with cuda:
wget -O opencv.zip https://github.com/opencv/opencv/archive/refs/tags/4.8.0.zip ; wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/refs/tags/4.8.0.zip ; unzip opencv.zip ; unzip opencv_contrib.zip ; mv opencv_contrib-4.8.0 opencv_contrib ; cd opencv-4.8.0/build/ ;
AND:
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_CUDA=ON -D OPENCV_DNN_CUDA=ON -D CUDA_ARCH_BIN=7.5 -D CMAKE_C_COMPILER=/usr/bin/gcc-11 -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_opencv_python2=OFF -D BUILD_opencv_java=OFF -D PYTHON3_EXECUTABLE=/home/dani/anaconda3/bin/python3 -D WITH_TBB=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D BUILD_opencv_cudacodec=ON -D WITH_CUDNN=ON -D CUDNN_VERSION=8.9.5 -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_GSTREAMER=ON -D OPENCV_GENERATE_PKGCONFIG=YES -D OPENCV_PC_FILE_NAME=opencv.pc -D OPENCV_ENABLE_NONFREE=ON -D OPENCV_PYTHON3_INSTALL_PATH=/home/dani/anaconda3/lib/python3.11/site-packages -D PYTHON_EXECUTABLE=/home/dani/anaconda3/bin/python -D OPENCV_EXTRA_MODULES_PATH=/home/dani/opencv_contrib/modules -D INSTALL_PYTHON_EXAMPLES=OFF -D INSTALL_C_EXAMPLES=OFF -D BUILD_EXAMPLES=OFF … \
And at 99% i had the next error:
error: conversion from ‘cv::cuda::Stream’ to non-scalar type ‘cv::Ptrcv::cuda::Stream’ requested
39041 | Ptrcv::cuda::Stream stream=cuda::Stream::Null();
My Cuda version is 12.2 , my ubuntu version is 22.04, my cuDNN is 8.7.5 and opencv is 4.8
Thanks in advance for help!!!
### Issue submission checklist
- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
Sorry, i am New in dev, i will remove The second
I am currently unable to reproduce your error when I use the same config excluding the following options
-D CUDNN_VERSION=8.9.5 -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D WITH_GSTREAMER=ON
I get the error mentioned in
opened 02:04PM - 20 Sep 23 UTC
closed 06:57AM - 28 Oct 23 UTC
bug
category: python bindings
category: build/install
category: gpu/cuda (contrib)
### System Information
II tried to compile opencv with cuda and got this error:…
error: conversion from ‘cv::cuda::Stream’ to non-scalar type ‘cv::Ptr<cv::cuda::Stream>’ requested
39041 | Ptr<cv::cuda::Stream> stream=cuda::Stream::Null();
### Detailed description
II tried to compile opencv with cuda and got this error:
error: conversion from ‘cv::cuda::Stream’ to non-scalar type ‘cv::Ptr<cv::cuda::Stream>’ requested
39041 | Ptr<cv::cuda::Stream> stream=cuda::Stream::Null();
### Steps to reproduce
II tried to compile opencv with cuda and got this error:
error: conversion from ‘cv::cuda::Stream’ to non-scalar type ‘cv::Ptr<cv::cuda::Stream>’ requested
39041 | Ptr<cv::cuda::Stream> stream=cuda::Stream::Null();
### Issue submission checklist
- [X] I report the issue, it's not a question
- [X] I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- [X] I updated to the latest OpenCV version and the issue is still there
- [X] There is reproducer code and related data files (videos, images, onnx, etc)
due to using OpenCV 4.8.0 with CUDA 12.2 but not
Can you post your configuration output and more of the build output regarding the error, specifically do you know which OpenCV module is causing this error? e.g. do you get the error with
cmake --build /home/dani/opencv-4.8.0/build/ --target opencv_core