ROI's and offsets in FloodFill

ROI's and offsets in FloodFill

If I understand correctly, when I want to perform an processing function (like thresholding)in a particular rectangular area, I do something like this

ROI.height = blobs[i].rect.height;

ROI.width = blobs[i].rect.width;

ROIoffset = (int) blobs[i].rect.y * width + (int) blobs[i].rect.x;

status = ippiThreshold_LTValGTVal_8u_C1R(imgIpp+ROIoffset, width, binIpp+ROIoffset, width, ROI, threshold, 0, threshold, 255);


However, when I do the same thing using FloodFill...........


int BufSize;

status = ippiFloodFillGetSize(ROI, &BufSize);

IppiPoint seed = {col,row}; // values inside the Rect ROI

IppiConnectedComp pRegion;

Ipp8u* pBuffer = new Ipp8u[BufSize];

status = ippiFloodFill_8Con_8u_C1IR(binIpp+ROIoffset, width, ROI, seed, grayFill, &pRegion, (void*)pBuffer);


I get error status of-11 --"Argument is out of range or point is outside the image"char*

In order for me to get this to work, I have to set ROIoffset = 0 and ROI = {width,height} of the whole image. I know the FloodFill uses a seed -- which is the initial point. But why do I have to use the whole image and not just the ROI? Or am I doing something wrong here?


4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Indicates an error when the seedpoint is out of ROI.

0 <= SeedX <= RoiWidth-1
0 <= SeedY <= RoiHeight-1

I see. The seed in the the ROI coordinate system not the image coordinate system.
Cheers :)

I see. The seed is in the ROI coordinate system not the image coordinate system.
Cheers :)

Leave a Comment

Please sign in to add a comment. Not a member? Join today