photo: add assertion on empty image in denoising

This commit is contained in:
Vladislav Sovrasov 2017-06-14 13:57:07 +03:00
parent 12a1c127a9
commit 234ad8fbee

View File

@ -116,6 +116,7 @@ void cv::fastNlMeansDenoising( InputArray _src, OutputArray _dst, const std::vec
CV_INSTRUMENT_REGION()
int hn = (int)h.size(), type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
CV_Assert(!_src.empty());
CV_Assert(hn == 1 || hn == cn);
Size src_size = _src.size();