Content-Length: 274951 | pFad | http://github.com/opencv/opencv/issues/27429

AD cv::cuda::warpAffine does not work inplace · Issue #27429 · opencv/opencv · GitHub
Skip to content

cv::cuda::warpAffine does not work inplace #27429

@Jerry-Master

Description

@Jerry-Master

System Information

C++ user OpenCV version 4.10 compiled with CUDA support.
Operating System: Windows 11 Pro
Compiler: MSVC 19.29.30154 / Visual Studio 2019

Detailed description

When running cv::cuda::warpAffine with the same input and output, the result is a black image. If it does not support inplace operations an error should appear similar to what happens with other functions.

Steps to reproduce

#include <opencv2/cudawarping.hpp>

cv::Mat imgCpu = cv::imread("path");
cv::cuda::GpuMat img(imgCpu);
cv::Matx23f affine_matrix(
            1.0f, 0.0f, 0.0f,
            0.0f, 1.0f, -4.0f
        );
cv::Mat pre(img);
cv::cuda::warpAffine(img, img, affine_matrix, img.size());
cv::Mat post(img);

The result in post is all zeros. If using different input and output images it works.

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









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: http://github.com/opencv/opencv/issues/27429

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy