From: nickjackolson Date: Wed, 17 Nov 2021 20:56:55 +0000 (+0100) Subject: add !empty assertion in seamlessClone() X-Git-Tag: accepted/tizen/unified/20230127.161057~1^2~6^2~263^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b696928a5b73f27d3b3c4678cea8bc2e5fd845d7;p=platform%2Fupstream%2Fopencv.git 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 --- diff --git a/modules/photo/src/seamless_cloning.cpp b/modules/photo/src/seamless_cloning.cpp index d092035..d21a3f2 100644 --- a/modules/photo/src/seamless_cloning.cpp +++ b/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();