Implementations for sfm_utils.h. More...
#include "sfm_utils.h"
Go to the source code of this file.
Typedefs | |
typedef ALIGNED< pair< int, Vector3d > >::vector | IdxPoint3dVec |
Functions | |
void | computeScale (const Points3dSTL &points1, const Points3dSTL &points2, double &low, double &mid, double &hi) |
Compute scale multiplier from triangulated points in edges sharing a vertex. | |
double | computeScale (const Points3dSTL &points1, const Points3dSTL &points2) |
Compute scale multiplier from triangulated points in edges sharing a vertex. | |
void | computeStructure (const SE3 &T_c1c2, const ImageMatchVec &matches_c1c2, Points3dSTL &triangulated_points_c1) |
void | computeStructure (const Sophus::SE3 &T_c1c2, const ImageMatch &match_c1c2, Vector3d &triangulated_point_c1) |
compute 3D coordinate of specified point wrt. first camera (c1). | |
void | computeStructure (const SE3 &T_c1c2, const ImageMatchVec &matches_c1c2, const IdxPoint3dVec &idx_points3d_c1, Points3dSTL &points3d_c1, SE3 &scaled_T_c1c2) |
compute 3D coordinates of specified points. | |
void | computeStructure0 (const SE3 &T_c1c2, const ImageMatchVec &matches_c1c2, VectorXd &depths_c1) |
void | computeStructure0ForcePositiveDepths (const SE3 &T_c1c2, const ImageMatchVec &matches_c1c2, VectorXd &depths_c1) |
void | computeStructureForcePositiveDepth (const Sophus::SE3 &T_c1c2, const ImageMatch &match_c1c2, Vector3d &triangulated_point_c1) |
compute 3D coordinate of specified point wrt. first camera (c1). | |
void | computeStructureForcePositiveDepths (const SE3 &T_c1c2, const ImageMatchVec &matches_c1c2, Points3dSTL &triangulated_points_c1) |
ALIGNED< SE3 >::vector | extractRtFromE (const Matrix3d &E) |
bool | extractTransformFromE (const ImageMatchVec &image_matches, const Matrix3d &E, SE3 &res_tr) |
extract rigid body transform without scale from essential matrix. |
Implementations for sfm_utils.h.
Definition in file sfm_utils.cpp.
typedef ALIGNED<pair<int, Vector3d> >::vector IdxPoint3dVec |
Definition at line 123 of file sfm_utils.cpp.
void computeScale | ( | const Points3dSTL & | points1, |
const Points3dSTL & | points2, | ||
double & | low, | ||
double & | mid, | ||
double & | hi | ||
) |
Compute scale multiplier from triangulated points in edges sharing a vertex.
low | one bellow the median. |
mid | median |
one | above the median |
Definition at line 147 of file sfm_utils.cpp.
double computeScale | ( | const Points3dSTL & | points1, |
const Points3dSTL & | points2 | ||
) |
Compute scale multiplier from triangulated points in edges sharing a vertex.
Given corresponding 3D points compute median ratio of distance of point1 from origin to distance of points2 from origin.
Definition at line 164 of file sfm_utils.cpp.
void computeStructure | ( | const SE3 & | T_c1c2, |
const ImageMatchVec & | matches_c1c2, | ||
Points3dSTL & | triangulated_points_c1 | ||
) |
Definition at line 80 of file sfm_utils.cpp.
void computeStructure | ( | const Sophus::SE3 & | T_c1c2, |
const ImageMatch & | match_c1c2, | ||
Vector3d & | triangulated_point_c1 | ||
) |
compute 3D coordinate of specified point wrt. first camera (c1).
T_c1c2 | rigid body transform between cameras. |
match_c1c2 | feature match. triangulated point corresponding to the matches. |
Definition at line 105 of file sfm_utils.cpp.
void computeStructure | ( | const SE3 & | T_c1c2, |
const ImageMatchVec & | matches_c1c2, | ||
const IdxPoint3dVec & | idx_points3d_c1, | ||
Points3dSTL & | points3d_c1, | ||
SE3 & | scaled_T_c1c2 | ||
) |
compute 3D coordinates of specified points.
Computes 3D coordinates wrt. first camera (c1) frame with correct scale. The scale is recovered from previously triangulated points corresponding to some of the current matches.
T_c1c2 | rigid body transform between cameras (scale unknown). |
matches_c1c2 | feature matches. |
idx_points3d_c1 | rays corresppnding to matches wrt. to c1 with given indexes to matches_c1c2 (in order to select which points to triangulate. |
points3d_c1 | triangulation of selected points. |
scaled_T_c1c2 | T_c1c2 with correct scale. |
Definition at line 127 of file sfm_utils.cpp.
void computeStructure0 | ( | const SE3 & | T_c1c2, |
const ImageMatchVec & | matches_c1c2, | ||
VectorXd & | depths_c1 | ||
) |
Definition at line 52 of file sfm_utils.cpp.
void computeStructure0ForcePositiveDepths | ( | const SE3 & | T_c1c2, |
const ImageMatchVec & | matches_c1c2, | ||
VectorXd & | depths_c1 | ||
) |
Definition at line 69 of file sfm_utils.cpp.
void computeStructureForcePositiveDepth | ( | const Sophus::SE3 & | T_c1c2, |
const ImageMatch & | match_c1c2, | ||
Vector3d & | triangulated_point_c1 | ||
) |
compute 3D coordinate of specified point wrt. first camera (c1).
T_c1c2 | rigid body transform between cameras. |
match_c1c2 | feature match. triangulated point corresponding to the matches. |
Definition at line 114 of file sfm_utils.cpp.
void computeStructureForcePositiveDepths | ( | const SE3 & | T_c1c2, |
const ImageMatchVec & | matches_c1c2, | ||
Points3dSTL & | triangulated_points_c1 | ||
) |
Definition at line 93 of file sfm_utils.cpp.
ALIGNED<SE3>::vector extractRtFromE | ( | const Matrix3d & | E | ) |
Definition at line 171 of file sfm_utils.cpp.
bool extractTransformFromE | ( | const ImageMatchVec & | image_matches, |
const Matrix3d & | E, | ||
SE3 & | res_tr | ||
) |
extract rigid body transform without scale from essential matrix.
This is computed using the data points (rays) from which the essential matrix was estimated. This currently works only on cameras vith single projection center.
Definition at line 204 of file sfm_utils.cpp.