add !empty assertion in seamlessClone()

issue #20617 addresses lack of warnings on
seamlessClone() function when src is None.
This commit adds source check using CV_Assert
therefore debugging would be easier.

Signed-off-by: nickjackolson <metedurlu@gmail.com>
pull/21067/head
nickjackolson 3 years ago
parent 79d4e865fe
commit b696928a5b
  1. 1
      modules/photo/src/seamless_cloning.cpp

@ -67,6 +67,7 @@ static Mat checkMask(InputArray _mask, Size size)
void cv::seamlessClone(InputArray _src, InputArray _dst, InputArray _mask, Point p, OutputArray _blend, int flags)
{
CV_INSTRUMENT_REGION();
CV_Assert(!_src.empty());
const Mat src = _src.getMat();
const Mat dest = _dst.getMat();

Loading…
Cancel
Save