Developer Reference

  • 2020
  • 10/21/2020
  • Public Content
Contents

WarpAffineCubicInit

Initializes the specification structure for image affine warping with the cubic interpolation method.

Syntax

IppStatus ippiWarpAffineCubicInit(IppiSize
srcSize
, IppiSize
dstSize
, IppDataType
dataType
, const double
coeffs[2][3]
, IppiWarpDirection
direction
, int
numChannels
, Ipp64f
valueB
, Ipp64f
valueC
, IppiBorderType
borderType
, const Ipp64f*
pBorderValue
, int
smoothEdge
, IppiWarpSpec*
pSpec
, Ipp8u*
pInitBuf
);
Include Files
ippi.h
Flavors with the
_L
suffix:
ippi_l.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
Parameters
srcSize
Size of the source image, in pixels.
dstSize
Size of the destination image, in pixels.
dataType
Data type of the source and destination images. Supported values:
ipp8u
,
ipp16u
,
ipp16s
,
ipp32f
, and
ipp64f
.
coeffs
Coefficients for the affine transform.
direction
Transformation direction. Supported values:
ippWarpForward
Forward transformation
ippWarpBackward
Backward transformation
numChannels
Number of channels in the image. Supported values: 1, 3, or 4.
valueB
,
valueC
The first (B) and second (C) parameter for the cubic filter.
borderType
Type of border. Supported values:
ippBorderConst
Values of all border pixels are set to a constant.
ippBorderRepl
Border is replicated from the edge pixels.
ippBorderTransp
Outer pixels are not processed.
ippBorderInMem
Border is obtained from the source image pixels in memory.
Mixed borders are also supported. They can be obtained by the bitwise operation
OR
between
ippBorderTransp
and the
ippBorderInMemTop
,
ippBorderInMemBottom
,
ippBorderInMemLeft
,
ippBorderInMemRight
values.
pBorderValue
Pointer to the constant value to assign to pixels of the constant border. This parameter is applicable only to the
ippBorderConst
border type.
smoothEdge
The smooth edge flag. The following values are supported: 0 - transform without edge smoothing, 1 - transform with edge smoothing.
This feature is supported only for the
ippBorderTransp
and
ippBorderInMem
border types.
pSpec
Pointer to the specification structure.
pInitBuf
Pointer to the temporary buffer for the cubic filter initialization.
Description
This function initializes the
IppiWarpSpec
structure for the
ippiWarpAffineCubic
function that performs warp affine transformation with the cubic interpolation method. Before using this function, compute the size of the specification structure and the size of the external buffer
pInitBuf
using the WarpAffineGetSize function.
Application Notes
Intel IPP warping functions do not support the
IPPI_INTER_CUBIC
mode. You can use interpolation with two-parameter cubic filters instead. This approach provides the interpolation quality that is comparable with
IPPI_INTER_CUBIC
. For interpolation formulas refer to Interpolation with Two-Parameter Cubic Filters. You can vary
B
and
C
values to get a result that fits the required task.
Return Values
ippStsNoErr
Indicates no error.
ippStsNullPtrErr
Indicates an error when:
  • one of the specified pointers is
    NULL
    , excepting
    pBorderValue
  • pBorderValue
    is
    NULL
    when border type is set to
    ippBorderConst
ippStsNoOperation
ndicates a warning if width or height of any image is zero.
ippStsSizeErr
Indicates an error when width or height of the source or destination image is less than, or equal to one.
ippStsDataTypeErr
Indicates an error when
dataType
has an illegal value.
ippStsWarpDirectionErr
Indicates an error when
direction
has an illegal value.
ippStsCoeffErr
Indicates an error when affine transformation is singular.
ippStsWrongIntersectQuad
Indicates a warning that no operation is performed if the transformed source image extended with borders has no intersection with the destination image.
ippStsNotSupportedModeErr
Indicates an error when the requested mode is not supported.
The edge smoothing feature is not supported for the
ippBorderRepl
and
ippBorderConst
border types.
ippStsBorderErr
Indicates an error when
borderType
has an illegal value.
ippStsNumChannelsErr
Indicates an error when
numChannels
has an illegal value.
ippStsExceededSizeErr
Indicates an error if width or height of the destination image or the source image exceeds 33554431 (0x1FFFFFF).

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804