Skip to content
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

[Feature Request] Extend transpose operator for MatND, Mat with channels and extend API #19751

Closed
4 tasks done
JuliaBareeva opened this issue Mar 19, 2021 · 1 comment · Fixed by #21703
Closed
4 tasks done

Comments

@JuliaBareeva
Copy link
Contributor

JuliaBareeva commented Mar 19, 2021

  • OpenCV => 4.5.0
  • Operating System / Platform => Linux, Windows
  • Compiler => any C++
Detailed description

In image preprocessing and postprocessing tasks for neural networks, the transpose operation is often used, for example, from the NumPy library: img.transpose(1, 2, 0). Unfortunately, when we work in C++, we have no way to repeat this operation using OpenCV in one step. As a workaround, I use reshaping and memory copying, which reduces performance a lot.

I think it is possible to implement this since this ability already exists in https://docs.opencv.org/master/d2/d3c/classcv_1_1dnn_1_1PermuteLayer.html

Steps to reproduce
cv::Mat frame = cv::imread(img_path);
cv::cuda::GpuMat gpu_frame(frame), result;
cv::cuda::transpose(gpu_frame, result);
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 solution
  • I updated to latest OpenCV version and the issue is still there
  • There is reproducer code and related data files: videos, images, onnx, etc
@ameerazam0
Copy link

ameerazam0 commented Sep 5, 2021

Hello !
I'm Ameer Azam . I'm new to Open Source contribution . I have intermediate knowledge of Python opencv i did some project related that also right now I'm working on my current project ISL framework for D&M people . I'm fascinated to contribute to Open source . I want to start my journey with open source contribution from here . Please help me how to get started .

@rogday rogday linked a pull request Mar 11, 2022 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants