Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches
visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator Class Reference

Classes

class  ViewPointMatcher

Public Member Functions

 __init__ (self, Path save_folder, bool use_3d, bool use_dense, int top_k, float min_similarity, float min_match_ratio, float geometric_threshold)
 record (self, RBFeatureTrackerInput frame, HomogeneousMatrix cTo)
Tuple[bool, HomogeneousMatrix] estimate_pose (self, ImageRGBa image, depth, CameraParameters cam)
 save (self)

Public Attributes

 xfeat_backend = XFeatBackend(top_k, min_similarity)
 save_folder = save_folder
 use_3d = use_3d
list views = []
 min_match_ratio = min_match_ratio
 geometric_threshold = geometric_threshold
 optim_params = LevenbergMarquardtParameters()

Detailed Description

Pose estimation based on XFeat keypoints and a PnP approach.
This strategy first matches the current frame with viewpoints learned beforehand.

Viewpoints that have a large enough number of matched keypoints are retained for the second step of the method.
In the second step, The 3D points associated to a view have their reprojection error with the currently observed keypoints minimized.
Minimization can be done in 2D or 3D space.

Definition at line 55 of file XFeatPoseEstimator.py.

Constructor & Destructor Documentation

◆ __init__()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.__init__ ( self,
Path save_folder,
bool use_3d,
bool use_dense,
int top_k,
float min_similarity,
float min_match_ratio,
float geometric_threshold )
Initialize the Pose estimator.


Args:
    backend (XFeatBackend): _description_
    save_folder (Path): _description_
    top_k (int): _description_
    min_similarity (float): _description_
    min_match_ratio (float): _description_
    point_distance_threshold (float): _description_

Definition at line 259 of file XFeatPoseEstimator.py.

Member Function Documentation

◆ estimate_pose()

Tuple[bool, HomogeneousMatrix] visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.estimate_pose ( self,
ImageRGBa image,
depth,
CameraParameters cam )

◆ record()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.record ( self,
RBFeatureTrackerInput frame,
HomogeneousMatrix cTo )
Record a new viewpoint

Args:
    frame (RBFeatureTrackerInput): _description_
    cTo (HomogeneousMatrix): _description_

Definition at line 301 of file XFeatPoseEstimator.py.

References optim_params, visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.optim_params, views, visp.python.rbt.PythonRBExtensions.PythonRBExtensions.xfeat_backend, and xfeat_backend.

◆ save()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.save ( self)

Definition at line 405 of file XFeatPoseEstimator.py.

References save_folder, and views.

Member Data Documentation

◆ geometric_threshold

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.geometric_threshold = geometric_threshold

Definition at line 277 of file XFeatPoseEstimator.py.

Referenced by estimate_pose().

◆ min_match_ratio

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.min_match_ratio = min_match_ratio

Definition at line 276 of file XFeatPoseEstimator.py.

Referenced by estimate_pose().

◆ optim_params

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.optim_params = LevenbergMarquardtParameters()

◆ save_folder

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.save_folder = save_folder

Definition at line 273 of file XFeatPoseEstimator.py.

Referenced by save().

◆ use_3d

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.use_3d = use_3d

◆ views

list visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.views = []

Definition at line 275 of file XFeatPoseEstimator.py.

Referenced by estimate_pose(), record(), and save().

◆ xfeat_backend

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.xfeat_backend = XFeatBackend(top_k, min_similarity)

Definition at line 271 of file XFeatPoseEstimator.py.

Referenced by estimate_pose(), and record().