Developer Reference

  • 2020
  • 07/15/2020
  • Public Content
Contents

WarpBilinear

MODIFIED API.
Performs bilinear warping of the source image using the specified transform coefficients.

Syntax

IppStatus ippiWarpBilinear_<mod>(const Ipp<datatype>*
pSrc
, IppiSize
srcSize
, int
srcStep
, IppiRect
srcRoi
, Ipp<datatype>*
pDst
, int
dstStep
, IppiRect
dstRoi
, const double
coeffs
[2][4], int
interpolation
, Ipp8u*
pBuffer
);
Supported values for
mod
:
8u_C1R
16u_C1R
32f_C1R
8u_C3R
16u_C3R
32f_C3R
8u_C4R
16u_C4R
32f_C4R
Include Files
ippi.h
Domain Dependencies
Headers:
ippcore.h
,
ippvm.h
,
ipps.h
Libraries:
ippcore.lib
,
ippvm.lib
,
ipps.lib
Parameters
pSrc
Pointer to the source image origin.An array of separate pointers to each plane in case of data in planar format.
srcSize
Size in pixels of the source image.
srcStep
Distance in bytes between starts of consecutive lines in the source image buffer.
srcRoi
Region of interest in the source image (of the
IppiRect
type).
pDst
Pointer to the destination image origin. An array of separate pointers to each plane in case of data in planar format.
dstStep
Distance in bytes between starts of consecutive lines in the destination image buffer.
dstRoi
Region of interest in the destination image (of the
IppiRect
type).
coeffs
The bilinear transform coefficients.
interpolation
Specifies the interpolation mode. Use one of the following values:
IPPI_INTER_NN
Nearest neighbor interpolation
IPPI_INTER_LINEAR
Linear interpolation
IPPI_INTER_CUBIC
Cubic interpolation
IPPI_SMOOTH_EDGE
Use edge smoothing in addition to one of the above modes.
pBuffer
Pointer to the external work buffer.
Description
The API of this function has been modified in Intel IPP 9.0 release.
This function operates with ROI (see ROI Processing in Geometric Transforms).
This bilinear warp function transforms the source image pixel coordinates (
x,y
) according to the following formulas:
x
' =
c
00
*
x*y
+
c
01
*
x
+
c
02
*
y
+
c
03
y
' =
c
10
*
x*y
+
c
11
*
x
+
c
12
*
y
+
c
13
where
x
' and
y
' denote the pixel coordinates in the transformed image, and
c
ij
are the bilinear transform coefficients passed in the array
coeffs
.
The bilinear transform preserves equal distances between points on a line.
The transformed part of the source image is resampled using the interpolation mode specified by the
interpolation
parameter, and written to the destination image ROI.
Figure
“Bilinear Transform of an Image”
gives an example of applying the bilinear warping function
ippiWarpBilinear
to a sample image.
Bilinear Transform of an Image
To estimate how the source image ROI will be transformed by the
ippiWarpBilinear
function, use functions
ippiWarpBilinearQuad
and
ippiGetBilinearBound
. To calculate coefficients of the bilinear transform which maps source ROI to a given quadrangle, use
ippiGetBilinearTransform
function
.
Before using this function, compute the size of the external work buffer
pBuffer
using the WarpBilinearGetBufferSize function.
Example shows how to use the
ippiWarpBilinear_32f_C1R
function.
Return Values
ippStsNoErr
Indicates no error.
ippStsNullPtrErr
Indicates an error condition if one of the specified pointers is
NULL
.
ippStsSizeErr
Indicates an error condition if any image dimension has zero or negative value.
ippStsStepErr
Indicates an error condition if
srcStep
or
dstStep
has a zero or negative value.
ippStsInterpolationErr
Indicates an error condition if
interpolation
has an illegal value.
ippStsRectErr
Indicates an error condition if width or height of the intersection of the
srcRoi
and source image is less than or equal to 1.
ippStsCoeffErr
Indicates an error condition if coefficient values are invalid.
ippStsWrongIntersectROIErr
Indicates an error condition if
srcRoi
has no intersection with the source image.
ippStsWrongIntersectQuad
Indicates a warning that no operation is performed if the transformed source ROI has no intersection with the destination ROI.

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