[][src]Function opencv::imgproc::convert_maps

pub fn convert_maps(
    map1: &dyn ToInputArray,
    map2: &dyn ToInputArray,
    dstmap1: &mut dyn ToOutputArray,
    dstmap2: &mut dyn ToOutputArray,
    dstmap1type: i32,
    nninterpolation: bool
) -> Result<()>

Converts image transformation maps from one representation to another.

The function converts a pair of maps for remap from one representation to another. The following options ( (map1.type(), map2.type()) inline formula (dstmap1.type(), dstmap2.type()) ) are supported:

  • inline formula. This is the most frequently used conversion operation, in which the original floating-point maps (see 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.

  • inline formula. The same as above but the original maps are stored in one 2-channel matrix.

  • Reverse conversion. Obviously, the reconstructed floating-point maps will not be exactly the same as the originals.

Parameters

  • map1: The first input map of type CV_16SC2, CV_32FC1, or CV_32FC2 .
  • map2: The second input map of type CV_16UC1, CV_32FC1, or none (empty matrix), respectively.
  • dstmap1: The first output map that has the type dstmap1type and the same size as src .
  • dstmap2: The second output map.
  • dstmap1type: Type of the first output map that should be CV_16SC2, CV_32FC1, or CV_32FC2 .
  • nninterpolation: Flag indicating whether the fixed-point maps are used for the nearest-neighbor or for a more complex interpolation.

See also

remap, undistort, initUndistortRectifyMap

C++ default parameters

  • nninterpolation: false