Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

ROI's and offsets in FloodFill

Intel_C_Intel
Employee
577 Views
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.rect.height;

ROI.width = blobs.rect.width;

ROIoffset = (

int) blobs.rect.y * width + (int) blobs.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?

THANKS

0 Kudos
3 Replies
seiji-torigoe
Beginner
577 Views
ippStsOutofRangeErr
Indicates an error when the seedpoint is out of ROI.
0 <= SeedX <= RoiWidth-1
0 <= SeedY <= RoiHeight-1
0 Kudos
Intel_C_Intel
Employee
577 Views
I see. The seed in the the ROI coordinate system not the image coordinate system.
Cheers :)
0 Kudos
Intel_C_Intel
Employee
577 Views
I see. The seed is in the ROI coordinate system not the image coordinate system.
Cheers :)
0 Kudos
Reply