$search
Declarations for sparse bundle adjustment related functions. More...
#include "general_resources.hpp"
#include "opencv_resources.hpp"
#include "ros_resources.hpp"
#include "reconstruction.hpp"
#include "camera.hpp"
#include "geometry.hpp"
#include "tracks.hpp"
#include <pcl/ros/conversions.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl/io/pcd_io.h>
#include <visualization_msgs/MarkerArray.h>
#include <sba/sba.h>
#include <sba/sba_file_io.h>
#include <sba/visualization.h>
#include <math.h>
#include "features.hpp"
#include <time.h>
Go to the source code of this file.
Functions | |
void | addPointsToSBA (SysSBA &sba, vector< Point3d > &cloud) |
void | addProjectionsToSBA (SysSBA &sba, vector< Point2f > &loc, int idx) |
void | addProjectionToSBA (SysSBA &sba, Point2f &loc, unsigned int trackNo, unsigned int camNo) |
double | adjustFullSystem (vector< featureTrack > &tracks, cameraParameters &camData, Mat *cameras, unsigned int min_index, unsigned int max_index, unsigned int its=1) |
void | assignFullSystem (SysSBA &sba, vector< featureTrack > &tracks, cameraParameters &camData, Mat *cameras, unsigned int start_index, unsigned int finish_index, bool dummy=false) |
void | assignPartialSystem (SysSBA &sba, vector< featureTrack > &tracks, cameraParameters &camData, Mat *cameras, vector< unsigned int > &indices, bool assignProjections=true) |
void | assignSystem (SysSBA &sba, vector< featureTrack > &tracks, cameraParameters &camData, Mat *cameras, vector< unsigned int > &camera_indices, vector< unsigned int > &track_indices) |
void | copySys (const SysSBA &src, SysSBA &dst) |
void | drawGraph2 (const SysSBA &sba, const ros::Publisher &camera_pub, const ros::Publisher &point_pub, const ros::Publisher &path_pub, int decimation=1, int bicolor=0, double scale=0.1) |
int | estimatePoseBetweenCameras (cameraParameters &camData, vector< Point2f > &pts1, vector< Point2f > &pts2, Mat &C) |
void | extractCameras (const SysSBA &sba, visualization_msgs::MarkerArray &cameraArray, visualization_msgs::Marker &marker_path) |
void | extractPointCloud (const SysSBA &sba, pcl::PointCloud< pcl::PointXYZ > &point_cloud) |
void | findCentroid (SysSBA &sba, Point3d ¢roid, Point3d &stdDeviation) |
void | findIntermediatePoses (vector< featureTrack > &tracks, cameraParameters &camData, Mat *cameras, unsigned int image_idx_1, unsigned int image_idx_2, bool fixBothEnds=true) |
void | findRelevantIndices (vector< featureTrack > &tracks, vector< unsigned int > &triangulated, vector< unsigned int > &untriangulated, unsigned int last_index, unsigned int new_index) |
void | finishTracks (vector< featureTrack > &tracks, vector< Point2f > &pts, double retainProp=0.80, unsigned int maxOccurrences=0) |
void | getActiveCameras (Mat *C, vector< unsigned int > &indices, unsigned int min_index, unsigned int max_index) |
void | getActiveTracks (vector< featureTrack > &tracks, vector< unsigned int > &cameras, vector< unsigned int > &indices) |
double | getFeatureMotion (vector< featureTrack > &tracks, vector< unsigned int > &indices, unsigned int idx_1, unsigned int idx_2) |
void | initializeFrameCamera (frame_common::CamParams &cam_params, const Mat &newCamMat, int &maxx, int &maxy, const Size &cameraSize) |
double | keyframeBundleAdjustment (cameraParameters &camData, vector< featureTrack > &tracks, keyframeStore &kf_store, Mat *cameras, unsigned int kfIndex, unsigned int iterations=100) |
double | keyframeBundleAdjustment (cameraParameters &camData, vector< featureTrack > &tracks, Mat *cameras, vector< unsigned int > &indices, unsigned int iterations=100, bool allFree=false, bool allFixedExceptLast=false, unsigned fixed_cams=0) |
void | optimizeFullSystem (vector< featureTrack > &tracks, cameraParameters &camData, Mat *cameras, unsigned int last_index) |
double | optimizeKeyframePair (vector< featureTrack > &tracks, cameraParameters &camData, int idx1, int idx2, Mat *cameras) |
double | optimizeSubsystem (cameraParameters &camData, Mat *C, vector< unsigned int > &c_i, vector< featureTrack > &tracks, vector< unsigned int > &t_i, unsigned int iterations=100) |
double | optimizeSystem (SysSBA &sba, double err=1e-4, int iterations=100) |
* | |
bool | reconstructFreshSubsequencePair (vector< featureTrack > &tracks, vector< Point3d > &ptCloud, vector< unsigned int > &triangulatedIndices, Mat &real_C0, Mat &real_C1, cameraParameters camData, int idx1, int idx2) |
void | removePoorTracks (vector< featureTrack > &tracks, cameraParameters &camData, Mat *cameras, unsigned int start_cam, unsigned int finish_cam) |
void | renormalizeSBA (SysSBA &sba, Point3d &desiredCenter) |
void | rescaleSBA (SysSBA &sba, unsigned int idx1, unsigned int idx2) |
void | retrieveFullSystem (SysSBA &sys, Mat *C, vector< featureTrack > &tracks, unsigned int start_cam, unsigned int final_cam) |
void | retrievePartialSystem (SysSBA &sys, Mat *C, vector< featureTrack > &tracks, vector< unsigned int > &indices) |
void | retrieveSystem (SysSBA &sba, vector< featureTrack > &tracks, cameraParameters &camData, Mat *cameras, vector< unsigned int > &camera_indices, vector< unsigned int > &track_indices) |
void | subselectPoints (const vector< Point2f > &src1, vector< Point2f > &dst1, const vector< Point2f > &src2, vector< Point2f > &dst2) |
double | testKeyframePair (vector< featureTrack > &tracks, cameraParameters &camData, double *scorecard[], int idx1, int idx2, double *scores, Mat &pose, bool evaluate=false, bool debug=false) |
double | twoViewBundleAdjustment (cameraParameters cam_data, Mat &cam1, Mat &cam2, vector< Point3d > &cloud, vector< Point2f > &pts1, vector< Point2f > &pts2, int iterations=10) |
Declarations for sparse bundle adjustment related functions.
Definition in file sba.hpp.
void addPointsToSBA | ( | SysSBA & | sba, | |
vector< Point3d > & | cloud | |||
) |
void addProjectionsToSBA | ( | SysSBA & | sba, | |
vector< Point2f > & | loc, | |||
int | idx | |||
) |
void addProjectionToSBA | ( | SysSBA & | sba, | |
Point2f & | loc, | |||
unsigned int | trackNo, | |||
unsigned int | camNo | |||
) |
double adjustFullSystem | ( | vector< featureTrack > & | tracks, | |
cameraParameters & | camData, | |||
Mat * | cameras, | |||
unsigned int | min_index, | |||
unsigned int | max_index, | |||
unsigned int | its = 1 | |||
) |
void assignFullSystem | ( | SysSBA & | sba, | |
vector< featureTrack > & | tracks, | |||
cameraParameters & | camData, | |||
Mat * | cameras, | |||
unsigned int | start_index, | |||
unsigned int | finish_index, | |||
bool | dummy = false | |||
) |
void assignPartialSystem | ( | SysSBA & | sba, | |
vector< featureTrack > & | tracks, | |||
cameraParameters & | camData, | |||
Mat * | cameras, | |||
vector< unsigned int > & | indices, | |||
bool | assignProjections = true | |||
) |
void assignSystem | ( | SysSBA & | sba, | |
vector< featureTrack > & | tracks, | |||
cameraParameters & | camData, | |||
Mat * | cameras, | |||
vector< unsigned int > & | camera_indices, | |||
vector< unsigned int > & | track_indices | |||
) |
void drawGraph2 | ( | const SysSBA & | sba, | |
const ros::Publisher & | camera_pub, | |||
const ros::Publisher & | point_pub, | |||
const ros::Publisher & | path_pub, | |||
int | decimation = 1 , |
|||
int | bicolor = 0 , |
|||
double | scale = 0.1 | |||
) |
int estimatePoseBetweenCameras | ( | cameraParameters & | camData, | |
vector< Point2f > & | pts1, | |||
vector< Point2f > & | pts2, | |||
Mat & | C | |||
) |
void extractCameras | ( | const SysSBA & | sba, | |
visualization_msgs::MarkerArray & | cameraArray, | |||
visualization_msgs::Marker & | marker_path | |||
) |
void extractPointCloud | ( | const SysSBA & | sba, | |
pcl::PointCloud< pcl::PointXYZ > & | point_cloud | |||
) |
void findCentroid | ( | SysSBA & | sba, | |
Point3d & | centroid, | |||
Point3d & | stdDeviation | |||
) |
void findIntermediatePoses | ( | vector< featureTrack > & | tracks, | |
cameraParameters & | camData, | |||
Mat * | cameras, | |||
unsigned int | image_idx_1, | |||
unsigned int | image_idx_2, | |||
bool | fixBothEnds = true | |||
) |
void findRelevantIndices | ( | vector< featureTrack > & | tracks, | |
vector< unsigned int > & | triangulated, | |||
vector< unsigned int > & | untriangulated, | |||
unsigned int | last_index, | |||
unsigned int | new_index | |||
) |
void finishTracks | ( | vector< featureTrack > & | tracks, | |
vector< Point2f > & | pts, | |||
double | retainProp = 0.80 , |
|||
unsigned int | maxOccurrences = 0 | |||
) |
void getActiveCameras | ( | Mat * | C, | |
vector< unsigned int > & | indices, | |||
unsigned int | min_index, | |||
unsigned int | max_index | |||
) |
void getActiveTracks | ( | vector< featureTrack > & | tracks, | |
vector< unsigned int > & | cameras, | |||
vector< unsigned int > & | indices | |||
) |
double getFeatureMotion | ( | vector< featureTrack > & | tracks, | |
vector< unsigned int > & | indices, | |||
unsigned int | idx_1, | |||
unsigned int | idx_2 | |||
) |
void initializeFrameCamera | ( | frame_common::CamParams & | cam_params, | |
const Mat & | newCamMat, | |||
int & | maxx, | |||
int & | maxy, | |||
const Size & | cameraSize | |||
) |
double keyframeBundleAdjustment | ( | cameraParameters & | camData, | |
vector< featureTrack > & | tracks, | |||
keyframeStore & | kf_store, | |||
Mat * | cameras, | |||
unsigned int | kfIndex, | |||
unsigned int | iterations = 100 | |||
) |
double keyframeBundleAdjustment | ( | cameraParameters & | camData, | |
vector< featureTrack > & | tracks, | |||
Mat * | cameras, | |||
vector< unsigned int > & | indices, | |||
unsigned int | iterations = 100 , |
|||
bool | allFree = false , |
|||
bool | allFixedExceptLast = false , |
|||
unsigned | fixed_cams = 0 | |||
) |
void optimizeFullSystem | ( | vector< featureTrack > & | tracks, | |
cameraParameters & | camData, | |||
Mat * | cameras, | |||
unsigned int | last_index | |||
) |
double optimizeKeyframePair | ( | vector< featureTrack > & | tracks, | |
cameraParameters & | camData, | |||
int | idx1, | |||
int | idx2, | |||
Mat * | cameras | |||
) |
double optimizeSubsystem | ( | cameraParameters & | camData, | |
Mat * | C, | |||
vector< unsigned int > & | c_i, | |||
vector< featureTrack > & | tracks, | |||
vector< unsigned int > & | t_i, | |||
unsigned int | iterations = 100 | |||
) |
double optimizeSystem | ( | SysSBA & | sba, | |
double | err, | |||
int | iterations | |||
) |
bool reconstructFreshSubsequencePair | ( | vector< featureTrack > & | tracks, | |
vector< Point3d > & | ptCloud, | |||
vector< unsigned int > & | triangulatedIndices, | |||
Mat & | real_C0, | |||
Mat & | real_C1, | |||
cameraParameters | camData, | |||
int | idx1, | |||
int | idx2 | |||
) |
void removePoorTracks | ( | vector< featureTrack > & | tracks, | |
cameraParameters & | camData, | |||
Mat * | cameras, | |||
unsigned int | start_cam, | |||
unsigned int | finish_cam | |||
) |
void renormalizeSBA | ( | SysSBA & | sba, | |
Point3d & | desiredCenter | |||
) |
void rescaleSBA | ( | SysSBA & | sba, | |
unsigned int | idx1, | |||
unsigned int | idx2 | |||
) |
void retrieveFullSystem | ( | SysSBA & | sys, | |
Mat * | C, | |||
vector< featureTrack > & | tracks, | |||
unsigned int | start_cam, | |||
unsigned int | final_cam | |||
) |
void retrievePartialSystem | ( | SysSBA & | sys, | |
Mat * | C, | |||
vector< featureTrack > & | tracks, | |||
vector< unsigned int > & | indices | |||
) |
void retrieveSystem | ( | SysSBA & | sba, | |
vector< featureTrack > & | tracks, | |||
cameraParameters & | camData, | |||
Mat * | cameras, | |||
vector< unsigned int > & | camera_indices, | |||
vector< unsigned int > & | track_indices | |||
) |
void subselectPoints | ( | const vector< Point2f > & | src1, | |
vector< Point2f > & | dst1, | |||
const vector< Point2f > & | src2, | |||
vector< Point2f > & | dst2 | |||
) |
double testKeyframePair | ( | vector< featureTrack > & | tracks, | |
cameraParameters & | camData, | |||
double * | scorecard[], | |||
int | idx1, | |||
int | idx2, | |||
double * | scores, | |||
Mat & | pose, | |||
bool | evaluate = false , |
|||
bool | debug = false | |||
) |
double twoViewBundleAdjustment | ( | cameraParameters | cam_data, | |
Mat & | cam1, | |||
Mat & | cam2, | |||
vector< Point3d > & | cloud, | |||
vector< Point2f > & | pts1, | |||
vector< Point2f > & | pts2, | |||
int | iterations = 10 | |||
) |