Skip to content

Commit 26e9b42

Browse files
committed
Merge pull request opencv#8915 from sovrasov:deniose_add_assert
2 parents 4f35a59 + 234ad8f commit 26e9b42

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

modules/photo/src/denoising.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ void cv::fastNlMeansDenoising( InputArray _src, OutputArray _dst, const std::vec
116116
CV_INSTRUMENT_REGION()
117117

118118
int hn = (int)h.size(), type = _src.type(), depth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type);
119+
CV_Assert(!_src.empty());
119120
CV_Assert(hn == 1 || hn == cn);
120121

121122
Size src_size = _src.size();

0 commit comments

Comments
 (0)