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>
This commit is contained in:
nickjackolson 2021-11-17 21:56:55 +01:00
parent 79d4e865fe
commit b696928a5b

View File

@ -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();