WarpPerspectiveGetSize
Computes the size of the specification structure and the size of the external work buffer for the warp perspective transform.
Syntax
IppStatus ippiWarpPerspectiveGetSize(IppiSize
srcSize
, IppiRect
srcRoi
, IppiSize
dstSize
, IppDataType
dataType
, const double
coeffs[3][3]
, IppiInterpolationType
interpolation
, IppiWarpDirection
direction
, IppiBorderType
borderType
, int*
pSpecSize
, int*
pInitBufSize
);
Include Files
ippi.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.
- srcRoi
- Source image ROI (of theIppiRect type).
- dstSize
- Size of the destination image, in pixels.
- dataType
- Data type of the source and destination images. Supported values:ipp8u,ipp16u,ipp16s, andipp32f.
- coeffs
- Coefficients for the perspective transform.
- interpolation
- Interpolation method. Supported values:ippNearest,ippLinear, andippCubic.
- direction
- Transformation direction. Supported values:
- ippWarpForward
- Forward transformation
- ippWarpBackward
- Backward transformation
- 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 operationORbetweenippBorderTranspand theippBorderInMemTop,ippBorderInMemBottom,ippBorderInMemLeft,ippBorderInMemRightvalues. - pSpecSize
- Pointer to the size, in bytes, of the specification structure.
- pInitBufSize
- Pointer to the size, in bytes, of the temporary buffer.
Description
This function computes the size of the specification structure and the external work buffer for the following functions, depending on the
interpolation
parameter: ippiWarpPerspectiveNearestInit
, ippiWarpPerspectiveLinearInit
, or ippiWarpPerspectiveCubicInit
.You can set the value of the
srcRoi
parameter to ippRectInfinite
, which means that the ROI is not specified.Return Values
- ippStsNoErr
- Indicates no error.
- ippStsNullPtrErr
- Indicates an error when one of the specified pointers isNULL.
- ippStsSizeErr
- Indicates an error in the following cases:
- If the width or height of the source or destination image is less than, or equal to one.
- If one of the calculated sizes exceeds the maximum positive 32-bit signed integer value. The size of the one of the processed images is too large.
- ippStsRectErr
- Indicates an error in the following cases, if the source image ROI is notippRectInfinite:
- If the source image ROI has no intersection with the image.
- Eitherxorycomponent of the source image ROI is negative.
- Width or height of the source image ROI is less than, or equal to zero.
- ippStsDataTypeErr
- Indicates an error whendataTypehas an illegal value.
- ippStsWarpDirectionErr
- Indicates an error whendirectionhas an illegal value.
- ippStsInterpolationErr
- Indicates an error wheninterpolationhas an illegal value.
- ippStsCoeffErr
- Indicates an error when perspective 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.
- ippStsBorderErr
- Indicates an error whenborderTypehas an illegal value.
- ippStsSizeWrn
- Indicates a warning whensrcRoiexceeds the source image.