Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Using cv::cudacodec::createVideoReader()

Hi!

I've decided to start using the OpenCV 3.2 CUDA interface and I want to use the cv::cudacodec::createVideoWriter() function and writer->write(gpu_frame) to write directly from the GPU memory. I've successfully built OpenCV 3.2 with CUDA 8.0 and the flags WITH_CUBLAS, WITH_CUDA and WITH_NCUVID. I have also successfully read directly into the GPU memory using the cv::cudacodec::createVideoReader() function and reader->nextFrame(gpu_frame).

My problem arises when I try to create a writer to the GPU memory using cv::cudacodec::createVideoWriter(). I then get an unhandled exception and an OpenCV Error saying:

OpenCV Error: The function/feature is not implemented (The called functionality is disabled for current build or platform) in throw_no_cuda, file C;\opencv\source\modules\core\include\opencv2/core/private.cuda.hpp, line 101

To me this sounds as if I am missing a package in my build of OpenCV, but I thought that cv::cudacodec:createVideoWriter() was included in NCUVID. This seems pretty strange to me, but maybe some of you guys know more about this? Any help at all is appreciated!

PS: I have also overwritten the version of CUDA 8.0 to include cuDNN. I dont know if this makes any difference, but I thought I'd mention it.

Using cv::cudacodec::createVideoReader()

Hi!

I've decided to start using the OpenCV 3.2 CUDA interface and I want to use the cv::cudacodec::createVideoWriter() function and writer->write(gpu_frame) to write directly from the GPU memory. I've successfully built OpenCV 3.2 with CUDA 8.0 and the flags WITH_CUBLAS, WITH_CUDA and WITH_NCUVID. I have also successfully read directly into the GPU memory using the cv::cudacodec::createVideoReader() function and reader->nextFrame(gpu_frame).

My problem arises when I try to create a writer to the GPU memory using cv::cudacodec::createVideoWriter(). I then get an unhandled exception and an OpenCV Error saying:

OpenCV Error: The function/feature is not implemented (The called functionality is disabled for current build or platform) in throw_no_cuda, file C;\opencv\source\modules\core\include\opencv2/core/private.cuda.hpp, line 101

To me this sounds as if I am missing a package in my build of OpenCV, but I thought that cv::cudacodec:createVideoWriter() was included in NCUVID. This seems pretty strange to me, but maybe some of you guys know more about this? Any help at all is appreciated!

PS: I have also overwritten the version of CUDA 8.0 to include cuDNN. I dont know if this makes any difference, but I thought I'd mention it.

it.

EDIT: Added the OpenCV 3.2 buildlog output.

General configuration for OpenCV 3.2.0-dev ===================================== Version control: 3.2.0-131-gece3fac-dirty

Extra modules: Location (extra): C:/opencv/opencv_contrib/modules Version control (extra): 3.2.0-54-gd879ea4

Platform: Timestamp: 2017-02-09T09:54:34Z Host: Windows 10.0.14393 AMD64 CMake: 3.7.2 CMake generator: Visual Studio 14 2015 Win64 CMake build tool: C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe MSVC: 1900

C/C++: Built as dynamic libs?: YES C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe (ver 19.0.24210.0) C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /wd4324 /wd4275 /wd4589 /MP4 /MD /O2 /Ob2 /DNDEBUG /Zi C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /EHa /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /wd4251 /wd4324 /wd4275 /wd4589 /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 C Compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP4 /MD /O2 /Ob2 /DNDEBUG /Zi C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /MP4 /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 Linker flags (Release): /machine:x64 /INCREMENTAL:NO /debug Linker flags (Debug): /machine:x64 /debug /INCREMENTAL ccache: NO Precompiled headers: NO Extra dependencies: vfw32 C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64/cuda.lib C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64/nvcuvid.lib comctl32 gdi32 ole32 setupapi ws2_32 glu32 opengl32 cudart nppc nppi npps cublas cufft -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64 3rdparty dependencies: libprotobuf zlib libjpeg libwebp libpng libtiff libjasper IlmImf

OpenCV modules: To be built: cudev core cudaarithm flann imgproc ml video cudabgsegm cudafilters cudaimgproc cudawarping dnn imgcodecs photo shape videoio cudacodec highgui objdetect xobjdetect features2d calib3d cudafeatures2d cudalegacy cudaobjdetect cudaoptflow cudastereo superres videostab xfeatures2d ximgproc optflow stitching world ts Disabled: aruco bgsegm bioinspired ccalib cnn_3dobj contrib_world datasets dpm face fuzzy line_descriptor phase_unwrapping plot reg rgbd saliency stereo structured_light surface_matching text tracking xphoto Disabled by dependency: - Unavailable: java python2 python3 viz cvv freetype hdf matlab sfm

Non-free algorithms are enabled

Windows RT support: NO

GUI: QT: NO Win32 UI: YES OpenGL support: YES (glu32 opengl32) VTK support: NO

Media I/O: ZLib: build (ver 1.2.8) JPEG: build (ver 90) WEBP: build (ver 0.3.1) PNG: build (ver 1.6.24) TIFF: build (ver 42 - 4.0.2) JPEG 2000: build (ver 1.900.1) OpenEXR: build (ver 1.7.1) GDAL: NO GDCM: NO

Video I/O: Video for Windows: YES DC1394 1.x: NO DC1394 2.x: NO FFMPEG: YES (prebuilt binaries) avcodec: YES (ver 57.64.101) avformat: YES (ver 57.56.100) avutil: YES (ver 55.34.100) swscale: YES (ver 4.2.100) avresample: YES (ver 3.1.0) GStreamer: NO OpenNI: NO OpenNI PrimeSensor Modules: NO OpenNI2: NO PvAPI: NO GigEVisionSDK: NO DirectShow: YES Media Foundation: NO XIMEA: NO Intel PerC: NO

Parallel framework: Concurrency

Other third-party libraries: Use IPP: 9.0.1 [9.0.1] at: C:/opencv/build/3rdparty/ippicv/ippicv_win Use IPP Async: NO Use Lapack: NO Use Eigen: NO Use Cuda: YES (ver 8.0) Use OpenCL: YES Use OpenVX: NO Use custom HAL: NO

NVIDIA CUDA Use CUFFT: YES Use CUBLAS: YES USE NVCUVID: YES NVIDIA GPU arch: 50 52 NVIDIA PTX archs: Use fast math: NO

OpenCL: <dynamic loading="" of="" opencl="" library=""> Include path: C:/opencv/source/3rdparty/include/opencl/1.2 Use AMDFFT: NO Use AMDBLAS: NO

Python 2: Interpreter: C:/Python27/python.exe (ver 2.7.12)

Python 3: Interpreter: NO

Python (for build): C:/Python27/python.exe

Java: ant: NO JNI: NO Java wrappers: NO Java tests: NO

Matlab: Matlab not found or implicitly disabled

Documentation: Doxygen: NO

Tests and samples: Tests: NO Performance tests: NO C/C++ Examples: NO

Install path: C:/opencv/build/install

cvconfig.h is in: C:/opencv/build