Heya! I’m trying to write some code using cv::cuda::warpAffine
and although it seems to be working fine, I’d like to have some guarantees that I understand correctly what is happening.
For one, in most tutorials online (e.g. OpenCV: Affine Transformations) I find people setting the size
parameter just to the size of the dst
image. I’m very happy to do that, but can I be in such a case certain that it’s not going to reallocate the underlying data? I already have the data allocated (the Mat
object is just a shallow wrapper on top of it) and want to have the result in the memory where I expect it; is that going to always happen?
Second question is about in-place safety. If my src
and dst
are the same image, will OpenCV sort any possible issues for me, or do I need to deal with that explicitly in my wrapper function? The CPU-based warp (OpenCV: Geometric Image Transformations) can NOT operate in-place, can the GPU variant?
Many thanks!