Jafar
|
Class ViewsManager, used to handle views. More...
Class ViewsManager, used to handle views.
Especially it can create new Views from datas corresponding to
camera
model path
to the saved images and configuration. Please refer to the pelican architecture for more details. Definition at line 26 of file viewsManager.hpp.
#include <viewsManager.hpp>
Public Member Functions | |
ViewsManager (const std::string &camCalibFile, const jafar::camera::CameraType &camType=jafar::camera::MONO) | |
ViewsManager (const std::string &camCalibFile, const jafar::camera::CameraType &camType, const std::map< int, geom::T3D * > &toOriginReferences) | |
void | setCamera (const camera::CameraType &camType, const std::string &camCalibFile) |
set camera type | |
void | setToOrigineReferences (const std::map< int, geom::T3D * > &toOriginReferences) |
std::string | camCalibFile () const |
get camera configuration file | |
std::vector < jafar::bundler::View * > | viewsList () |
get views list | |
void | loadViews (std::list< jblas::vec2 > _pixelList, std::list< int > _indexList) |
methode to load views given a list of pixels _pixelList and a list of indexes _pixelList | |
void | printViews () |
prints views list | |
void | clearViews () |
clears views list | |
void | insertNewView (const int &_imgIndex, const jblas::vec2 &_pixel, const jblas::vec3 &_position=jblas::zero_vec(3), const jblas::vec3 &_direction=jblas::zero_vec(3), const jblas::vec2 &_size=jblas::zero_vec(2)) |
methode to insert a new view in views given some data. | |
void | solve () |
Methode to solve the system by means of LinearLeastSquares. | |
jblas::vec3 | solution () const |
returns the computed solution of the system | |
void | insertToOriginReference (const int &index, geom::T3D *sensorToOrigin) |
creates new T3D sensorToOrigin from _index and puts it in _toOriginReferences | |
std::map< int, geom::T3D * > | toOriginReferences () const |
get the references map sensor/world | |
geom::T3D * | refByIndex (const int &index) const |
rturns reference to the origin given its index | |
double | selectRay () |
returns the maximum between the region width or heigth among all the views list | |
void | computeReprojectionError () |
computes the mean reprojection error | |
double | reprojectionError () |
returns the mean reprojection error | |
Protected Member Functions | |
View * | viewFromImage (const int &_imgIndex, const jblas::vec2 &_pixel) |
methode to create a view from an image | |
View * | viewFromData (const int &_imgIndex, const jblas::vec2 &_pixel, const jblas::vec3 &_position, const jblas::vec3 &_direction) |
methode to create a view from data | |
Private Member Functions | |
void | setCameraModel () |
sets right camera handler | |
Private Attributes | |
std::string | m_camCalibFile |
camera calibration file | |
jafar::camera::CameraType | m_camType |
camera type | |
jafar::camera::CameraContainer | m_camContainer |
camera container | |
int | startImageIndex |
index of the starting image | |
std::map< int, geom::T3D * > | m_toOriginReferences |
map of the references sensor/world | |
std::vector < jafar::bundler::View * > | views |
list of views per object | |
jblas::mat | pixMatrix |
pixels matrix | |
jblas::mat | posMatrix |
positions matrix | |
jblas::mat | dirMatrix |
directions matrix | |
jblas::mat | a |
A matrix of the linear system. | |
jblas::vec | b |
b vector of the linear system | |
jmath::LinearLeastSquares | lls |
Linear Least Square solver class. | |
jblas::vec3 | center |
computed center (solution of the system) | |
double | error |
mean reprojection error of the computed soltion | |
int | first |
sequence processing parameters | |
int | last |
int | step |
void jafar::bundler::ViewsManager::insertNewView | ( | const int & | _imgIndex, |
const jblas::vec2 & | _pixel, | ||
const jblas::vec3 & | _position = jblas::zero_vec(3) , |
||
const jblas::vec3 & | _direction = jblas::zero_vec(3) , |
||
const jblas::vec2 & | _size = jblas::zero_vec(2) |
||
) |
methode to insert a new view in views given some data.
_imgIndex and _pixel are required, others can be omitted.
void jafar::bundler::ViewsManager::insertToOriginReference | ( | const int & | index, |
geom::T3D * | sensorToOrigin | ||
) |
creates new T3D sensorToOrigin from _index and puts it in _toOriginReferences
inserts a T3D sensorToOrigin with key index in toOriginReferences
void jafar::bundler::ViewsManager::solve | ( | ) |
Methode to solve the system by means of LinearLeastSquares.
The system is formed by
the
coordinates of the observed pixels in the origin reference the
directions of the observed pixels in the origin reference Generated on Wed Oct 15 2014 00:37:32 for Jafar by doxygen 1.7.6.1 |