| Cv2EstimateAffinePartial2D Method |
Computes an optimal limited affine transformation with 4 degrees of freedom between two 2D point sets.
Namespace:
OpenCvSharp
Assembly:
OpenCvSharp (in OpenCvSharp.dll) Version: 1.0.0
Syntax public static Mat EstimateAffinePartial2D(
InputArray from,
InputArray to,
OutputArray inliers = null,
RobustEstimationAlgorithms method = RobustEstimationAlgorithms.RANSAC,
double ransacReprojThreshold = 3,
ulong maxIters = 2000,
double confidence = 0.99,
ulong refineIters = 10
)
Public Shared Function EstimateAffinePartial2D (
from As InputArray,
to As InputArray,
Optional inliers As OutputArray = Nothing,
Optional method As RobustEstimationAlgorithms = RobustEstimationAlgorithms.RANSAC,
Optional ransacReprojThreshold As Double = 3,
Optional maxIters As ULong = 2000,
Optional confidence As Double = 0.99,
Optional refineIters As ULong = 10
) As Mat
public:
static Mat^ EstimateAffinePartial2D(
InputArray^ from,
InputArray^ to,
OutputArray^ inliers = nullptr,
RobustEstimationAlgorithms method = RobustEstimationAlgorithms::RANSAC,
double ransacReprojThreshold = 3,
unsigned long long maxIters = 2000,
double confidence = 0.99,
unsigned long long refineIters = 10
)
static member EstimateAffinePartial2D :
from : InputArray *
to : InputArray *
?inliers : OutputArray *
?method : RobustEstimationAlgorithms *
?ransacReprojThreshold : float *
?maxIters : uint64 *
?confidence : float *
?refineIters : uint64
(* Defaults:
let _inliers = defaultArg inliers null
let _method = defaultArg method RobustEstimationAlgorithms.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: OpenCvSharpInputArray
First input 2D point set. - to
- Type: OpenCvSharpInputArray
Second input 2D point set. - inliers (Optional)
- Type: OpenCvSharpOutputArray
Output vector indicating which points are inliers. - method (Optional)
- Type: OpenCvSharpRobustEstimationAlgorithms
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: SystemUInt64
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: SystemUInt64
[Missing <param name="refineIters"/> documentation for "M:OpenCvSharp.Cv2.EstimateAffinePartial2D(OpenCvSharp.InputArray,OpenCvSharp.InputArray,OpenCvSharp.OutputArray,OpenCvSharp.RobustEstimationAlgorithms,System.Double,System.UInt64,System.Double,System.UInt64)"]
Return Value
Type:
MatOutput 2D affine transformation (4 degrees of freedom) matrix 2x3 or empty matrix if transformation could not be estimated.
See Also