Intel® Integrated Performance Primitives Developer Guide and Reference

ID 790148
Date 11/07/2023
Public

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

Document Table of Contents

Structures and Enumerators

This topic describes the structures and enumerators used by the Intel Integrated Performance Primitives for image processing.

The IppStatus constant enumerates the status code values returned by Intel IPP functions, indicating whether the operation was error-free or not.

See Error Reporting for more information on the set of valid status codes and corresponding error messages for image and video processing functions.

 

The structure IppiPoint for storing the geometric position of a point is defined as

typedef struct {
    int x;
    int y;
} IppiPoint;

where x, y denote the coordinates of the point.

 

The structure IppPointPolar for storing the geometric position of a point in polar coordinates is defined as

typedef struct {
    Ipp32f rho;
    Ipp32f theta;
} IppPointPolar;

where rho - a radial coordinate (radial distance from the origin), theta - an angular coordinate (counterclockwise angle from the x-axis).

 

The structure IppiSize for storing the size of a rectangle is defined as

typedef struct {
    int width;
    int height;
} IppiSize;

where width and height denote the dimensions of the rectangle in the x- and y-directions, respectively.

 

The structure IppiRect for storing the geometric position and size of a rectangle is defined as

typedef struct {
    int x;
    int y;
    int width;
    int height;
} IppiRect;

where x, y denote the coordinates of the top left corner of the rectangle that has dimensions width in the x-direction by height in the y-direction.

 

The ippiConnectedComp structure used in Computer Vision functions defines the connected component as follows:

typedef struct _IppiConnectedComp {
    Ipp64f area;
    Ipp64f value[3];
    IppiRect rect;
} IppiConnectedComp;

where area - area of the segmented component; value[3] - gray scale value of the segmented component; rect - bounding rectangle of the segmented component.

 

The IppiMaskSize enumeration defines the neighborhood area for some morphological and filtering functions:

typedef enum {
    ippMskSize1x3 = 13,
    ippMskSize1x5 = 15,
    ippMskSize3x1 = 31,
    ippMskSize3x3 = 33,
    ippMskSize5x1 = 51,
    ippMskSize5x5 = 55
} IppiMaskSize;

 

The IppCmpOp enumeration defines the type of compare operation to be used in image comparison functions:

typedef enum {
    ippCmpLess,
    ippCmpLessEq,
    ippCmpEq,
    ippCmpGreaterEq,
    ippCmpGreater
} IppCmpOp;

 

The IppRoundMode enumeration defines the rounding mode to be used in some conversion, filtering and arithmetic functions:

typedef enum {
    ippRndZero,
    ippRndNear,
    ippRndFinancial,
	   ippRndHintAccurate=0x10 
} IppRoundMode;

 

The IppHintAlgorithm enumeration defines the type of code to be used in some image transform and statistics functions, that is, faster but less accurate, or vice-versa, more accurate but slower. For more information on using this enumerator, see Table Hint Arguments for Image Moment Functions.

typedef enum {
    ippAlgHintNone,
    ippAlgHintFast,
    ippAlgHintAccurate
} IppHintAlgorithm;

 

The types of interpolation used by geometric transform functions are defined as follows:

enum {
    IPPI_INTER_NN        = 1,
    IPPI_INTER_LINEAR    = 2,
    IPPI_INTER_CUBIC     = 4,
    IPPI_INTER_CUBIC2P_BSPLINE,
    IPPI_INTER_CUBIC2P_CATMULLROM,
    IPPI_INTER_CUBIC2P_B05C03,	 
    IPPI_INTER_SUPER     = 8,
    IPPI_INTER_LANCZOS   = 16,
    IPPI_ANTIALIASING    =(1 << 29)
    IPPI_SUBPIXEL_EDGE   =(1 << 30)
    IPPI_SMOOTH_EDGE     = IPP_MIN_32S
};

 

The IppiAlphaType enumeration defines the type of the compositing operation to be used in the alpha composition functions:

typedef enum {
    ippAlphaOver,
    ippAlphaIn,
    ippAlphaOut,
    ippAlphaATop,
    ippAlphaXor,
    ippAlphaPlus,
    ippAlphaOverPremul,
    ippAlphaInPremul,
    ippAlphaOutPremul,
    ippAlphaATopPremul,
    ippAlphaXorPremul,
    ippAlphaPlusPremul
} IppiAlphaType;

 

The IppiDitherType enumeration defines the type of dithering to be used by the ippiReduceBits function:

typedef enum {
    ippDitherNone,
    ippDitherFS,
    ippDitherJJN,
    ippDitherStucki,
    ippDitherBayer
} IppiDitherType;

 

The layout of the image slices used in some image format conversion functions is defined as follows:

enum {
     IPP_UPPER        = 1,
     IPP_LEFT         = 2,
     IPP_CENTER       = 4,
     IPP_RIGHT        = 8,
     IPP_LOWER        = 16,
     IPP_UPPER_LEFT   = 32,
     IPP_UPPER_RIGHT  = 64,
     IPP_LOWER_LEFT   = 128,
     IPP_LOWER_RIGHT  = 256
};

 

The IppiAxis enumeration defines the flip axes for the ippiMirror functions or direction of the image intensity ramp for the ippiImageRamp functions:

typedef enum {
    ippAxsHorizontal, 
    ippAxsVertical,  
    ippAxsBoth,
    ippAxs45,
    ippAxs135
} IppiAxis;

 

The IppiBorderType enumeration defines the border type that is used by some Separable Filters and Fixed Filters functions:

typedef enum _IppiBorderType {
    ippBorderRepl      =  1,
    ippBorderWrap      =  2,
    ippBorderMirror    =  3,
    ippBorderMirrorR   =  4,
    ippBorderDefault   =  5,
    ippBorderConst     =  6,
    ippBorderTransp    =  7,
    ippBorderInMemTop     =  0x0010,
    ippBorderInMemBottom  =  0x0020,
    ippBorderInMemLeft    =  0x0040,
    ippBorderInMemRight   =  0x0080,
    ippBorderFirstStageInMemTop     =  0x0100,
    ippBorderFirstStageInMemBottom  =  0x0200,
    ippBorderFirstStageInMemLeft    =  0x0400,
    ippBorderFirstStageInMemRight   =  0x0800,
} IppiBorderType;

 

The IppiFraction enumeration defines shapes of the structuring element used in some decimate filter functions:

typedef enum {
    ippPolyphase_1_2,
    ippPolyphase_3_5,
    ippPolyphase_2_3,
    ippPolyphase_7_10,
    ippPolyphase_3_4,	 
} IppiFraction;

 

The IppiNormOp enumeration defines the type of normalization that should be applied to the output data:

typedef enum {
    ippiNormNone           = 0x00000000, // default
    ippiNorm          = 0x00000100, // normalized form
    ippiNormCoefficient = 0x00000200, // correlation coefficient in the range [-1.0,…,1.0]
    ippiNormMask          = 0x0000FF00,
} IppiNormOp;

The IppiROIShape enumeration defines the window shape for the two-dimensional convolution-specific functions:

typedef enum {
   ippiROIFull   = 0x00000000,
   ippiROIValid  = 0x00010000,
   ippiROISame   = 0x00020000,
   ippiROIMask   = 0x00FF0000
} IppiROIShape;

The IppNormType enumeration defines the norm type that should be applied when computing the magnitude of the gradient:

typedef enum {
    ippNormInf  =   0x00000001, // Infinity norm
    ippNormL1   =   0x00000002, // L1 normalization
    ippNormL2   =   0x00000004  // L2 normalization
} IppNormType;

The IppiHOGConfig structure defines the configuration parameters for the HOG descriptor:

typedef struct {
   int   cvCompatible;  /* openCV compatible output format */
   int   cellSize;      /* squre cell size (pixels) */
   int   blockSize;     /* square block size (pixels) */
   int   blockStride;   /* block displacement (the same for x- and y- directions) */
   int   nbins;         /* required number of bins */
   Ipp32f   sigma;      /* gaussian factor of HOG block weights */
   Ipp32f   l2thresh;   /* normalization factor */
   IppiSize winSize;    /* detection window size (pixels) */
} IppiHOGConfig;

The code flags used by the FastN functions are defined as follows:

enum {
    IPP_FASTN_ORIENTATION = 0x0001,
    IPP_FASTN_NMS         = 0x0002,
    IPP_FASTN_CIRCLE      = 0X0004,
    IPP_FASTN_SCORE_MODE0 = 0X0020
};

The IppiFastNSpec specification structure is used by the FastN function:

struct FastNSpec;
typedef struct FastNSpec IppiFastNSpec;

The IppiCornerFastN structure used by the FastN2DToVec function stores the destination vector of structures:

typedef struct _IppiCornerFastN {
    int     x;
    int     y;
    int     cornerType;
    int     orientation;
    float   angle;
    float   score;
} IppiCornerFastN;

The IppFGMModel structure contains parameters for the Gaussian mixture-based segmentation algorithm:

typedef struct 
{
  unsigned int   numFrames;   /* length of history */
  unsigned int   numGauss;    /* maximal number of gaussian components per pixel */
                              /* (numGauss<=maxNumGauss) */
  Ipp32f varInit;     /* initial value of variance for new gaussian component */
  Ipp32f varMin;      /* minimal bound of variance */
  Ipp32f varMax;      /* maximal bound of variance */
  Ipp32f varWBRatio;  /* background threshold */
  Ipp32f bckgThr;     /* background total weights sum threshold */
  Ipp32f varNGRatio;  /* threshold for adding new gaussian component to list */
  Ipp32f reduction;   /* speed of reduction non-active gaussian components */
  Ipp8u  shadowValue; /* returned shadow value */
  char   shadowFlag;  /* search shadows flag */
  Ipp32f shadowRatio; /* shadow threshold */
} IppFGMModel

The IppiMorphMode enumerator defines modes for mask processing at the second stage of advanced morphology operations:

typedef enum {
    IPP_MORPH_DEFAULT      = 0x0000,
    IPP_MORPH_MASK_NO_FLIP = 0x0001,
} IppiMorphMode;

The IppChannels enumerator defines the number of channels in the image:

typedef enum {
    ippC0   = 0,
    ippC1   = 1,
    ippC2   = 2,
    ippC3   = 3,
    ippC4   = 4,
    ippP2   = 5,
    ippP3   = 6,
    ippP4   = 7,
    ippAC1  = 8,
    ippAC4  = 9,
    ippA0C4 = 10,
    ippAP4  = 11
} IppChannels

The IppiFilterBilateralType enumerator defines the type of the bilateral filter that is used by some Filtering Functions:

typedef enum {
    ippiFilterBilateralGauss     = 100,
    ippiFilterBilateralGaussFast = 101
} IppiFilterBilateralType

The IppiWarpTransformType enumerator defines the type of the warp transform for some Warp Functions with Prior Initialization:

typedef enum {
    ippWarpAffine,
    ippWarpPerspective,
    ippWarpBilinear
} IppiWarpTransformType

The IppiDistanceMethodType structure stores the method of defining the difference in intensity between pixels. It is defines as:

typedef enum {
    ippDistNormL1 = 0x00000002;
    ippDistNormL2 = 0x00000004;
} IppiDistanceMethodType;

Structures for 3D Data Processing Functions

The ipprBorderType enumeration defines the border type that is used by some 3D Data Processing Functions:

typedef enum _IpprBorderType {
    ipprBorderRepl        = ippBorderRepl,
    ipprBorderConst       = ippBorderConst,
 
    /* Flags to use source image memory pixels from outside of the border in particular directions */
    ipprBorderInMemTop     =  0x0010,
    ipprBorderInMemBottom  =  0x0020,
    ipprBorderInMemLeft    =  0x0040,
    ipprBorderInMemRight   =  0x0080,
    ipprBorderInMemFront   =  0x1000,
    ipprBorderInMemBack    =  0x2000,
 
    ipprBorderInMem        =  ipprBorderInMemLeft|ipprBorderInMemTop|ipprBorderInMemRight|ipprBorderInMemBottom|ipprBorderInMemFront|ipprBorderInMemBack,
} IpprBorderType;

The IpprVolumeL structure stores the volume of a three-dimensional space. It is defined as:

typedef struct {
    int width;
    int height;
    int depth;
} IpprVolume;

The IpprCuboid structure stores the volume of interest of a three-dimensional space. It is defined as:

typedef struct {
    int x;
    int y;
    int z;
    int width;
    int height;
    int depth;
} IpprCuboid;