findHomographyUsac function
Mat
findHomographyUsac(
- InputArray srcPoints,
- InputArray dstPoints,
- UsacParams params, {
- OutputArray? mask,
FindHomography finds an optimal homography matrix using 4 or more point pairs (as opposed to GetPerspectiveTransform, which uses exactly 4)
Mat cv::findHomography (InputArray srcPoints, InputArray dstPoints, OutputArray mask, const UsacParams ¶ms)
https://docs.opencv.org/4.11.0/d9/d0c/group__calib3d.html#ga4b3841447530523e5272ec05c5d1e411
Implementation
Mat findHomographyUsac(InputArray srcPoints, InputArray dstPoints, UsacParams params, {OutputArray? mask}) {
mask ??= Mat.empty();
final prval = calloc<cvg.Mat>();
cvRun(
() =>
ccalib3d.cv_findHomography_1(srcPoints.ref, dstPoints.ref, mask!.ref, params.ref, prval, ffi.nullptr),
);
return Mat.fromPointer(prval);
}