GSoC2011SfM
0.1
Google Summer of Code 2011: Structure from motion
|
This class perform a projective estimation of the motion. Given points matches and cameras with intra parameters, it tries to find the best cameras positions and 3D points. Does not perform a bundle ajustement! More...
#include <EuclideanEstimator.h>
Public Member Functions | |
EuclideanEstimator (SequenceAnalyzer &sequence, std::vector< PointOfView > &cameras) | |
virtual | ~EuclideanEstimator (void) |
void | addNewPointOfView (const PointOfView &camera) |
void | computeReconstruction () |
void | bundleAdjustement () |
void | viewEstimation (bool coloredPoints=true) |
void | initialReconstruction (int image1, int image2) |
bool | cameraResection (unsigned int image, int max_reprojection=50) |
void | addMoreMatches (int img1, int img2, std::string detect="FAST", std::string extractor="ORB") |
Public Attributes | |
std::vector< TrackOfPoints > | point_computed_ |
list of 3D points computed | |
std::vector< bool > | camera_computed_ |
List of camera computed. | |
Protected Attributes | |
int | index_origin |
index of camera set as origin... | |
libmv::vector< libmv::Mat3 > | intra_params_ |
Intra parameters of cameras (don't use them, they are strongly related to cameras_ attribut! | |
libmv::vector< libmv::Mat3 > | rotations_ |
rotations matrix of cameras (don't use them, they are strongly related to cameras_ attribut! | |
libmv::vector< libmv::Vec3 > | translations_ |
translation vectors of cameras (don't use them, they are strongly related to cameras_ attribut! | |
std::vector< PointOfView > & | cameras_ |
List of cameras (intra and extern parameters...) | |
SequenceAnalyzer & | sequence_ |
Object containing all 2D information of this sequence. |
This class perform a projective estimation of the motion. Given points matches and cameras with intra parameters, it tries to find the best cameras positions and 3D points. Does not perform a bundle ajustement!
As this class use a lot of libmv functions, the data members are using libmv structures...
Definition at line 22 of file EuclideanEstimator.h.
OpencvSfM::EuclideanEstimator::EuclideanEstimator | ( | SequenceAnalyzer & | sequence, |
std::vector< PointOfView > & | cameras | ||
) |
Construct an euclidean estimator using a sequence of 2D points matches and a list of camera guess (intra parameters should be known!)
sequence | Object containing all 2D information of this sequence |
cameras | List of cameras (intra (and extern if available) parameters...) |
Definition at line 107 of file EuclideanEstimator.cpp.
OpencvSfM::EuclideanEstimator::~EuclideanEstimator | ( | void | ) | [virtual] |
Destructor of EuclideanEstimator
Definition at line 120 of file EuclideanEstimator.cpp.
void OpencvSfM::EuclideanEstimator::addMoreMatches | ( | int | img1, |
int | img2, | ||
std::string | detect = "FAST" , |
||
std::string | extractor = "ORB" |
||
) |
Find matches between img1 and img2 and add the to the reconstruction...
img1 | index of the first image |
img2 | index of the second image |
detect | name of the point detector |
extractor | name of the point extractor |
Definition at line 741 of file EuclideanEstimator.cpp.
Referenced by computeReconstruction().
void OpencvSfM::EuclideanEstimator::addNewPointOfView | ( | const PointOfView & | camera | ) |
Add a new camera to the estimator
camera | new point of view to add for reconstruction |
Definition at line 125 of file EuclideanEstimator.cpp.
Referenced by EuclideanEstimator().
void OpencvSfM::EuclideanEstimator::bundleAdjustement | ( | ) |
Run a bundle adjustment using every computed cameras and every computed 3D points
Definition at line 141 of file EuclideanEstimator.cpp.
Referenced by computeReconstruction().
bool OpencvSfM::EuclideanEstimator::cameraResection | ( | unsigned int | image, |
int | max_reprojection = 50 |
||
) |
Find the position of a new camera
image | index of the wanted camera |
max_reprojection | maximum reprojection error to consider that a camera position is acceptable |
Definition at line 447 of file EuclideanEstimator.cpp.
Referenced by computeReconstruction().
void OpencvSfM::EuclideanEstimator::computeReconstruction | ( | ) |
comptue cameras and structure if intra parameters are known.
Definition at line 828 of file EuclideanEstimator.cpp.
void OpencvSfM::EuclideanEstimator::initialReconstruction | ( | int | image1, |
int | image2 | ||
) |
Create a new Euclidean reconstruction using matches between two images
image1 | index of the first image |
image2 | index of the second image |
Definition at line 649 of file EuclideanEstimator.cpp.
Referenced by computeReconstruction().
void OpencvSfM::EuclideanEstimator::viewEstimation | ( | bool | coloredPoints = true | ) |
Show this estimation
coloredPoints | set to true if you have points with color... |
Definition at line 1018 of file EuclideanEstimator.cpp.