Skip to content

cv.cuda.GpuMat.convertTo failed to convert data types #24038

@d597797974

Description

@d597797974

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)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions