Method EstimateTranslation2D
- Namespace
- OpenCvSharp
- Assembly
- OpenCvSharp.dll
EstimateTranslation2D(InputArray, InputArray, OutputArray, RobustEstimationAlgorithms, double, ulong, double, ulong)
Computes an optimal translation between two 2D point sets.
public static Vec2d EstimateTranslation2D(InputArray from, InputArray to, OutputArray inliers = default, RobustEstimationAlgorithms method = RobustEstimationAlgorithms.RANSAC, double ransacReprojThreshold = 3, ulong maxIters = 2000, double confidence = 0.99, ulong refineIters = 0)
Parameters
fromInputArrayFirst input 2D point set.
toInputArraySecond input 2D point set.
inliersOutputArrayOutput vector indicating which points are inliers (optional).
methodRobustEstimationAlgorithmsRobust method used to compute the transformation.
ransacReprojThresholddoubleMaximum reprojection error in the RANSAC algorithm to consider a point as an inlier.
maxItersulongThe maximum number of robust method iterations.
confidencedoubleConfidence level, between 0 and 1.
refineItersulongMaximum number of iterations of refining algorithm (Levenberg-Marquardt).
Returns
- Vec2d
The estimated 2D translation vector.