Fix floodFill for very large images

This commit is contained in:
Juha Reunanen 2022-11-07 13:40:02 +02:00
parent 21133a2091
commit 63bff33e85

View File

@ -283,7 +283,7 @@ floodFillGrad_CnIR( Mat& image, Mat& msk,
Diff diff, ConnectedComp* region, int flags,
std::vector<FFillSegment>* 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);