Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
jafar::modeler::Modeler Class Reference

Modeler is a class that builds a mesh for an object represented in a sequence of image. More...


Detailed Description

Modeler is a class that builds a mesh for an object represented in a sequence of image.

When add is called, it runs a gfm::EngineTracking and according to the result of the match, either adds a new triangulation system (i.e. bundler::ViewsManager2) or updates an existing one with a new entry.

When build is called it iterate over the views managers and adds a vertex to the mesh.

The obtained mesh can then be saved in PLY format.

Definition at line 37 of file modeler.hpp.

#include <modeler.hpp>

Inheritance diagram for jafar::modeler::Modeler:
Inheritance graph
[legend]

List of all members.

Classes

struct  shot
 structure to hold a shot More...
struct  vertex
 holds all the data about a vertex More...

Public Member Functions

 Modeler (camera::CameraType type, const jblas::vec &intrinsics)
 Modeler (camera::CameraType type, const jblas::vec &intrinsics, fdetect_v2::Detector< Feature > *_detector, gfm_v2::Matcher< Feature > *_matcher)
 the full package modeler for a single camera
 Modeler (fdetect_v2::Detector< Feature > *_detector, gfm_v2::Matcher< Feature > *_matcher)
 the full package modeler with no camera
int add (const image::Image &img, geom::T3D *pose)
 adds an image and a pose to the modeler and increments the counter img Image to process pose Camera frame when image was shot
int add (camera::CameraType type, const jblas::vec &intrinsics, geom::T3D *pose, const image::Image &img)
 adds a camera shot to the modeler and increments the counter img Image to process pose Camera frame when image was shot
void build ()
 invoke the mesher on the computed vertices
void save (const std::string &file_name, bool is_binary=false)
 save computed mesh to a ply file

Protected Types

typedef
fdetect_v2::InterestFeature
< fdetect_v2::FloatDescriptor
Feature
typedef std::vector< Feature * >
::const_iterator 
features_iterator
typedef
fdetect_v2::DetectionResult
< Feature
DR
typedef gfm_v2::MatchingResult
< Feature
MR
typedef boost::bimap< Feature
*, unsigned int > 
bm_type
typedef
bm_type::left_map::const_iterator 
features_citerator
typedef
bm_type::right_map::const_iterator 
indices_citerator

Protected Member Functions

 Modeler (JfrMesh &_mesh)
 Modeler (JfrMesh &_mesh, camera::CameraType type, const jblas::vec &intrinsics)
 Modeler (JfrMesh &_mesh, camera::CameraType type, const jblas::vec &intrinsics, fdetect_v2::Detector< Feature > *_detector, gfm_v2::Matcher< Feature > *_matcher)
 the full package modeler for a single camera
 Modeler (JfrMesh &_mesh, fdetect_v2::Detector< Feature > *_detector, gfm_v2::Matcher< Feature > *_matcher)
 the full package modeler with no camera
 Modeler (const std::string &ply_mesh_file, camera::CameraType type, const jblas::vec &intrinsics)
 Modeler (const std::string &ply_mesh_file, camera::CameraType type, const jblas::vec &intrinsics, fdetect_v2::Detector< Feature > *_detector, gfm_v2::Matcher< Feature > *_matcher)
 the full package modeler for a single camera
 Modeler (const std::string &ply_mesh_file, fdetect_v2::Detector< Feature > *_detector, gfm_v2::Matcher< Feature > *_matcher)
 the full package modeler with no camera
 Modeler (const std::string &ply_mesh_file)

Protected Attributes

fdetect_v2::Detector< Feature > * detector
 interest features detector
gfm_v2::Matcher< Feature > * matcher
 interest features matcher
gfm_v2::EngineTracking< Feature > * tracker
 interest feature tracker
modeler::Meshermesher
 the mesh builder
std::map< unsigned int,
bundler::ViewsManager2 * > 
bundlers
 map of bundlers
bm_type features_indices
std::map< unsigned int,
fdetect_v2::DetectionResult
< Feature > > 
sequence_detect
 storage of detection results
unsigned int index
std::map< unsigned int, vertexvertices
 map of vertexes data
std::map< unsigned int, shotshots
 map of shots data
unsigned int global
 the global id for the interest features, if not specified starts with 0
unsigned int counter
 the global counter for images and poses, if not specified starts with 0
std::string calibration
 pinhole camera calibration file name
bool one_camera
 is this a one camera modeler? set by constructor
std::pair< camera::CameraType,
jblas::vec
camera
 cameras storage map
MR result
 holds current matching result

Constructor & Destructor Documentation

jafar::modeler::Modeler::Modeler ( camera::CameraType  type,
const jblas::vec intrinsics 
) [inline]
Parameters:
typeCamera type (see camera module)
intrinsicsCamera intrinsic parameters

Definition at line 115 of file modeler.hpp.

References camera.

jafar::modeler::Modeler::Modeler ( JfrMesh _mesh) [inline, protected]
Parameters:
_meshmesh to be processed

Definition at line 143 of file modeler.hpp.

jafar::modeler::Modeler::Modeler ( JfrMesh _mesh,
camera::CameraType  type,
const jblas::vec intrinsics 
) [inline, protected]
Parameters:
_meshmesh to be processed
typeCamera type (see camera module)
intrinsicsCamera intrinsic parameters

Definition at line 154 of file modeler.hpp.

References camera.

jafar::modeler::Modeler::Modeler ( JfrMesh _mesh,
camera::CameraType  type,
const jblas::vec intrinsics,
fdetect_v2::Detector< Feature > *  _detector,
gfm_v2::Matcher< Feature > *  _matcher 
) [inline, protected]

the full package modeler for a single camera

Parameters:
_meshmesh to be processed
typeCamera type (see camera module)
intrinsicsCamera intrinsic parameters
_detectordetector of interest features
_matchermatcher of interest features

Definition at line 171 of file modeler.hpp.

References camera.

jafar::modeler::Modeler::Modeler ( JfrMesh _mesh,
fdetect_v2::Detector< Feature > *  _detector,
gfm_v2::Matcher< Feature > *  _matcher 
) [inline, protected]

the full package modeler with no camera

Parameters:
_meshmesh to be processed
_detectordetector of interest features
_matchermatcher of interest features

Definition at line 187 of file modeler.hpp.

jafar::modeler::Modeler::Modeler ( const std::string &  ply_mesh_file,
camera::CameraType  type,
const jblas::vec intrinsics 
) [inline, protected]
Parameters:
ply_mesh_fileexisting mesh to update saved in a ply file format
typeCamera type (see camera module)
intrinsicsCamera intrinsic parameters

Definition at line 199 of file modeler.hpp.

References camera.

jafar::modeler::Modeler::Modeler ( const std::string &  ply_mesh_file,
camera::CameraType  type,
const jblas::vec intrinsics,
fdetect_v2::Detector< Feature > *  _detector,
gfm_v2::Matcher< Feature > *  _matcher 
) [inline, protected]

the full package modeler for a single camera

Parameters:
ply_mesh_fileexisting mesh to update saved in a ply file format
typeCamera type (see camera module)
intrinsicsCamera intrinsic parameters
_detectordetector of interest features
_matchermatcher of interest features

Definition at line 217 of file modeler.hpp.

References camera.

jafar::modeler::Modeler::Modeler ( const std::string &  ply_mesh_file,
fdetect_v2::Detector< Feature > *  _detector,
gfm_v2::Matcher< Feature > *  _matcher 
) [inline, protected]

the full package modeler with no camera

Parameters:
ply_mesh_fileexisting mesh to update saved in a ply file format
_detectordetector of interest features
_matchermatcher of interest features

Definition at line 234 of file modeler.hpp.

jafar::modeler::Modeler::Modeler ( const std::string &  ply_mesh_file) [inline, protected]
Parameters:
ply_mesh_fileexisting mesh to update saved in a ply file format

Definition at line 245 of file modeler.hpp.


Member Function Documentation

int jafar::modeler::Modeler::add ( const image::Image img,
geom::T3D pose 
)

adds an image and a pose to the modeler and increments the counter img Image to process pose Camera frame when image was shot

Returns:
the number of added matches and -1 fo the first image
int jafar::modeler::Modeler::add ( camera::CameraType  type,
const jblas::vec intrinsics,
geom::T3D pose,
const image::Image img 
)

adds a camera shot to the modeler and increments the counter img Image to process pose Camera frame when image was shot

Returns:
the number of added matches and -1 fo the first image

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:43 for Jafar by doxygen 1.7.6.1
LAAS-CNRS