GetResizeRect

Compute coordinates of the resized image.

Syntax

IppStatus ippiGetResizeRect(IppiRect srcRoi, IppiRect* pDstRect, double xFactor, double yFactor, double xShift, double yShift, int interpolation);

Parameters

srcRoi

Region of interest in the source image (of the IppiRect type).

pDstRect

Pointer to the resultant rectangle (of the IppiRect type).

xFactor, yFactor

Factors by which the x and y dimensions of the source ROI are changed. The factor value greater than 1 means increasing the image size in that dimension.

xShift, yShift

Shift values in the x and y directions respectively.

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_INTER_LANCZOS - interpolation with Lanczos window

IPPI_INTER_CUBIC2P_BSPLINE - B-spline

IPPI_INTER_CUBIC2P_CATMULLROM - Catmull-Rom spline

IPPI_INTER_CUBIC2P_B05C03 - special two-parameters cubic filter

IPPI_INTER_SUPER - supersampling interpolation

IPPI_SMOOTH_EDGE, or IPPI_SUBPIXEL_EDGE - edge smoothing in addition to one of the above modes

IPPI_ANTIALIASING - antialiasing method in addition to the linear, cubic, or Lanczos modes.

Description

The function ippiGetResizeRect is declared in the ippi.h file. It operates with ROI (see ROI Processing in Geometric Transforms).

This function returns the pointer to the resized image ROI pDstRect of the IppiRect type, that is it calculates the coordinates and size of the rectangular destination image ROI, which is obtained if the source image ROI srcRoi is resized with the specified parameters. The resize operation is not performed.

Return Values

ippStsNoErr

Indicates no error. Any other value indicates an error or a warning.

ippStsNullPtrErr

Indicates an error condition if pDstRect pointer is NULL.

ippStsSizeErr

Indicates an error condition if width or height of the source image ROI has zero or negative value.

ippStsResizeFactorErr

Indicates an error condition if xFactor or yFactor is less than or equal to zero.

ippStsInterpolationErr

Indicates an error condition if interpolation has an illegal value.

ippStsNoOperation

Indicates a warning if processed area is disappeared, no operation is performed.

Submit feedback on this help topic

Copyright © 2000 - 2011, Intel Corporation. All rights reserved.