Back to Aurora Vision Library Lite website

You are here: Start » Image » Image Spatial Transforms » ResizeImage_Relative

ResizeImage_Relative


Header: AVL.h
Namespace: avl

Resizes an image by a factor along each axis.

Syntax

void avl::ResizeImage_Relative
(
	const avl::Image& inImage,
	float inHorizontalScale,
	float inVerticalScale,
	avl::ResizeMethod::Type inResizeMethod,
	avl::Image& outImage
)

Parameters

Name Type Range Default Description
Input value inImage const Image& Input image
Input value inHorizontalScale float 0.0 - 65535.0 1.0f
Input value inVerticalScale float 0.0 - 65535.0 1.0f
Input value inResizeMethod ResizeMethod::Type
Output value outImage Image& Output image

Description

The operation stretches or shrinks the inImage so that its dimensions are scaled, accordingly, by the factor of inHorizontalScale, inVerticalScale. Two modes of pixel interpolation are available, the bilinear filtering being more precise and computationally expensive.

Examples

ResizeImage_Relative performed on the sample image with inHorizontalScale = 0.5, inVerticalScale = 0.25.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

This operation is optimized for SSE2 technology for pixels of types: UINT8 (when inResizeMethod = Area), UINT16 (when inResizeMethod = Area), 3xUINT8 (when inResizeMethod = Area), 3xUINT16 (when inResizeMethod = Area).

This operation is optimized for AVX2 technology for pixels of types: UINT8 (when inResizeMethod = Area), UINT16 (when inResizeMethod = Area), 3xUINT8 (when inResizeMethod = Area), 3xUINT16 (when inResizeMethod = Area).

See Also

  • ResizeImage – Enlarges or shrinks an image to new dimensions.