-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
cv.cuda.GpuMat.convertTo failed to convert data types #24038
Copy link
Copy link
Closed
Labels
bugcategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contrib
Description
System Information
// example for python user
OpenCV python version: 4.7.0
Operating System / Platform: Ubuntu 18.04
Python version: 3.7.16
Detailed description
image = frame.convertTo(cv2.CV_32F)
cv2.error: OpenCV(4.7.0) /data/work/opencv-cuda-4.7.0/opencv-4.7.0/modules/core/src/matrix_wrap.cpp:342: error: (-213:The function/feature is not implemented) getGpuMat is available only for cuda::GpuMat and cuda::HostMem in function 'getGpuMat'
I use cv2. Cudacodec. CreateVideoReader() read the video streaming, Mat type for <cv2.cuda.GpuMat 0x7f826b934a50>; The data type is 8UC4 and I tried to convert the data type to float32 but got an error
Steps to reproduce
cap = cv2.cudacodec.createVideoReader(file_path)
ret, frame = cap.nextFrame()
image = frame.convertTo(cv2.CV_32F)
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugcategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contrib