MATLAB File Help: cv.convertMaps | Index |
Converts image transformation maps from one representation to another
[dstmap1, dstmap2] = cv.convertMaps(map1, map2)
[dstmap1, dstmap2] = cv.convertMaps(map1)
[...] = cv.convertMaps(..., 'OptionName',optionValue, ...)
int16
(MxNx2), single
(MxN), or
single
(MxNx2).uint16
(MxN) or single
(MxN), or none (empty map if map1
is
(x,y) points), respectively.DstMap1Type
and the same row/col size as src
. See details below.map1
is in fixed-point representation, the output type is
'single2' (for combined floating-point representation), otherwise if
map1
is in floating-point representation, the output type is `int16'
(for fixed-point representation). Accepted types are:int16
arraysingle
matrixsingle
matrixThe function converts a pair of maps for cv.remap from one representation to
another. The following options (map1, map2) -> (dstmap1, dstmap2)
are
supported (in terms of class and number of channels of maps):
(single 1-cn, single 1-cn) -> (int16 2-cn, uint16 1-cn)
: This is the
most frequently used conversion operation, in which the original
floating-point maps (see cv.remap) are converted to a more compact and
much faster fixed-point representation. The first output array contains
the rounded coordinates and the second array (created only when
NNInterpolation=false
) contains indices in the interpolation tables.
(single 2-cn, []) -> (int16 2-cn, uint16 1-cn)
: The same as above but
the original maps are stored in one 2-channel matrix.
(int16 2-cn, uint16 1-cn) -> (single 1-cn, single 1-cn)
or
(int16 2-cn, uint16 1-cn) -> (single 2-cn, [])
: Reverse conversion.
Obviously, the reconstructed floating-point maps will not be exactly the
same as the originals.