Table of Contents

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

from InputArray

First input 2D point set.

to InputArray

Second input 2D point set.

inliers OutputArray

Output vector indicating which points are inliers (optional).

method RobustEstimationAlgorithms

Robust method used to compute the transformation.

ransacReprojThreshold double

Maximum reprojection error in the RANSAC algorithm to consider a point as an inlier.

maxIters ulong

The maximum number of robust method iterations.

confidence double

Confidence level, between 0 and 1.

refineIters ulong

Maximum number of iterations of refining algorithm (Levenberg-Marquardt).

Returns

Vec2d

The estimated 2D translation vector.