Skip to content

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

Merged
asmorkalov merged 2 commits intoopencv:4.xfrom
chacha21:GpuMatND_InputOutputArray
Nov 21, 2025
Merged

make cuda::GpuMatND compatible with InputArray/OutputArray#23913
asmorkalov merged 2 commits intoopencv:4.xfrom
chacha21:GpuMatND_InputOutputArray

Conversation

@chacha21
Copy link
Copy Markdown
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

@opencv-alalek opencv-alalek added the pr: needs test New functionality requires minimal tests set label Jul 14, 2023
@chacha21
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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

@asmorkalov
Copy link
Copy Markdown
Contributor

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

@chacha21
Copy link
Copy Markdown
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
continuation of  PR#19259 (opencv@ddebc2c)

No new feature for cuda::GpuMatND
code was unintentionally removed
@asmorkalov asmorkalov self-requested a review November 13, 2025 12:39
@asmorkalov asmorkalov self-assigned this Nov 13, 2025
@asmorkalov asmorkalov added this to the 4.13.0 milestone Nov 13, 2025
@asmorkalov asmorkalov force-pushed the GpuMatND_InputOutputArray branch from 64f486c to de93b04 Compare November 13, 2025 13:00
@asmorkalov asmorkalov removed the pr: needs test New functionality requires minimal tests set label Nov 21, 2025
@asmorkalov asmorkalov merged commit fdf0332 into opencv:4.x Nov 21, 2025
71 of 76 checks passed
@asmorkalov asmorkalov mentioned this pull request Dec 2, 2025
JayPol559 pushed a commit to JayPol559/opencv that referenced this pull request Jan 10, 2026
make cuda::GpuMatND compatible with InputArray/OutputArray opencv#23913

continuation of  [PR#19259](opencv#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

- [X] I agree to contribute to the project under Apache 2 License.
- [X] 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
- [X] The PR is proposed to the proper branch
- [X] 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants