GSoC2011SfM  0.1
Google Summer of Code 2011: Structure from motion
D:/Travail/These/Determination caracteristiques camera/GSoC/SfM/src/EuclideanEstimator.h
00001 #ifndef _GSOC_SFM_POINTS_3D_EUCLIDEAN_ESTIMATION_H
00002 #define _GSOC_SFM_POINTS_3D_EUCLIDEAN_ESTIMATION_H 1
00003 
00004 #include <iostream>
00005 #include "libmv/base/vector.h"
00006 #include "libmv/numeric/numeric.h"
00007 
00008 #include "macro.h" //SFM_EXPORTS
00009 #include "SequenceAnalyzer.h"
00010 #include "PointOfView.h"
00011 
00012 namespace OpencvSfM{
00013 
00022   class SFM_EXPORTS EuclideanEstimator
00023   {
00024   protected:
00025     int index_origin;
00026     libmv::vector<libmv::Mat3> intra_params_;
00027     libmv::vector<libmv::Mat3> rotations_;
00028     libmv::vector<libmv::Vec3> translations_;
00029     std::vector<PointOfView>& cameras_;
00030     SequenceAnalyzer &sequence_;
00031   public:
00038     EuclideanEstimator( SequenceAnalyzer &sequence,
00039       std::vector<PointOfView>& cameras );
00043     virtual ~EuclideanEstimator( void );
00044 
00045     std::vector< TrackOfPoints > point_computed_;
00046     std::vector<bool> camera_computed_;
00047 
00052     void addNewPointOfView( const PointOfView& camera );
00053 
00057     void computeReconstruction( );
00058 
00062     void bundleAdjustement( );
00063 
00068     void viewEstimation( bool coloredPoints = true );
00069     
00075     void initialReconstruction( int image1, int image2 );
00076     
00082     bool cameraResection( unsigned int image, int max_reprojection = 50 );
00083 
00091     void addMoreMatches(int img1, int img2,
00092       std::string detect = "FAST", std::string extractor = "ORB");
00093   };
00094 
00095 }
00096 
00097 #endif
 All Classes Functions Variables