Class PnpPoseEstimator

Class Documentation

class aslam::geometric_vision::PnpPoseEstimator

Public Functions

inline explicit PnpPoseEstimator(bool run_nonlinear_refinement)
inline PnpPoseEstimator(bool run_nonlinear_refinement, bool random_seed)

This constructor should be used for when a deterministic seed (set from outside) is necessary, such as for testing.

bool absolutePoseRansacPinholeCam(const Eigen::Matrix2Xd &measurements, const Eigen::Matrix3Xd &G_landmark_positions, double pixel_sigma, int max_ransac_iters, aslam::Camera::ConstPtr camera_ptr, aslam::Transformation *T_G_C, std::vector<int> *inliers, int *num_iters)

The pinhole variants of these methods are wrappers that determine an appropriate ransac_threshold from pixel_sigma and camera focal lengths for pinhole cameras.

bool absoluteMultiPoseRansacPinholeCam(const Eigen::Matrix2Xd &measurements, const std::vector<int> &measurement_camera_indices, const Eigen::Matrix3Xd &G_landmark_positions, double pixel_sigma, int max_ransac_iters, aslam::NCamera::ConstPtr ncamera_ptr, aslam::Transformation *T_G_I, std::vector<int> *inliers, int *num_iters)
bool absoluteMultiPoseRansacPinholeCam(const Eigen::Matrix2Xd &measurements, const std::vector<int> &measurement_camera_indices, const Eigen::Matrix3Xd &G_landmark_positions, double pixel_sigma, int max_ransac_iters, aslam::NCamera::ConstPtr ncamera_ptr, aslam::Transformation *T_G_I, std::vector<int> *inliers, std::vector<double> *inlier_distances_to_model, int *num_iters)
bool absolutePoseRansac(const Eigen::Matrix2Xd &measurements, const Eigen::Matrix3Xd &G_landmark_positions, double pixel_sigma, int max_ransac_iters, aslam::Camera::ConstPtr camera_ptr, aslam::Transformation *T_G_C, std::vector<int> *inliers, int *num_iters)
bool absoluteMultiPoseRansac(const Eigen::Matrix2Xd &measurements, const std::vector<int> &measurement_camera_indices, const Eigen::Matrix3Xd &G_landmark_positions, double ransac_threshold, int max_ransac_iters, aslam::NCamera::ConstPtr ncamera_ptr, aslam::Transformation *T_G_I, std::vector<int> *inliers, int *num_iters)

Same as the above functions, but supports multiple cameras.

Only additional information is the NCamera (instead of Camera) pointer and a vector, measurement_camera_indices, of the same length as measurements that maps each measurement to a camera index (corresponding to the index in NCamera).

bool absoluteMultiPoseRansac(const Eigen::Matrix2Xd &measurements, const std::vector<int> &measurement_camera_indices, const Eigen::Matrix3Xd &G_landmark_positions, double ransac_threshold, int max_ransac_iters, aslam::NCamera::ConstPtr ncamera_ptr, aslam::Transformation *T_G_I, std::vector<int> *inliers, std::vector<double> *inlier_distances_to_model, int *num_iters)