Intel® Integrated Performance Primitives (Intel® IPP) Developer Guide and Reference

ID 790148
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

FloodFill_Range

Performs flood filling of pixels with values in the specified range in the connected area on an image.

Syntax

Case 1: Operations on one-channel data

IppStatus ippiFloodFill_Range4Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize roiSize, IppiPoint seed, Ipp<datatype> newVal, Ipp<datatype> minDelta, Ipp<datatype> maxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);

IppStatus ippiFloodFill_Range8Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize roiSize, IppiPoint seed, Ipp<datatype> newVal, Ipp<datatype> minDelta, Ipp<datatype> maxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);

Supported values for mod:

8u_C1IR

16u_C1IR

32f_C1IR

Case 2: Operations on three-channel data

IppStatus ippiFloodFill_Range4Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize roiSize, IppiPoint seed, Ipp<datatype>* pNewVal, Ipp<datatype>* pMinDelta, Ipp<datatype>* pMaxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);

IppStatus ippiFloodFill_Range8Con_<mod>(Ipp<DataType>* pImage, int imageStep, IppiSize roiSize, IppiPoint seed, Ipp<datatype>* pNewVal, Ipp<datatype>* pMinDelta, Ipp<datatype>* pMaxDelta, IppiConnectedComp* pRegion, Ipp8u* pBuffer);

Supported values for mod:

8u_C3IR

16u_C3IR

32f_C3IR

Include Files

ippcv.h

Domain Dependencies

Headers: ippcore.h, ippvm.h, ipps.h, ippi.h

Libraries: ippcore.lib, ippvm.lib, ipps.lib, ippi.lib

Parameters

pImage
Pointer to the ROI in the source and destination image (in-place operation).
imageStep
Distance in bytes between starts of consecutive lines in the image buffer.
roiSize
Size of the image ROI in pixels.
seed
Initial point.
minDelta
Minimum difference between neighbor pixels for one-channel data.
maxDelta
Maximum difference between neighbor pixels for one-channel data.
newVal
Value to fill with for one-channel data.
pMinDelta
Pointer to the minimum differences between neighbor pixels for three-channel images.
pMaxDelta
Pointer to the maximum differences between neighbor pixels for three-channel images.
pNewVal
Pointer to the vector containing values to fill with for three-channel data.
pRegion
Pointer to the connected components structure that stores information about the refilled area.
pBuffer
Pointer to the temporary buffer.

Description

This function operates with ROI (see Regions of Interest in Intel IPP).

This function performs flood filling of the group of connected pixels in the seed pixel neighborhoods whose pixel values v satisfy the following conditions:


where v0 is the pixel value of the seed point, and dlw, dup are minDelta, maxDelta, respectively. Values of these pixels are set to the newVal value.

The function requires a temporary buffer whose size should be computed with the function ippiFloodFillGetSize_Grad beforehand.

The functions with the “_4con” suffixes check 4-connected neighborhood of each pixel, i.e., side neighbors. The functions with the “_8con” suffixes check 8-connected neighborhood of each pixel, i.e., side and corner neighbors. See Figure Pixels Connectivity Patterns”.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if one of the specified pointers is NULL.

ippStsSizeErr

Indicates an error condition if roiSize has a field with zero or negative value.

ippStsStepErr

Indicates an error condition if imageStep is less than pRoiSize.width*<pixelSize>.

ippStsNotEvenStepErr

Indicates an error condition if steps for floating-point images are not divisible by 4, or steps for 16-bit integer images are not divisible by 2.

ippStsOutOfRangeErr

Indicates an error condition if the seed point is out of ROI.