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

Public Member Functions

 __init__ (self, LevenbergMarquardtParameters optim_params)
 save (self, Path path)
bool load (self, Path path, int view_id)
 match_and_score (self, cam, XFeatBackend backend, current_repr)
 optimize_3d (self, depth, threshold)
 optimize_2d (self, cam, threshold)
Tuple[HomogeneousMatrix, bool] optimize (self, use_3d, threshold, CameraParameters cam=None, depth=None)
 display_record (self, ImageRGBa image, cTo, CameraParameters cam)
 display_result (self, image, cMo, cam)
 compute_residual (self, cMo, cam)

Static Public Member Functions

 reformat_repr_if_needed (r)

Public Attributes

 pose = None
 view_id = None
bool points_3d = None
 descriptors = None
dict representation = {}
 optim_params = optim_params
 idx_curr_matches
 idx_stored_matches = backend.match(current_repr['descriptors'], self.representation['descriptors'])
bool matched_p3d = self.points_3d[self.idx_stored_matches].copy()
 matched_obs = kps_curr[self.idx_curr_matches.cpu().numpy()]
 matched_obs_x
 matched_obs_y = PixelMeterConversion.convertPoints(cam, self.matched_obs[:, 0], self.matched_obs[:, 1])
 error = np.mean(res)

Detailed Description

Definition at line 63 of file XFeatPoseEstimator.py.

Constructor & Destructor Documentation

◆ __init__()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.__init__ ( self,
LevenbergMarquardtParameters optim_params )

Definition at line 64 of file XFeatPoseEstimator.py.

Member Function Documentation

◆ compute_residual()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.compute_residual ( self,
cMo,
cam )

Definition at line 255 of file XFeatPoseEstimator.py.

References matched_obs.

◆ display_record()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.display_record ( self,
ImageRGBa image,
cTo,
CameraParameters cam )

◆ display_result()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.display_result ( self,
image,
cMo,
cam )

◆ load()

bool visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.load ( self,
Path path,
int view_id )

◆ match_and_score()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.match_and_score ( self,
cam,
XFeatBackend backend,
current_repr )

Definition at line 119 of file XFeatPoseEstimator.py.

◆ optimize()

Tuple[HomogeneousMatrix, bool] visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.optimize ( self,
use_3d,
threshold,
CameraParameters cam = None,
depth = None )

Definition at line 186 of file XFeatPoseEstimator.py.

References optimize_2d(), and optimize_3d().

◆ optimize_2d()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.optimize_2d ( self,
cam,
threshold )

◆ optimize_3d()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.optimize_3d ( self,
depth,
threshold )

◆ reformat_repr_if_needed()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.reformat_repr_if_needed ( r)
static

Definition at line 105 of file XFeatPoseEstimator.py.

◆ save()

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.save ( self,
Path path )

Member Data Documentation

◆ descriptors

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.descriptors = None

◆ error

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.error = np.mean(res)

◆ idx_curr_matches

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.idx_curr_matches

Definition at line 120 of file XFeatPoseEstimator.py.

◆ idx_stored_matches

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.idx_stored_matches = backend.match(current_repr['descriptors'], self.representation['descriptors'])

Definition at line 120 of file XFeatPoseEstimator.py.

◆ matched_obs

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.matched_obs = kps_curr[self.idx_curr_matches.cpu().numpy()]

Definition at line 128 of file XFeatPoseEstimator.py.

Referenced by compute_residual(), display_result(), optimize_2d(), and optimize_3d().

◆ matched_obs_x

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.matched_obs_x

Definition at line 129 of file XFeatPoseEstimator.py.

Referenced by display_result(), optimize_2d(), and optimize_3d().

◆ matched_obs_y

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.matched_obs_y = PixelMeterConversion.convertPoints(cam, self.matched_obs[:, 0], self.matched_obs[:, 1])

Definition at line 129 of file XFeatPoseEstimator.py.

Referenced by display_result(), optimize_2d(), and optimize_3d().

◆ matched_p3d

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.matched_p3d = self.points_3d[self.idx_stored_matches].copy()

Definition at line 127 of file XFeatPoseEstimator.py.

Referenced by display_result(), optimize_2d(), and optimize_3d().

◆ optim_params

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.optim_params = optim_params

◆ points_3d

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.points_3d = None

Definition at line 67 of file XFeatPoseEstimator.py.

Referenced by display_record(), load(), and save().

◆ pose

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.pose = None

◆ representation

dict visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.representation = {}

Definition at line 69 of file XFeatPoseEstimator.py.

Referenced by load(), and save().

◆ view_id

visp.python.rbt.xfeat.XFeatPoseEstimator.XFeatViewPointPoseEstimator.ViewPointMatcher.view_id = None

Definition at line 66 of file XFeatPoseEstimator.py.

Referenced by load(), and save().