OSVR-Core
Public Member Functions | List of all members
osvr::vbtracker::RANSACPoseEstimator Class Reference

Public Member Functions

bool operator() (CameraParameters const &camParams, LedPtrList const &leds, BeaconStateVec const &beacons, std::vector< BeaconData > &beaconDebug, Eigen::Vector3d &outXlate, Eigen::Quaterniond &outQuat, int skipBrightsCutoff=-1, std::size_t iterations=5)
 Perform RANSAC-based pose estimation. More...
 
bool operator() (EstimatorInOutParams const &p, LedPtrList const &leds)
 Perform RANSAC-based pose estimation and use it to update a body state (state vector and error covariance) More...
 

Member Function Documentation

§ operator()() [1/2]

bool osvr::vbtracker::RANSACPoseEstimator::operator() ( CameraParameters const &  camParams,
LedPtrList const &  leds,
BeaconStateVec const &  beacons,
std::vector< BeaconData > &  beaconDebug,
Eigen::Vector3d &  outXlate,
Eigen::Quaterniond outQuat,
int  skipBrightsCutoff = -1,
std::size_t  iterations = 5 
)

Perform RANSAC-based pose estimation.

Parameters
[out]outXlatetranslation output parameter
[out]outQuatrotation output parameter
skipBrightsCutoffIf positive, the number of non-bright LEDs seen that will trigger us to skip using bright LEDs in pose estimation.
Returns
true if a pose was estimated.

Effectively invert the image points here so we get the output of a coordinate system we want.

Make a vector of the inlier beacon IDs.

Now, we will sort that vector of inlier beacon IDs so we can rapidly binary search it to flag the LEDs we used.

Get to Eigen via OpenCV's Affine transform class.

Todo:
find out why OpenCV is now returning these values sometimes

§ operator()() [2/2]

bool osvr::vbtracker::RANSACPoseEstimator::operator() ( EstimatorInOutParams const &  p,
LedPtrList const &  leds 
)

Perform RANSAC-based pose estimation and use it to update a body state (state vector and error covariance)

Parameters
[out]stateTracked body state that will be updated if a pose was estimated
Returns
true if a pose was estimated.

Call the main pose estimation to get the vector and quat.

OK, so if we're here, estimation succeeded and we have valid data in xlate and quat.

Zero things we can't measure.

Todo:
Copy the existing angular velocity error covariance

The documentation for this class was generated from the following files: