Skip to content

make cuda::GpuMatND compatible with InputArray/OutputArray #23913

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from

Conversation

chacha21
Copy link
Contributor

@chacha21 chacha21 commented Jul 3, 2023

continuation of PR#19259

Make cuda::GpuMatND wrappable in InputArray/OutputArray
The goal for now is just wrapping, some functions are not supported (InputArray::size(), InputArray::convertTo(), InputArray::assign()...)

No new feature for cuda::GpuMatND

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

chacha21 added 2 commits July 3, 2023 18:29
continuation of  PR#19259 (opencv@ddebc2c)

No new feature for cuda::GpuMatND
code was unintentionally removed
@opencv-alalek opencv-alalek added the pr: needs test New functionality requires minimal tests set label Jul 14, 2023
@chacha21
Copy link
Contributor Author

I was about to start writing tests but... could not find what should be tested.
Can you describe me the kind of regressions to track ?

@RezaHajimohammadi
Copy link

Hello
After this merge, can i pass a GpuMatND to cv::dnn::blobFromImage and cv::dnn::Net.setInput?
How long does it take to do this merge?

@chacha21
Copy link
Contributor Author

chacha21 commented Aug 21, 2023

Hello After this merge, can i pass a GpuMatND to cv::dnn::blobFromImage and cv::dnn::Net.setInput?

This merge just brings the ability to wrap a GpuMatND into a InputArray.
If a function accepting an InputArray was not designed to make use of such a GpuMatND, it will no-op or fail.

@RezaHajimohammadi
Copy link

I wanted to know if this is useful for this #16433 or not.

@asmorkalov
Copy link
Contributor

@chacha21 could you add some tests for the new API?

@chacha21
Copy link
Contributor Author

@chacha21 could you add some tests for the new API?

Sure, but as previously mentioned.. I don't really know what to test.

I was about to start writing tests but... could not find what should be tested.
Can you describe me the kind of regressions to track ?

@dkurt dkurt self-assigned this Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: core category: gpu/cuda (contrib) OpenCV 4.0+: moved to opencv_contrib feature pr: needs test New functionality requires minimal tests set
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants