From 62c1a5a15232ddc9cc97b46d0d3c07a4c5b35d9e Mon Sep 17 00:00:00 2001 From: Vitaly Tuzov Date: Mon, 15 Aug 2016 11:28:52 +0300 Subject: [PATCH] Replaced quiet return from MSER:detectRegion function with exeption throwing to notify user in case small image is processed --- modules/features2d/src/mser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/features2d/src/mser.cpp b/modules/features2d/src/mser.cpp index 72b2314..4f2cab1 100644 --- a/modules/features2d/src/mser.cpp +++ b/modules/features2d/src/mser.cpp @@ -1025,7 +1025,7 @@ void MSER_Impl::detectRegions( InputArray _src, vector >& msers, v bboxes.clear(); if( src.rows < 3 || src.cols < 3 ) - return; + CV_Error(Error::StsBadArg, "Input image is too small. Expected at least 3x3"); Size size = src.size(); -- 2.7.4