1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +04:00

fixed floodfill with mask parameter when no mask is passed

This commit is contained in:
Vadim Pisarevsky
2011-07-28 14:10:17 +00:00
parent d2080a117e
commit 0c096b3dc2
+1 -1
View File
@@ -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);