Structure from motion related stuff except for minimal solvers. More...
Go to the source code of this file.
Functions | |
Vector3d | closestPointOnEpipolarPlane (const Vector3d &hom_line, const Vector3d &hom_point) |
For a 3D point and a plane returns closest point to the point that lies on the plane. | |
Matrix3d | computeE (const ImageMatchVec &matches) |
double | computeScale (const Points3dSTL &points1, const Points3dSTL &points2) |
Compute scale multiplier from triangulated points in edges sharing a vertex. | |
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. | |
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 | computeStructure (const Sophus::SE3 &T_c1c2, const ImageMatchVec &matches_c1c2, Points3dSTL &triangulated_points_c1) |
compute 3D coordinates of specified points wrt. first camera (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 | 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 Sophus::SE3 &T_c1c2, const ImageMatchVec &matches_c1c2, Points3dSTL &triangulated_points_c1) |
compute 3D coordinates of specified points wrt. first camera (c1). | |
bool | extractTransformFromE (const ImageMatchVec &image_matches, const Matrix3d &E, SE3 &res_tr) |
extract rigid body transform without scale from essential matrix. |
Structure from motion related stuff except for minimal solvers.
Definition in file sfm_utils.h.
Vector3d closestPointOnEpipolarPlane | ( | const Vector3d & | hom_line, |
const Vector3d & | hom_point | ||
) | [inline] |
For a 3D point and a plane returns closest point to the point that lies on the plane.
coefficients | hom_line a plane (ax+by+cz=0) in 3D space that contains the origin. |
hom_point | point in 3D space. |
Definition at line 153 of file sfm_utils.h.
Matrix3d computeE | ( | const ImageMatchVec & | matches | ) | [inline] |
Definition at line 107 of file sfm_utils.h.
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 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.
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 computeStructure | ( | const Sophus::SE3 & | T_c1c2, |
const ImageMatchVec & | matches_c1c2, | ||
Points3dSTL & | triangulated_points_c1 | ||
) |
compute 3D coordinates of specified points wrt. first camera (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).
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 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 Sophus::SE3 & | T_c1c2, |
const ImageMatchVec & | matches_c1c2, | ||
Points3dSTL & | triangulated_points_c1 | ||
) |
compute 3D coordinates of specified points wrt. first camera (c1).
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.