core: added inplace check in 'divSpectrums'

pull/7819/head
Alexander Alekhin 8 years ago
parent ab429d2e73
commit 62c9ff25e5
  1. 3
      modules/imgproc/src/phasecorr.cpp

@ -167,6 +167,9 @@ static void divSpectrums( InputArray _srcA, InputArray _srcB, OutputArray _dst,
_dst.create( srcA.rows, srcA.cols, type );
Mat dst = _dst.getMat();
CV_Assert(dst.data != srcA.data); // non-inplace check
CV_Assert(dst.data != srcB.data); // non-inplace check
bool is_1d = (flags & DFT_ROWS) || (rows == 1 || (cols == 1 &&
srcA.isContinuous() && srcB.isContinuous() && dst.isContinuous()));

Loading…
Cancel
Save