estimateAffinePartial2D function
(Mat, Mat)
estimateAffinePartial2D(
- VecPoint2f from,
- VecPoint2f to, {
- int method = RANSAC,
- double ransacReprojThreshold = 3,
- int maxIters = 2000,
- double confidence = 0.99,
- int refineIters = 10,
- OutputArray? inliers,
EstimateAffinePartial2D computes an optimal limited affine transformation with 4 degrees of freedom between two 2D point sets.
For further details, please see: https://docs.opencv.org/master/d9/d0c/group__calib3d.html#gad767faff73e9cbd8b9d92b955b50062d
Implementation
(Mat, Mat inliers) estimateAffinePartial2D(
VecPoint2f from,
VecPoint2f to, {
int method = RANSAC,
double ransacReprojThreshold = 3,
int maxIters = 2000,
double confidence = 0.99,
int refineIters = 10,
OutputArray? inliers,
}) {
inliers ??= Mat.empty();
final rval = Mat.empty();
cvRun(
() => ccalib3d.cv_estimateAffinePartial2D_1(
from.ref,
to.ref,
inliers!.ref,
method,
ransacReprojThreshold,
maxIters,
confidence,
refineIters,
rval.ptr,
ffi.nullptr,
),
);
return (rval, inliers);
}