CvInvokeEstimateAffine2D Method (PointF, PointF, IOutputArray, RobustEstimationAlgorithm, Double, Int32, Double, Int32) |
http://www.emgu.com
Computes an optimal affine transformation between two 2D point sets.
Namespace:
Emgu.CV
Assembly:
Emgu.CV.World (in Emgu.CV.World.dll) Version: 4.1.1.3497 (4.1.1.3497)
Syntaxpublic static Mat EstimateAffine2D(
PointF[] from,
PointF[] to,
IOutputArray inliners = null,
RobustEstimationAlgorithm method = RobustEstimationAlgorithm.Ransac,
double ransacReprojThreshold = 3,
int maxIters = 2000,
double confidence = 0.99,
int refineIters = 10
)
Public Shared Function EstimateAffine2D (
from As PointF(),
to As PointF(),
Optional inliners As IOutputArray = Nothing,
Optional method As RobustEstimationAlgorithm = RobustEstimationAlgorithm.Ransac,
Optional ransacReprojThreshold As Double = 3,
Optional maxIters As Integer = 2000,
Optional confidence As Double = 0.99,
Optional refineIters As Integer = 10
) As Mat
public:
static Mat^ EstimateAffine2D(
array<PointF>^ from,
array<PointF>^ to,
IOutputArray^ inliners = nullptr,
RobustEstimationAlgorithm method = RobustEstimationAlgorithm::Ransac,
double ransacReprojThreshold = 3,
int maxIters = 2000,
double confidence = 0.99,
int refineIters = 10
)
static member EstimateAffine2D :
from : PointF[] *
to : PointF[] *
?inliners : IOutputArray *
?method : RobustEstimationAlgorithm *
?ransacReprojThreshold : float *
?maxIters : int *
?confidence : float *
?refineIters : int
(* Defaults:
let _inliners = defaultArg inliners null
let _method = defaultArg method RobustEstimationAlgorithm.Ransac
let _ransacReprojThreshold = defaultArg ransacReprojThreshold 3
let _maxIters = defaultArg maxIters 2000
let _confidence = defaultArg confidence 0.99
let _refineIters = defaultArg refineIters 10
*)
-> Mat
Parameters
- from
- Type: System.DrawingPointF
First input 2D point set containing (X,Y). - to
- Type: System.DrawingPointF
Second input 2D point set containing (x,y). - inliners (Optional)
- Type: Emgu.CVIOutputArray
Output vector indicating which points are inliers (1-inlier, 0-outlier). - method (Optional)
- Type: Emgu.CV.CvEnumRobustEstimationAlgorithm
Robust method used to compute transformation. - ransacReprojThreshold (Optional)
- Type: SystemDouble
Maximum reprojection error in the RANSAC algorithm to consider a point as an inlier. Applies only to RANSAC. - maxIters (Optional)
- Type: SystemInt32
The maximum number of robust method iterations. - confidence (Optional)
- Type: SystemDouble
Confidence level, between 0 and 1, for the estimated transformation. Anything between 0.95 and 0.99 is usually good enough. Values too close to 1 can slow down the estimation significantly. Values lower than 0.8-0.9 can result in an incorrectly estimated transformation. - refineIters (Optional)
- Type: SystemInt32
Maximum number of iterations of refining algorithm (Levenberg-Marquardt). Passing 0 will disable refining, so the output matrix will be output of robust method.
Return Value
Type:
MatOutput 2D affine transformation matrix 2×3 or empty matrix if transformation could not be estimated.
See Also