Class RelativeNonCentralPnp

Class Documentation

class geometric_vision::RelativeNonCentralPnp

Public Functions

inline explicit RelativeNonCentralPnp(bool run_nonlinear_refinement)
inline RelativeNonCentralPnp(bool run_nonlinear_refinement, MultiNonCentralRelativeSacPnp::Algorithm solver, bool random_seed)

Set the random seed and solver.

inline int getMinRequiredMatches() const
bool computePinhole(const aslam::VisualNFrame::ConstPtr &nframe_0, const aslam::VisualNFrame::ConstPtr &nframe_1, const aslam::FrameToFrameMatchesList &matches_0_1, double pixel_sigma, size_t ransac_max_iters, pose::Transformation *T_I0_I1, size_t *num_inliers) const

Cast to pinhole type, calculate ransac threshold and call relative non-central PnP.

Return

Success of relative pose ransac.

Parameters
  • [in] nframe_0: Contains camera_rig and observations from viewpoint 0.

  • [in] nframe_1: Contains camera_rig and observations from viewpoint 1.

  • [in] matches_0_1: Matches from camera i in viewpoint 0 to camera i in viewpoint 1 where i=[0,num_cameras). E.g. matches[camera_idx][0].first contains the index of the first keypoint of the first nframe/viewpoint.

  • [in] pixel_sigma: Image noise standard deviation [pixels].

  • [in] ransac_max_iters: Maximum number of RANSAC iterations.

  • [out] T_I0_I1: Estimated RELATIVE camera translation and camera rotation transformation matrix between the two viewpoints (body frames).

  • [out] num_inliers: Number of inliers calculated by RANSAC.

bool compute(const aslam::VisualNFrame::ConstPtr &nframe_0, const aslam::VisualNFrame::ConstPtr &nframe_1, const aslam::FrameToFrameMatchesList &matches_0_1, double ransac_threshold, size_t ransac_max_iters, pose::Transformation *T_I0_I1, size_t *num_inliers) const

Compute relative non-central PNP using openGV and run RANSAC.