Back to Aurora Vision Library website

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

ConvertSpatialMapToMatrixMaps


Header: AVL.h
Namespace: avl
Module: Calibration

Splits a spatial map into two matrices of source coordinates.

Syntax

C++
C#
 
void avl::ConvertSpatialMapToMatrixMaps
(
	const avl::SpatialMap& inSpatialMap,
	bool inRoundingOpenCV,
	avl::Matrix& outMatrixX,
	avl::Matrix& outMatrixY
)

Parameters

Name Type Default Description
Input value inSpatialMap const SpatialMap&
Input value inRoundingOpenCV bool Use same interpolation convention as cvRemap
Output value outMatrixX Matrix& Map of real X coordinates
Output value outMatrixY Matrix& Map of real Y coordinates

Description

This operation allows to inspect the accessed coordinates in the image being remapped.

If the input SpatialMap uses the nearest neighbor interpolation, it is not possible to recover the exact source coordinates. In that case the pixel center, or the top left corner when using inRoundingOpenCV set to True, is taken as an approximation.

Remarks

For pixels in the input spatial map which are not well defined, an artificial pair of invalid coordinates, (-10, -10), is returned.

The inRoundingOpenCV parameter should be set to True if the matrices will be used with OpenCV Remap function. This ensures the results of OpenCV Remap function will be the same as of RemapImage used with the input SpatialMap.

See Also

  • RemapImage – Applies a precomputed image transform, defined by a spatial map object.