From 0c096b3dc2190d1547647acbe138a96814ec67bf Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Thu, 28 Jul 2011 14:10:17 +0000 Subject: [PATCH] fixed floodfill with mask parameter when no mask is passed --- modules/imgproc/src/floodfill.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/imgproc/src/floodfill.cpp b/modules/imgproc/src/floodfill.cpp index 6ddf196..25b6a01 100644 --- a/modules/imgproc/src/floodfill.cpp +++ b/modules/imgproc/src/floodfill.cpp @@ -1132,7 +1132,7 @@ int cv::floodFill( InputOutputArray _image, InputOutputArray _mask, { CvConnectedComp ccomp; CvMat c_image = _image.getMat(), c_mask = _mask.getMat(); - cvFloodFill(&c_image, seedPoint, newVal, loDiff, upDiff, &ccomp, flags, &c_mask); + cvFloodFill(&c_image, seedPoint, newVal, loDiff, upDiff, &ccomp, flags, c_mask.data.ptr ? &c_mask : 0); if( rect ) *rect = ccomp.rect; return cvRound(ccomp.area); -- 2.7.4