-
-
Notifications
You must be signed in to change notification settings - Fork 56.2k
Open
Labels
bugcategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contrib
Description
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
Labels
bugcategory: gpu/cuda (contrib)OpenCV 4.0+: moved to opencv_contribOpenCV 4.0+: moved to opencv_contrib