From 63bff33e85567962f6acf52b51793680a526f63c Mon Sep 17 00:00:00 2001 From: Juha Reunanen Date: Mon, 7 Nov 2022 13:40:02 +0200 Subject: [PATCH] Fix floodFill for very large images --- 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 8595011d48..926c48e65d 100644 --- a/modules/imgproc/src/floodfill.cpp +++ b/modules/imgproc/src/floodfill.cpp @@ -283,7 +283,7 @@ floodFillGrad_CnIR( Mat& image, Mat& msk, Diff diff, ConnectedComp* region, int flags, std::vector* buffer ) { - int step = (int)image.step, maskStep = (int)msk.step; + size_t step = image.step, maskStep = msk.step; uchar* pImage = image.ptr(); _Tp* img = (_Tp*)(pImage + step*seed.y); uchar* pMask = msk.ptr() + maskStep + sizeof(_MTp);