decomposeHomographyMatAsync function
Decompose a homography matrix to rotation(s), translation(s) and plane normal(s).
int cv::decomposeHomographyMat (InputArray H, InputArray K, OutputArrayOfArrays rotations, OutputArrayOfArrays translations, OutputArrayOfArrays normals)
https://docs.opencv.org/4.11.0/d9/d0c/group__calib3d.html#ga7f60bdff78833d1e3fd6d9d0fd538d92
Implementation
Future<(int rval, VecMat rotations, VecMat translations, VecMat normals)> decomposeHomographyMatAsync(
Mat H,
Mat K, {
VecMat? rotations,
VecMat? translations,
VecMat? normals,
}) async {
rotations ??= VecMat();
translations ??= VecMat();
normals ??= VecMat();
final prval = calloc<ffi.Int>();
return cvRunAsync0(
(callback) => ccalib3d.cv_decomposeHomographyMat(
H.ref,
K.ref,
rotations!.ref,
translations!.ref,
normals!.ref,
prval,
callback,
), (c) {
final rval = prval.value;
calloc.free(prval);
return c.complete((rval, rotations!, translations!, normals!));
});
}