Class Odometry
Base class for computation of odometry.
public class Odometry : SharedPtrObject, IDisposable, IAlgorithm
- Inheritance
-
Odometry
- Implements
- Inherited Members
- Extension Methods
Constructors
Odometry(string)
Create an Odometry instance.
public Odometry(string odometryType)
Parameters
odometryType
stringOne of the odometry type: "RgbdOdometry", "ICPOdometry", "RgbdICPOdometry" or "FastICPOdometry"
Properties
AlgorithmPtr
Pointer to the native algorithm object
public nint AlgorithmPtr { get; }
Property Value
Methods
Compute(Mat, Mat, Mat, Mat, Mat, Mat, IOutputArray, Mat)
Method to compute a transformation from the source frame to the destination one. Some odometry algorithms do not used some data of frames (eg. ICP does not use images). In such case corresponding arguments can be set as empty Mat. The method returns true if all internal computations were possible (e.g. there were enough correspondences, system of equations has a solution, etc) and resulting transformation satisfies some test if it's provided by the Odometry inheritor implementation (e.g. thresholds for maximum translation and rotation).
public bool Compute(Mat srcImage, Mat srcDepth, Mat srcMask, Mat dstImage, Mat dstDepth, Mat dstMask, IOutputArray rt, Mat initRt = null)
Parameters
srcImage
MatImage data of the source frame (CV_8UC1)
srcDepth
MatDepth data of the source frame (CV_32FC1, in meters)
srcMask
MatMask that sets which pixels have to be used from the source frame (CV_8UC1)
dstImage
MatImage data of the destination frame (CV_8UC1)
dstDepth
MatDepth data of the destination frame (CV_32FC1, in meters)
dstMask
MatMask that sets which pixels have to be used from the destination frame (CV_8UC1)
rt
IOutputArrayResulting transformation from the source frame to the destination one (rigid body motion): dst_p = Rt * src_p, where dst_p is a homogeneous point in the destination frame and src_p is homogeneous point in the source frame, Rt is 4x4 matrix of CV_64FC1 type.
initRt
MatInitial transformation from the source frame to the destination one (optional)
Returns
- bool
True if all internal computations were possible
DisposeObject()
Release the unmanaged memory associated with this object
protected override void DisposeObject()