Skip to content

cv::cuda::transpose() limitation #22782

Open
opencv/opencv_contrib
#3371
@chacha21

Description

@chacha21

System Information

OpenCV 4.6.0
Windows 7 64 bits
Visual Studio 2019 (latest)
NVidia CUDA SDK (10.2)

Detailed description

As claimed by the doc, CV_16UC1 is currently not supported by cv::cuda::transpose()
Internally, it is limited by CV_Assert( elemSize == 1 || elemSize == 4 || elemSize == 8 );

However, the limitation is hard to understand.

Currently, for (elemSize == 1), nppiTranspose_8u_C1R() is called

However, nppiTranspose_16u_C1R() does exist (among others). I looked at NPPI old release notes, it was already present in the CUDA SDK 8.0 (https://docs.nvidia.com/cuda/archive/8.0/pdf/NPP_Library_Image_Support_And_Data_Exchange.pdf)

Thus, I don't understand why only nppiTranspose_8u_C1R() is to be used.

Steps to reproduce

cv::cuda::GpuMat src(1, 2, CV_16UC1);
cv::cuda::GpuMat dst;
cv::cuda::transpose(src, dst);//unfortunately not supported

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

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions