Intel IPP Integration Wrappers Developer Guide and Reference

ID 751823
Date 1/18/2023
Public
Document Table of Contents

class IwiResize

The IwiResize class consists of the following Resize operation methods:

IwiResize()

Default constructor.

IwiResize();

IwiResize() with Initialization

Default constructor with initialization.

IwiResize(
        IwSize                  srcSize,                            
        IwSize                  dstSize,                            
        IppDataType             dataType,                          
        int                     channels,                           
        IppiInterpolationType   interpolation,                      
        const IwiResizeParams  &params      = IwiResizeParams(),    
        const IwiBorderType    &border      = ippBorderRepl
);
Parameters

srcSize

Size of the source image, in pixels.

dstSize

Size of the destination image, in pixels.

dataType

Image pixel type.

channels

Number of image channels.

interpolation

Interpolation method. Supported values: ippNearest, ippLinear, ippCubic, ippLanczos, ippSuper.

params

Resize optional parameters.

border

Extrapolation algorithm for out of image pixels processing. Supported values: ippBorderConst, ippBorderRepl, ippBorderMirror, ippBorderInMem.

Exception Values

ippStsInterpolationErr

The interpolation value is illegal.

ippStsDataTypeErr

The dataType value is illegal.

ippStsNumChannelsErr

The channels value is illegal.

ippStsBorderErr

The border value is illegal.

ippStsNotSupportedModeErr

Specified combination of parameters' values is not supported.

ippStsNoMemErr

Failed to allocate memory.

ippStsSizeErr

Values of the srcSize and/or dstSize fields are illegal.

ippStsNullPtrErr

The pSpec pointer is NULL.

Return Values

ippStsNoErr

No errors.

ippStsNoOperation

Warning: width and/or height of the image is equal to zero.

InitAlloc()

Method to allocate and initialize the internal data structure.

IppStatus InitAlloc(
        IwSize                  srcSize,                            
        IwSize                  dstSize,                             
        IppDataType             dataType,                           
        Ipp32u                  channels,                           
        IppiInterpolationType   interpolation,                      
        const IwiResizeParams  &params      = IwiResizeParams(),    
        const IwiBorderType    &border      = ippBorderRepl
    );
Parameters

srcSize

Size of the source image, in pixels.

dstSize

Size of the destination image, in pixels.

dataType

Image pixel type.

channels

Number of image channels.

interpolation

Interpolation method. Supported values: ippNearest, ippLinear, ippCubic, ippLanczos, ippSuper.

params

Resize optional parameters.

border

Extrapolation algorithm for out of image pixels processing. Supported values: ippBorderConst, ippBorderRepl, ippBorderMirror, ippBorderInMem.

Exception Values

ippStsInterpolationErr

The interpolation value is illegal.

ippStsDataTypeErr

The dataType value is illegal.

ippStsNumChannelsErr

The channels value is illegal.

ippStsBorderErr

The border value is illegal.

ippStsNotSupportedModeErr

Specified combination of parameters' values is not supported.

ippStsNoMemErr

Failed to allocate memory.

ippStsSizeErr

Values of the srcSize and/or dstSize fields are illegal.

ippStsNullPtrErr

The pSpec pointer is NULL.

Return Values

ippStsNoErr

No errors.

ippStsNoOperation

Warning: width and/or height of the image is equal to zero.

operator()

Method to perform resize operation on the specified image ROI.

    IppStatus operator()(
        const IwiImage         &srcImage,      
        IwiImage               &dstImage,  
        const IwiBorderType    &border      = ippBorderRepl
        const IwiTile          &tile        = IwiTile()   
    );
Parameters

srcImage

Reference to the source image.

dstImage

Reference to the destination image.

tile

Reference to the IwiTile object for tiling. By default no tiling is used.

Exception Values

ippStsBorderErr

The border value is illegal.

ippStsDataTypeErr

The dataType value is illegal.

ippStsNumChannelsErr

The channels value is illegal.

ippStsNotEvenStepErr

The srcStep and/or dstStep value is not divisible by size of elements.

ippStsInplaceModeNotSupportedErr

In-place operation is not supported: pSrc is equal to pDst.

ippStsNotSupportedModeErr

Specified combination of parameters' values is not supported.

ippStsNoMemErr

Failed to allocate memory.

ippStsNullPtrErr

The pSpec pointer is NULL.

Return Values

ippStsNoErr

No errors.

ippStsNoOperation

Warning: width and/or height of the image is equal to zero.

GetSrcRoi()

Method to calculate source ROI based on the destination ROI.

    IwiRoi GetSrcRoi(
        IwiRoi  dstRoi
    ) const
Parameters

dstRoi

Destination image ROI.

Exception Values

ippStsNullPtrErr

At least one of the pointers is NULL.

Return Values

Source image ROI

GetBorderSize()

Method to calculate the border size.

    IwiBorderSize GetBorderSize() const
Exception Values

ippStsNullPtrErr

At least one of the pointers is NULL.

Return Values

Border size

~IwiResize()

Default destructor .

    ~IwiResize();