OKVIS ROS
|
A frontend using BRISK features. More...
#include <Frontend.hpp>
Public Types | |
typedef okvis::timing::Timer | TimerSwitchable |
Public Member Functions | |
Frontend (size_t numCameras) | |
Constructor. More... | |
virtual | ~Frontend () |
virtual bool | detectAndDescribe (size_t cameraIndex, std::shared_ptr< okvis::MultiFrame > frameOut, const okvis::kinematics::Transformation &T_WC, const std::vector< cv::KeyPoint > *keypoints) |
Detection and descriptor extraction on a per image basis. More... | |
virtual bool | dataAssociationAndInitialization (okvis::Estimator &estimator, okvis::kinematics::Transformation &T_WS_propagated, const okvis::VioParameters ¶ms, const std::shared_ptr< okvis::MapPointVector > map, std::shared_ptr< okvis::MultiFrame > framesInOut, bool *asKeyframe) |
Matching as well as initialization of landmarks and state. More... | |
virtual bool | propagation (const okvis::ImuMeasurementDeque &imuMeasurements, const okvis::ImuParameters &imuParams, okvis::kinematics::Transformation &T_WS_propagated, okvis::SpeedAndBias &speedAndBiases, const okvis::Time &t_start, const okvis::Time &t_end, Eigen::Matrix< double, 15, 15 > *covariance, Eigen::Matrix< double, 15, 15 > *jacobian) const |
Propagates pose, speeds and biases with given IMU measurements. More... | |
Getters related to the BRISK detector | |
size_t | getBriskDetectionOctaves () const |
Get the number of octaves of the BRISK detector. More... | |
double | getBriskDetectionThreshold () const |
Get the detection threshold of the BRISK detector. More... | |
double | getBriskDetectionAbsoluteThreshold () const |
Get the absolute threshold of the BRISK detector. More... | |
size_t | getBriskDetectionMaximumKeypoints () const |
Get the maximum amount of keypoints of the BRISK detector. More... | |
Getters related to the BRISK descriptor | |
bool | getBriskDescriptionRotationInvariance () const |
Get the rotation invariance setting of the BRISK descriptor. More... | |
bool | getBriskDescriptionScaleInvariance () const |
Get the scale invariance setting of the BRISK descriptor. More... | |
Other getters | |
double | getBriskMatchingThreshold () const |
Get the matching threshold. More... | |
float | getKeyframeInsertionOverlapThershold () const |
Get the area overlap threshold under which a new keyframe is inserted. More... | |
float | getKeyframeInsertionMatchingRatioThreshold () const |
Get the matching ratio threshold under which a new keyframe is inserted. More... | |
bool | isInitialized () |
Returns true if the initialization has been completed (RANSAC with actual translation) More... | |
Setters related to the BRISK detector | |
void | setBriskDetectionOctaves (size_t octaves) |
Set the number of octaves of the BRISK detector. More... | |
void | setBriskDetectionThreshold (double threshold) |
Set the detection threshold of the BRISK detector. More... | |
void | setBriskDetectionAbsoluteThreshold (double threshold) |
Set the absolute threshold of the BRISK detector. More... | |
void | setBriskDetectionMaximumKeypoints (size_t maxKeypoints) |
Set the maximum number of keypoints of the BRISK detector. More... | |
Setters related to the BRISK descriptor | |
void | setBriskDescriptionRotationInvariance (bool invariance) |
Set the rotation invariance setting of the BRISK descriptor. More... | |
void | setBriskDescriptionScaleInvariance (bool invariance) |
Set the scale invariance setting of the BRISK descriptor. More... | |
Other setters | |
void | setBriskMatchingThreshold (double threshold) |
Set the matching threshold. More... | |
void | setKeyframeInsertionOverlapThreshold (float threshold) |
Set the area overlap threshold under which a new keyframe is inserted. More... | |
void | setKeyframeInsertionMatchingRatioThreshold (float threshold) |
Set the matching ratio threshold under which a new keyframe is inserted. More... | |
Public Member Functions inherited from okvis::VioFrontendInterface | |
VioFrontendInterface () | |
virtual | ~VioFrontendInterface () |
Private Member Functions | |
bool | doWeNeedANewKeyframe (const okvis::Estimator &estimator, std::shared_ptr< okvis::MultiFrame > currentFrame) |
Decision whether a new frame should be keyframe or not. More... | |
template<class MATCHING_ALGORITHM > | |
int | matchToKeyframes (okvis::Estimator &estimator, const okvis::VioParameters ¶ms, const uint64_t currentFrameId, bool &rotationOnly, bool usePoseUncertainty=true, double *uncertainMatchFraction=0, bool removeOutliers=true) |
Match a new multiframe to existing keyframes. More... | |
template<class MATCHING_ALGORITHM > | |
int | matchToLastFrame (okvis::Estimator &estimator, const okvis::VioParameters ¶ms, const uint64_t currentFrameId, bool usePoseUncertainty=true, bool removeOutliers=true) |
Match a new multiframe to the last frame. More... | |
template<class MATCHING_ALGORITHM > | |
void | matchStereo (okvis::Estimator &estimator, std::shared_ptr< okvis::MultiFrame > multiFrame) |
Match the frames inside the multiframe to each other to initialise new landmarks. More... | |
int | runRansac3d2d (okvis::Estimator &estimator, const okvis::cameras::NCameraSystem &nCameraSystem, std::shared_ptr< okvis::MultiFrame > currentFrame, bool removeOutliers) |
Perform 3D/2D RANSAC. More... | |
int | runRansac2d2d (okvis::Estimator &estimator, const okvis::VioParameters ¶ms, uint64_t currentFrameId, uint64_t olderFrameId, bool initializePose, bool removeOutliers, bool &rotationOnly) |
Perform 2D/2D RANSAC. More... | |
void | initialiseBriskFeatureDetectors () |
(re)instantiates feature detectors and descriptor extractors. Used after settings changed or at startup. More... | |
Private Attributes | |
std::vector< std::shared_ptr < cv::FeatureDetector > > | featureDetectors_ |
feature detectors with the current settings. The vector contains one for each camera to ensure that there are no problems with parallel detection. More... | |
std::vector< std::shared_ptr < cv::DescriptorExtractor > > | descriptorExtractors_ |
feature descriptors with the current settings. The vector contains one for each camera to ensure that there are no problems with parallel detection. More... | |
std::vector< std::unique_ptr < std::mutex > > | featureDetectorMutexes_ |
Mutexes for feature detectors and descriptors. More... | |
bool | isInitialized_ |
Is the pose initialised? More... | |
const size_t | numCameras_ |
Number of cameras in the configuration. More... | |
std::unique_ptr < okvis::DenseMatcher > | matcher_ |
Matcher object. More... | |
float | keyframeInsertionOverlapThreshold_ |
If the hull-area around all matched keypoints of the current frame (with existing landmarks) divided by the hull-area around all keypoints in the current frame is lower than this threshold it should be a new keyframe. More... | |
float | keyframeInsertionMatchingRatioThreshold_ |
If the number of matched keypoints of the current frame with an older frame divided by the amount of points inside the convex hull around all keypoints is lower than the threshold it should be a keyframe. More... | |
BRISK detection parameters | |
size_t | briskDetectionOctaves_ |
The set number of brisk octaves. More... | |
double | briskDetectionThreshold_ |
The set BRISK detection threshold. More... | |
double | briskDetectionAbsoluteThreshold_ |
The set BRISK absolute detection threshold. More... | |
size_t | briskDetectionMaximumKeypoints_ |
The set maximum number of keypoints. More... | |
BRISK descriptor extractor parameters | |
bool | briskDescriptionRotationInvariance_ |
The set rotation invariance setting. More... | |
bool | briskDescriptionScaleInvariance_ |
The set scale invariance setting. More... | |
BRISK matching parameters | |
double | briskMatchingThreshold_ |
The set BRISK matching threshold. More... | |
A frontend using BRISK features.
okvis::Frontend::Frontend | ( | size_t | numCameras | ) |
Constructor.
numCameras | Number of cameras in the sensor configuration. |
|
inlinevirtual |
|
virtual |
Matching as well as initialization of landmarks and state.
estimator | Estimator. | |
T_WS_propagated | Pose of sensor at image capture time. | |
params | Configuration parameters. | |
map | Unused. | |
framesInOut | Multiframe including the descriptors of all the keypoints. | |
[out] | asKeyframe | Should the frame be a keyframe? |
Implements okvis::VioFrontendInterface.
|
virtual |
Detection and descriptor extraction on a per image basis.
cameraIndex | Index of camera to do detection and description. | |
frameOut | Multiframe containing the frames. Resulting keypoints and descriptors are saved in here. | |
T_WC | Pose of camera with index cameraIndex at image capture time. | |
[in] | keypoints | If the keypoints are already available from a different source, provide them here in order to skip detection. |
Implements okvis::VioFrontendInterface.
|
private |
Decision whether a new frame should be keyframe or not.
estimator | const reference to the estimator. |
currentFrame | Keyframe candidate. |
|
inline |
Get the rotation invariance setting of the BRISK descriptor.
|
inline |
Get the scale invariance setting of the BRISK descriptor.
|
inline |
Get the absolute threshold of the BRISK detector.
|
inline |
Get the maximum amount of keypoints of the BRISK detector.
|
inline |
Get the number of octaves of the BRISK detector.
|
inline |
Get the detection threshold of the BRISK detector.
|
inline |
Get the matching threshold.
|
inline |
Get the matching ratio threshold under which a new keyframe is inserted.
|
inline |
Get the area overlap threshold under which a new keyframe is inserted.
|
private |
(re)instantiates feature detectors and descriptor extractors. Used after settings changed or at startup.
|
inline |
Returns true if the initialization has been completed (RANSAC with actual translation)
|
private |
Match the frames inside the multiframe to each other to initialise new landmarks.
MATCHING_ALGORITHM | Algorithm to match new keypoints to existing landmarks. |
estimator | Estimator. |
multiFrame | Multiframe containing the frames to match. |
|
private |
Match a new multiframe to existing keyframes.
MATCHING_ALGORITHM | Algorithm to match new keypoints to existing landmarks |
estimator | Estimator. | |
[in] | params | Parameter struct. |
[in] | currentFrameId | ID of the current frame that should be matched against keyframes. |
[out] | rotationOnly | Was the rotation only RANSAC motion model good enough to explain the motion between the new frame and the keyframes? |
[in] | usePoseUncertainty | Use the pose uncertainty for the matching. |
[out] | uncertainMatchFraction | Return the fraction of uncertain matches. Set to nullptr if not interested. |
[in] | removeOutliers | Remove outliers during RANSAC. |
|
private |
Match a new multiframe to the last frame.
MATCHING_ALGORITHM | Algorithm to match new keypoints to existing landmarks |
estimator | Estimator. |
params | Parameter struct. |
currentFrameId | ID of the current frame that should be matched against the last one. |
usePoseUncertainty | Use the pose uncertainty for the matching. |
removeOutliers | Remove outliers during RANSAC. |
|
virtual |
Propagates pose, speeds and biases with given IMU measurements.
[in] | imuMeasurements | All the IMU measurements. |
[in] | imuParams | The parameters to be used. |
[in,out] | T_WS_propagated | Start pose. |
[in,out] | speedAndBiases | Start speed and biases. |
[in] | t_start | Start time. |
[in] | t_end | End time. |
[out] | covariance | Covariance for GIVEN start states. |
[out] | jacobian | Jacobian w.r.t. start states. |
Implements okvis::VioFrontendInterface.
|
private |
Perform 2D/2D RANSAC.
estimator | Estimator. | |
params | Parameter struct. | |
currentFrameId | ID of the new multiframe containing matches with the frame with ID olderFrameId. | |
olderFrameId | ID of the multiframe to which the current frame has been matched against. | |
initializePose | If the pose has not yet been initialised should the function try to initialise it. | |
removeOutliers | Remove observation of outliers in estimator. | |
[out] | rotationOnly | Was the rotation only RANSAC model enough to explain the matches. |
|
private |
Perform 3D/2D RANSAC.
estimator | Estimator. |
nCameraSystem | Camera configuration and parameters. |
currentFrame | Frame with the new potential matches. |
removeOutliers | Remove observation of outliers in estimator. |
|
inline |
Set the rotation invariance setting of the BRISK descriptor.
|
inline |
Set the scale invariance setting of the BRISK descriptor.
|
inline |
Set the absolute threshold of the BRISK detector.
|
inline |
Set the maximum number of keypoints of the BRISK detector.
|
inline |
Set the number of octaves of the BRISK detector.
|
inline |
Set the detection threshold of the BRISK detector.
|
inline |
Set the matching threshold.
|
inline |
Set the matching ratio threshold under which a new keyframe is inserted.
|
inline |
Set the area overlap threshold under which a new keyframe is inserted.
|
private |
The set rotation invariance setting.
|
private |
The set scale invariance setting.
|
private |
The set BRISK absolute detection threshold.
|
private |
The set maximum number of keypoints.
|
private |
The set number of brisk octaves.
|
private |
The set BRISK detection threshold.
|
private |
The set BRISK matching threshold.
|
private |
feature descriptors with the current settings. The vector contains one for each camera to ensure that there are no problems with parallel detection.
|
private |
Mutexes for feature detectors and descriptors.
|
private |
feature detectors with the current settings. The vector contains one for each camera to ensure that there are no problems with parallel detection.
|
private |
Is the pose initialised?
|
private |
If the number of matched keypoints of the current frame with an older frame divided by the amount of points inside the convex hull around all keypoints is lower than the threshold it should be a keyframe.
|
private |
If the hull-area around all matched keypoints of the current frame (with existing landmarks) divided by the hull-area around all keypoints in the current frame is lower than this threshold it should be a new keyframe.
|
private |
Matcher object.
|
private |
Number of cameras in the configuration.