ov_core::FeatureHelper class

Contains some nice helper functions for features.

Contents

These functions should only depend on feature and the feature database.

Public static functions

static void compute_disparity(std::shared_ptr<ov_core::FeatureDatabase> db, double time0, double time1, double& disp_mean, double& disp_var, int& total_feats)
This functions will compute the disparity between common features in the two frames.
static void compute_disparity(std::shared_ptr<ov_core::FeatureDatabase> db, double& disp_mean, double& disp_var, int& total_feats, double newest_time = -1, double oldest_time = -1)
This functions will compute the disparity over all features we have.

Function documentation

static void ov_core::FeatureHelper::compute_disparity(std::shared_ptr<ov_core::FeatureDatabase> db, double time0, double time1, double& disp_mean, double& disp_var, int& total_feats)

This functions will compute the disparity between common features in the two frames.

Parameters
db Feature database pointer
time0 First camera frame timestamp
time1 Second camera frame timestamp
disp_mean Average raw disparity
disp_var Variance of the disparities
total_feats Total number of common features

First we find all features in the first frame. Then we loop through each and find the uv of it in the next requested frame. Features are skipped if no tracked feature is found (it was lost). NOTE: this is on the RAW coordinates of the feature not the normalized ones. NOTE: This computes the disparity over all cameras!

static void ov_core::FeatureHelper::compute_disparity(std::shared_ptr<ov_core::FeatureDatabase> db, double& disp_mean, double& disp_var, int& total_feats, double newest_time = -1, double oldest_time = -1)

This functions will compute the disparity over all features we have.

Parameters
db Feature database pointer
disp_mean Average raw disparity
disp_var Variance of the disparities
total_feats Total number of common features
newest_time Only compute disparity for ones older (-1 to disable)
oldest_time Only compute disparity for ones newer (-1 to disable)

NOTE: this is on the RAW coordinates of the feature not the normalized ones. NOTE: This computes the disparity over all cameras!