mirror of
https://github.com/opencv/opencv.git
synced 2025-08-05 22:19:14 +08:00
core: workaround transform() inplace calls
This commit is contained in:
parent
ba0b3983c6
commit
77346d7286
@ -442,6 +442,12 @@ void transform(InputArray _src, OutputArray _dst, InputArray _mtx)
|
||||
_dst.create( src.size(), CV_MAKETYPE(depth, dcn) );
|
||||
Mat dst = _dst.getMat();
|
||||
|
||||
if (src.data == dst.data) // inplace case
|
||||
{
|
||||
CV_Assert(scn == dcn);
|
||||
src = src.clone(); // TODO Add performance warning
|
||||
}
|
||||
|
||||
int mtype = depth == CV_32S || depth == CV_64F ? CV_64F : CV_32F;
|
||||
AutoBuffer<double> _mbuf;
|
||||
double* mbuf;
|
||||
|
Loading…
Reference in New Issue
Block a user