Back to Aurora Vision Library website

You are here: Start » Function Reference » Image » Image Spatial Transforms Maps » CreateImageResizeMap

CreateImageResizeMap


Header: AVL.h
Namespace: avl
Module: Calibration

Creates a spatial map representing an image resizing.

Applications: Data preprocessing for fast image resize between two constant sizes. The result is used by RemapImage.

Syntax

C++
C#
 
void avl::CreateImageResizeMap
(
	const avl::ImageFormat& inImageFormat,
	int inNewWidth,
	int inNewHeight,
	avl::InterpolationMethod::Type inInterpolationMethod,
	avl::SpatialMap& outResizeMap,
	atl::Optional<avl::Region&> outOutputRegion = atl::NIL
)

Parameters

Name Type Range Default Description
Input value inImageFormat const ImageFormat& Information about dimensions, depth and pixel type of the image
Input value inNewWidth int 1 - Width of an image created by output spatial map application
Input value inNewHeight int 1 - Height of an image created by output spatial map application
Input value inInterpolationMethod InterpolationMethod::Type Bilinear Interpolation method used in extraction of image pixel values
Output value outResizeMap SpatialMap& Output spatial map
Output value outOutputRegion Optional<Region&> NIL Pixels set by the spatial map application

Optional Outputs

The computation of following outputs can be switched off by passing value atl::NIL to these parameters: outOutputRegion.

Read more about Optional Outputs.

Description

The operation generates map that stretches or shrinks the image. Two modes of pixel interpolation are available, the bilinear filtering being more precise and computationally expensive. Usually creating map and then using RemapImage is faster than ResizeImage.

See Also

  • RemapImage – Applies a precomputed image transform, defined by a spatial map object.
  • ResizeImage – Enlarges or shrinks an image to new dimensions.