initWideAngleProjMapAsync function

Future<(double, Mat, Mat)> initWideAngleProjMapAsync(
  1. InputArray cameraMatrix,
  2. InputArray distCoeffs,
  3. Size imageSize,
  4. int destImageWidth,
  5. int m1type, {
  6. OutputArray? map1,
  7. OutputArray? map2,
  8. int projType = PROJ_SPHERICAL_EQRECT,
  9. double alpha = 0,
})

Implementation

Future<(double rval, Mat map1, Mat map2)> initWideAngleProjMapAsync(
  InputArray cameraMatrix,
  InputArray distCoeffs,
  Size imageSize,
  int destImageWidth,
  int m1type, {
  OutputArray? map1,
  OutputArray? map2,
  int projType = PROJ_SPHERICAL_EQRECT,
  double alpha = 0,
}) async {
  map1 ??= Mat.empty();
  map2 ??= Mat.empty();
  final prval = calloc<ffi.Float>();
  return cvRunAsync0(
    (callback) => ccalib3d.cv_initWideAngleProjMap(
      cameraMatrix.ref,
      distCoeffs.ref,
      imageSize.ref,
      destImageWidth,
      m1type,
      map1!.ref,
      map2!.ref,
      projType,
      alpha,
      prval,
      callback,
    ),
    (c) {
      final rval = prval.value;
      calloc.free(prval);
      return c.complete((rval, map1!, map2!));
    },
  );
}