pub trait OdometryConst: AlgorithmTraitConst {
    // Required method
    fn as_raw_Odometry(&self) -> *const c_void;

    // Provided methods
    fn compute(
        &self,
        src_image: &Mat,
        src_depth: &Mat,
        src_mask: &Mat,
        dst_image: &Mat,
        dst_depth: &Mat,
        dst_mask: &Mat,
        rt: &mut dyn ToOutputArray,
        init_rt: &Mat
    ) -> Result<bool> { ... }
    fn compute2(
        &self,
        src_frame: &mut Ptr<OdometryFrame>,
        dst_frame: &mut Ptr<OdometryFrame>,
        rt: &mut dyn ToOutputArray,
        init_rt: &Mat
    ) -> Result<bool> { ... }
    fn prepare_frame_cache(
        &self,
        frame: &mut Ptr<OdometryFrame>,
        cache_type: i32
    ) -> Result<Size> { ... }
    fn get_camera_matrix(&self) -> Result<Mat> { ... }
    fn get_transform_type(&self) -> Result<i32> { ... }
}
Expand description

Constant methods for crate::rgbd::Odometry

Required Methods§

Provided Methods§

source

fn compute( &self, src_image: &Mat, src_depth: &Mat, src_mask: &Mat, dst_image: &Mat, dst_depth: &Mat, dst_mask: &Mat, rt: &mut dyn ToOutputArray, init_rt: &Mat ) -> Result<bool>

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).

Parameters
  • srcImage: Image data of the source frame (CV_8UC1)
  • srcDepth: Depth data of the source frame (CV_32FC1, in meters)
  • srcMask: Mask that sets which pixels have to be used from the source frame (CV_8UC1)
  • dstImage: Image data of the destination frame (CV_8UC1)
  • dstDepth: Depth data of the destination frame (CV_32FC1, in meters)
  • dstMask: Mask that sets which pixels have to be used from the destination frame (CV_8UC1)
  • Rt: Resulting 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: Initial transformation from the source frame to the destination one (optional)
C++ default parameters
  • init_rt: Mat()
source

fn compute2( &self, src_frame: &mut Ptr<OdometryFrame>, dst_frame: &mut Ptr<OdometryFrame>, rt: &mut dyn ToOutputArray, init_rt: &Mat ) -> Result<bool>

One more method to compute a transformation from the source frame to the destination one. It is designed to save on computing the frame data (image pyramids, normals, etc.).

C++ default parameters
  • init_rt: Mat()
source

fn prepare_frame_cache( &self, frame: &mut Ptr<OdometryFrame>, cache_type: i32 ) -> Result<Size>

Prepare a cache for the frame. The function checks the precomputed/passed data (throws the error if this data does not satisfy) and computes all remaining cache data needed for the frame. Returned size is a resolution of the prepared frame.

Parameters
  • frame: The odometry which will process the frame.
  • cacheType: The cache type: CACHE_SRC, CACHE_DST or CACHE_ALL.
source

fn get_camera_matrix(&self) -> Result<Mat>

See also

setCameraMatrix

source

fn get_transform_type(&self) -> Result<i32>

See also

setTransformType

Implementors§