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.

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

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

  • matches_0_1[in] 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.

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

  • ransac_max_iters[in] Maximum number of RANSAC iterations.

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

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

Returns

Success of relative pose 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.