Functions
sfm_utils.h File Reference

Structure from motion related stuff except for minimal solvers. More...

#include "utils.h"
#include <Eigen/Dense>
#include "Sophus/se3.h"
Include dependency graph for sfm_utils.h:
This graph shows which files directly or indirectly include this file:

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.

Detailed Description

Structure from motion related stuff except for minimal solvers.

Definition in file sfm_utils.h.


Function Documentation

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.

Parameters:
coefficientshom_line a plane (ax+by+cz=0) in 3D space that contains the origin.
hom_pointpoint in 3D space.
Todo:
move to sfm_utils.h

Definition at line 153 of file sfm_utils.h.

Matrix3d computeE ( const ImageMatchVec matches) [inline]
Todo:
move to sfm_utils.h ?

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.

See also:
computeScale(points1, points2)
Parameters:
lowone bellow the median.
midmedian
oneabove 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.

Parameters:
T_c1c2rigid body transform between cameras (scale unknown).
matches_c1c2feature matches.
idx_points3d_c1rays corresppnding to matches wrt. to c1 with given indexes to matches_c1c2 (in order to select which points to triangulate.
points3d_c1triangulation of selected points.
scaled_T_c1c2T_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).

See also:
computeStructure
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).

Parameters:
T_c1c2rigid body transform between cameras.
match_c1c2feature 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).

Parameters:
T_c1c2rigid body transform between cameras.
match_c1c2feature 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).

See also:
computeStructure
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.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines


pose_estimation
Author(s): Jiri Divis/jiridivis@gmail.com
autogenerated on Wed Mar 27 2013 21:00:13