GSoC2011SfM  0.1
Google Summer of Code 2011: Structure from motion
Public Member Functions | Public Attributes | Protected Attributes
OpencvSfM::EuclideanEstimator Class Reference

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>

List of all members.

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< TrackOfPointspoint_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...)
SequenceAnalyzersequence_
 Object containing all 2D information of this sequence.

Detailed Description

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.


Constructor & Destructor Documentation

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!)

Parameters:
sequenceObject containing all 2D information of this sequence
camerasList 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.


Member Function Documentation

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...

Parameters:
img1index of the first image
img2index of the second image
detectname of the point detector
extractorname 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

Parameters:
cameranew 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

Parameters:
imageindex of the wanted camera
max_reprojectionmaximum 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

Parameters:
image1index of the first image
image2index 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

Parameters:
coloredPointsset to true if you have points with color...

Definition at line 1018 of file EuclideanEstimator.cpp.


The documentation for this class was generated from the following files:
 All Classes Functions Variables