-
-
Notifications
You must be signed in to change notification settings - Fork 55.6k
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
cv::cuda::GpuMat.convertTo() seems not to support in-place, while cv::Mat does #13092
Comments
Maybe a shared problem with #13149 ? |
I am having similar problem with opencv 3.4, Cuda10, Ubuntu18.04 gpu_image_init.convertTo(gpu_image, CV_32FC3, 1.0, 0);` However, this does not works: In my case, the code runs but the resultant matrix has garbage values. |
I am not able to reproduce this error on the latest 3.4 branch. (win10, vs2019, cuda10.2) |
As long as it does not crash, it is not a problem that it is not a real "in-place". I will check with my 4.3.0 build tomorrow |
The bug (as mentionned in initial post) is still present in 4.3.0 |
This is getting confusing. Even with Ubuntu 18.04(Jetson TX2) and the latest master branch build(4.4.0-pre), I wasn't able to reproduce the error. I've added the following googletest code to cudaarithm test codes and it seems to be working.
I'll try again with x64 machine tomorrow. |
I forgot to mention that I now use VS2019 and CUDA 10.2 but it is of less importance; apart form that this is still under W7 64b |
After increasing the GpuMat size, I see the same issue. The GPU model is RTX 2080 Ti. |
Perhaps this issue is similar to #17840 which have been resolved by using CUDA function designed for in-place processing. |
@chacha21 @mshabunin |
I confirm that it seems to fix the problem. |
Visual Studio 2017, Windows 7 64 bits, OpenCV 3.4.3
Cuda 10
the following code raises an exception :
Using a second matrix as a destination for the convertTo() gets rid of the problem.
So it seems that convertTo() is no safe to use in-place with cuda::GpuMat, while the same code with cv::Mat would be ok.
Is it a bug or a missing documentation ?
The text was updated successfully, but these errors were encountered: