#include <sparse_stereo.hpp>
|
| | StereoFeatures () |
| |
| void | setCalibration (const frame_helper::StereoCalibration &calib) |
| |
| void | setConfiguration (const FeatureConfiguration &config) |
| |
| void | setDetectorConfiguration (const DetectorConfiguration &detector_config) |
| |
| void | setDistanceImages (const base::samples::DistanceImage *left, const base::samples::DistanceImage *right) |
| |
| void | processFramePair (const cv::Mat &left_image, const cv::Mat &right_image, StereoFeatureArray *stereo_features=NULL) |
| |
| StereoFeatureArray & | getStereoFeatures () |
| |
| FeatureInfo & | getFeatureInfoLeft () |
| |
| FeatureInfo & | getFeatureInfoRight () |
| |
| void | calculateInterFrameCorrespondences (const StereoFeatureArray &frame1, const StereoFeatureArray &frame2, int filterMethod) |
| |
| void | calculateInterFrameCorrespondences (const cv::Mat &feat1, const std::vector< cv::KeyPoint > &keyp1, const std::vector< Eigen::Vector3d > &points1, const cv::Mat &feat2, const std::vector< cv::KeyPoint > &keyp2, const std::vector< Eigen::Vector3d > &points2, int filterMethod) |
| |
| std::vector< std::pair< long, long > > | getInterFrameCorrespondences () |
| |
| base::Affine3d | getInterFrameCorrespondenceTransform () |
| |
| const cv::Mat & | getDebugImage () |
| |
| cv::Mat | getInterFrameDebugImage (const cv::Mat &debug1, const StereoFeatureArray &frame1, const cv::Mat &debug2, const StereoFeatureArray &frame2, std::vector< std::pair< long, long > > *correspondence=NULL) |
| |
| void | findFeatures (const cv::Mat &left_image, const cv::Mat &right_image, int use_threading=1, int crop_left=0, int crop_right=0) |
| |
| bool | getPutativeStereoCorrespondences () |
| |
| bool | refineFeatureCorrespondences () |
| |
| void | calculateDepthInformationBetweenCorrespondences (StereoFeatureArray *stereo_features=NULL) |
| |
| void | crossCheckMatching (const cv::Mat &descriptors1, const cv::Mat &descriptors2, std::vector< cv::DMatch > &filteredMatches12, int knn=1, float distanceFactor=2.0) |
| |
| cv::Mat | getHomography () |
| |
|
| void | initDetector (size_t lastNumFeatures) |
| |
| void | findFeatures2 (const cv::Mat &image, FeatureInfo &info, bool left_frame=true, int crop_left=0, int crop_right=0) |
| |
| void | findFeatures_threading (const cv::Mat &image, FeatureInfo &info, bool left_frame=true, int crop_left=0, int crop_right=0) |
| |
| void | crossCheckMatching (std::vector< std::vector< cv::DMatch > > matches12, std::vector< std::vector< cv::DMatch > > matches21, std::vector< cv::DMatch > &filteredMatches12, int knn=1, float distanceFactor=2.0) |
| |
◆ StereoFeatures()
| StereoFeatures::StereoFeatures |
( |
| ) |
|
◆ calculateDepthInformationBetweenCorrespondences()
| void StereoFeatures::calculateDepthInformationBetweenCorrespondences |
( |
StereoFeatureArray * |
stereo_features = NULL | ) |
|
◆ calculateInterFrameCorrespondences() [1/2]
calculate the relation between two stereo pairs
◆ calculateInterFrameCorrespondences() [2/2]
| void StereoFeatures::calculateInterFrameCorrespondences |
( |
const cv::Mat & |
feat1, |
|
|
const std::vector< cv::KeyPoint > & |
keyp1, |
|
|
const std::vector< Eigen::Vector3d > & |
points1, |
|
|
const cv::Mat & |
feat2, |
|
|
const std::vector< cv::KeyPoint > & |
keyp2, |
|
|
const std::vector< Eigen::Vector3d > & |
points2, |
|
|
int |
filterMethod |
|
) |
| |
◆ crossCheckMatching() [1/2]
| void StereoFeatures::crossCheckMatching |
( |
const cv::Mat & |
descriptors1, |
|
|
const cv::Mat & |
descriptors2, |
|
|
std::vector< cv::DMatch > & |
filteredMatches12, |
|
|
int |
knn = 1, |
|
|
float |
distanceFactor = 2.0 |
|
) |
| |
perform cross checking to make sure that the nearest neighbour relationship goes both ways. if a knn of greater than 1 is given, a distanceFactor of greater 1.0 will make the matches more robust, by checking against the next nn.
◆ crossCheckMatching() [2/2]
| void StereoFeatures::crossCheckMatching |
( |
std::vector< std::vector< cv::DMatch > > |
matches12, |
|
|
std::vector< std::vector< cv::DMatch > > |
matches21, |
|
|
std::vector< cv::DMatch > & |
filteredMatches12, |
|
|
int |
knn = 1, |
|
|
float |
distanceFactor = 2.0 |
|
) |
| |
|
protected |
◆ findFeatures()
| void StereoFeatures::findFeatures |
( |
const cv::Mat & |
left_image, |
|
|
const cv::Mat & |
right_image, |
|
|
int |
use_threading = 1, |
|
|
int |
crop_left = 0, |
|
|
int |
crop_right = 0 |
|
) |
| |
◆ findFeatures2()
| void StereoFeatures::findFeatures2 |
( |
const cv::Mat & |
image, |
|
|
FeatureInfo & |
info, |
|
|
bool |
left_frame = true, |
|
|
int |
crop_left = 0, |
|
|
int |
crop_right = 0 |
|
) |
| |
|
protected |
◆ findFeatures_threading()
| void StereoFeatures::findFeatures_threading |
( |
const cv::Mat & |
image, |
|
|
FeatureInfo & |
info, |
|
|
bool |
left_frame = true, |
|
|
int |
crop_left = 0, |
|
|
int |
crop_right = 0 |
|
) |
| |
|
protected |
◆ getDebugImage()
| const cv::Mat& stereo::StereoFeatures::getDebugImage |
( |
| ) |
|
|
inline |
get the debug image for a stereo pair, if debugImage has been activated in the configuration.
- Todo:
- generate the image in this function instead through the pipeline. to allow generation based on result types.
◆ getFeatureInfoLeft()
| FeatureInfo& stereo::StereoFeatures::getFeatureInfoLeft |
( |
| ) |
|
|
inline |
Get the result of the last feature extraction, left
◆ getFeatureInfoRight()
| FeatureInfo& stereo::StereoFeatures::getFeatureInfoRight |
( |
| ) |
|
|
inline |
Get the result of the last feature extraction, left
◆ getHomography()
| cv::Mat stereo::StereoFeatures::getHomography |
( |
| ) |
|
|
inline |
◆ getInterFrameCorrespondences()
| std::vector<std::pair<long,long> > stereo::StereoFeatures::getInterFrameCorrespondences |
( |
| ) |
|
|
inline |
◆ getInterFrameCorrespondenceTransform()
| base::Affine3d stereo::StereoFeatures::getInterFrameCorrespondenceTransform |
( |
| ) |
|
|
inline |
Get the transform calculated at the last interframe correspondence calculation. Only valid if the filter type was set to ISOMETRY and the number of correspondences > 3.
◆ getInterFrameDebugImage()
| cv::Mat StereoFeatures::getInterFrameDebugImage |
( |
const cv::Mat & |
debug1, |
|
|
const StereoFeatureArray & |
frame1, |
|
|
const cv::Mat & |
debug2, |
|
|
const StereoFeatureArray & |
frame2, |
|
|
std::vector< std::pair< long, long > > * |
correspondence = NULL |
|
) |
| |
get the debug image for interframe correspondences.
◆ getPutativeStereoCorrespondences()
| bool StereoFeatures::getPutativeStereoCorrespondences |
( |
| ) |
|
◆ getStereoFeatures()
Get the result of the last stereo image processing step.
◆ initDetector()
| void StereoFeatures::initDetector |
( |
size_t |
lastNumFeatures | ) |
|
|
protected |
◆ processFramePair()
| void StereoFeatures::processFramePair |
( |
const cv::Mat & |
left_image, |
|
|
const cv::Mat & |
right_image, |
|
|
StereoFeatureArray * |
stereo_features = NULL |
|
) |
| |
Perform the processing on a stereo frame pair. This will perform feature detection, description, matching and filtering based on the configuration given in the configuration class. If the optional last parameter is given, it will not work in class internal storage, but in the storage provided.
◆ refineFeatureCorrespondences()
| bool StereoFeatures::refineFeatureCorrespondences |
( |
| ) |
|
◆ setCalibration()
| void StereoFeatures::setCalibration |
( |
const frame_helper::StereoCalibration & |
calib | ) |
|
Set the calibration parameters for the stereo camera setup.
◆ setConfiguration()
Set the configuration for the stereo processing chain. This will also reset any previous configuration including detector type.
◆ setDetectorConfiguration()
Set the configuration for the feature detector
◆ setDistanceImages()
| void StereoFeatures::setDistanceImages |
( |
const base::samples::DistanceImage * |
left, |
|
|
const base::samples::DistanceImage * |
right |
|
) |
| |
optionally set the distance images before each call to process frame pair, in order to perform a perspective undistort of the features before running the descriptor.
- Parameters
-
| left | - left distance image |
| right | - right distance image |
◆ calib
| frame_helper::StereoCalibrationCv stereo::StereoFeatures::calib |
|
protected |
◆ config
◆ correspondences
| std::vector<std::pair<long,long> > stereo::StereoFeatures::correspondences |
|
protected |
◆ correspondenceTransform
| base::Affine3d stereo::StereoFeatures::correspondenceTransform |
|
protected |
◆ debugImage
| cv::Mat stereo::StereoFeatures::debugImage |
|
protected |
◆ debugRightOffset
| int stereo::StereoFeatures::debugRightOffset |
|
protected |
◆ descriptorExtractor
| cv::Ptr<cv::DescriptorExtractor> stereo::StereoFeatures::descriptorExtractor |
|
protected |
◆ descriptorMatcher
| cv::Ptr<cv::DescriptorMatcher> stereo::StereoFeatures::descriptorMatcher |
|
protected |
◆ descriptors_gpu_left
| cv::gpu::GpuMat stereo::StereoFeatures::descriptors_gpu_left |
|
protected |
◆ descriptors_gpu_right
| cv::gpu::GpuMat stereo::StereoFeatures::descriptors_gpu_right |
|
protected |
◆ detector
| cv::Ptr<cv::FeatureDetector> stereo::StereoFeatures::detector |
|
protected |
◆ detectorParams
◆ dist_left
| const base::samples::DistanceImage* stereo::StereoFeatures::dist_left |
|
protected |
◆ dist_right
| const base::samples::DistanceImage * stereo::StereoFeatures::dist_right |
|
protected |
◆ homography
| cv::Mat stereo::StereoFeatures::homography |
|
protected |
◆ leftFeatures
◆ leftMatches
◆ leftPutativeMatches
| FeatureInfo stereo::StereoFeatures::leftPutativeMatches |
|
protected |
◆ rightFeatures
◆ rightMatches
◆ rightPutativeMatches
| FeatureInfo stereo::StereoFeatures::rightPutativeMatches |
|
protected |
◆ stereoFeatures
◆ use_gpu_detector
| bool stereo::StereoFeatures::use_gpu_detector |
|
protected |
The documentation for this class was generated from the following files: