46 #include <visp3/core/vpConfig.h> 48 #if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100) 50 #include <visp3/core/vpTrackingException.h> 51 #include <visp3/core/vpVelocityTwistMatrix.h> 52 #include <visp3/mbt/vpMbEdgeKltMultiTracker.h> 59 thresholdMBT(2.), m_mapOfCameraTransformationMatrix(), m_referenceCameraName(
"Camera"), m_nbrow(0),
60 m_L_hybridMulti(), m_error_hybridMulti(), m_w_hybridMulti(), m_weightedError_hybridMulti()
82 }
else if (nbCameras == 1) {
85 }
else if (nbCameras == 2) {
93 for (
unsigned int i = 1; i <= nbCameras; i++) {
126 const unsigned int lvl)
141 std::cerr <<
"There are less than 4 KLT features, set factorKLT = 1. !" << std::endl;
146 std::cerr <<
"There are less than 4 moving edges, set factorMBT = 1. !" << std::endl;
161 std::map<std::string, vpVelocityTwistMatrix> mapOfVelocityTwist;
166 mapOfVelocityTwist[it->first] = cVo;
171 double residu_1 = -1;
172 unsigned int iter = 0;
182 while (((
int)((residu - residu_1) * 1e8) != 0) && (iter <
m_maxIter)) {
185 bool reStartFromLastIncrement =
false;
188 if (reStartFromLastIncrement) {
192 if (!reStartFromLastIncrement) {
224 for (
unsigned int j = 0; j < 6; j++) {
230 residu = sqrt(num / den);
258 for (std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
268 "computeVVSInteractionMatrixAndR" 269 "esidu() should not be called!");
274 std::map<std::string, vpVelocityTwistMatrix> &mapOfVelocityTwist)
276 unsigned int startIdx = 0;
279 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
297 for (std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
311 klt->
ctTc0 = c_curr_tTc_curr0;
326 unsigned int startIdx = 0;
328 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
339 for (std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
364 const bool displayFullModel)
369 for (std::map<std::string, vpMbKltTracker *>::const_iterator it_klt =
m_mapOfKltTrackers.begin();
372 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it_pts = it_klt->second->kltPolygons.begin();
373 it_pts != it_klt->second->kltPolygons.end(); ++it_pts) {
380 for (std::list<vpMbtDistanceKltCylinder *>::const_iterator it_cyl = it_klt->second->kltCylinders.begin();
381 it_cyl != it_klt->second->kltCylinders.end(); ++it_cyl) {
402 const unsigned int thickness,
const bool displayFullModel)
409 for (std::map<std::string, vpMbKltTracker *>::const_iterator it_klt =
m_mapOfKltTrackers.begin();
412 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it_pts = it_klt->second->kltPolygons.begin();
413 it_pts != it_klt->second->kltPolygons.end(); ++it_pts) {
420 for (std::list<vpMbtDistanceKltCylinder *>::const_iterator it_cyl = it_klt->second->kltCylinders.begin();
421 it_cyl != it_klt->second->kltCylinders.end(); ++it_cyl) {
446 const vpColor &color,
const unsigned int thickness,
const bool displayFullModel)
454 for (std::map<std::string, vpMbKltTracker *>::const_iterator it_klt =
m_mapOfKltTrackers.begin();
456 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it_pts = it_klt->second->kltPolygons.begin();
457 it_pts != it_klt->second->kltPolygons.end(); ++it_pts) {
468 for (std::list<vpMbtDistanceKltCylinder *>::const_iterator it_cyl = it_klt->second->kltCylinders.begin();
469 it_cyl != it_klt->second->kltCylinders.end(); ++it_cyl) {
501 const vpColor &color,
const unsigned int thickness,
const bool displayFullModel)
509 for (std::map<std::string, vpMbKltTracker *>::const_iterator it_klt =
m_mapOfKltTrackers.begin();
511 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it_pts = it_klt->second->kltPolygons.begin();
512 it_pts != it_klt->second->kltPolygons.end(); ++it_pts) {
523 for (std::list<vpMbtDistanceKltCylinder *>::const_iterator it_cyl = it_klt->second->kltCylinders.begin();
524 it_cyl != it_klt->second->kltCylinders.end(); ++it_cyl) {
551 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
552 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
553 const vpColor &col,
const unsigned int thickness,
const bool displayFullModel)
560 for (std::map<std::string, vpMbKltTracker *>::const_iterator it_klt =
m_mapOfKltTrackers.begin();
563 std::map<std::string, const vpImage<unsigned char> *>::const_iterator it_img = mapOfImages.find(it_klt->first);
564 if (it_img != mapOfImages.end()) {
565 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it_pts = it_klt->second->kltPolygons.begin();
566 it_pts != it_klt->second->kltPolygons.end(); ++it_pts) {
573 for (std::list<vpMbtDistanceKltCylinder *>::const_iterator it_cyl = it_klt->second->kltCylinders.begin();
574 it_cyl != it_klt->second->kltCylinders.end(); ++it_cyl) {
595 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
596 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
597 const vpColor &col,
const unsigned int thickness,
const bool displayFullModel)
604 for (std::map<std::string, vpMbKltTracker *>::const_iterator it_klt =
m_mapOfKltTrackers.begin();
607 std::map<std::string, const vpImage<vpRGBa> *>::const_iterator it_img = mapOfImages.find(it_klt->first);
608 if (it_img != mapOfImages.end()) {
609 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it_pts = it_klt->second->kltPolygons.begin();
610 it_pts != it_klt->second->kltPolygons.end(); ++it_pts) {
617 for (std::list<vpMbtDistanceKltCylinder *>::const_iterator it_cyl = it_klt->second->kltCylinders.begin();
618 it_cyl != it_klt->second->kltCylinders.end(); ++it_cyl) {
674 std::map<std::string, vpCameraParameters> &mapOfCameraParameters)
const 677 mapOfCameraParameters.clear();
692 std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.find(cameraName);
696 return it->second->getClipping();
698 std::cerr <<
"Cannot find camera: " << cameraName << std::endl;
706 std::cerr <<
"Return the wrong faces reference !" << std::endl;
707 std::cerr <<
"Use vpMbEdgeKltMultiTracker::getEdgeFaces or " 708 "vpMbEdgeKltMultiTracker::getKltFaces instead !" 758 std::cerr <<
"Use vpMbEdgeKltMultiTracker::getEdgeMultiNbPolygon or " 759 "vpMbEdgeKltMultiTracker::getKltMultiNbPolygon instead !" 820 mapOfCameraPoses.clear();
833 #ifdef VISP_HAVE_MODULE_GUI 845 const std::string &displayFile)
885 const bool displayHelp)
932 const std::string &initFile1,
const std::string &initFile2,
933 const bool displayHelp,
const bool firstCameraIsReference)
939 std::map<std::string, vpMbKltTracker *>::const_iterator it_klt =
m_mapOfKltTrackers.begin();
940 if (firstCameraIsReference) {
942 it_klt->second->getPose(c2Mo);
944 it_klt->second->getPose(c2Mo);
981 const std::string &initFile,
const bool displayHelp)
986 std::map<std::string, vpHomogeneousMatrix> mapOfCameraPoses;
1023 const std::map<std::string, std::string> &mapOfInitFiles,
1024 const bool displayHelp)
1029 std::map<std::string, vpHomogeneousMatrix> mapOfCameraPoses;
1036 #endif //#ifdef VISP_HAVE_MODULE_GUI 1039 const std::string &)
1041 std::cerr <<
"The method initCircle is not used in vpMbEdgeKltMultiTracker !" << std::endl;
1045 const std::string &)
1047 std::cerr <<
"The method initCylinder is not used in vpMbEdgeKltMultiTracker !" << std::endl;
1052 std::cerr <<
"The method initFaceFromCorners is not used in " 1053 "vpMbEdgeKltMultiTracker !" 1059 std::cerr <<
"The method initFaceFromLines is not used in " 1060 "vpMbEdgeKltMultiTracker !" 1089 char s[FILENAME_MAX];
1093 std::string ext =
".pos";
1094 size_t pos = initFile.rfind(ext);
1096 if (pos == initFile.size() - ext.size() && pos != 0)
1097 sprintf(s,
"%s", initFile.c_str());
1099 sprintf(s,
"%s.pos", initFile.c_str());
1101 finit.open(s, std::ios::in);
1103 std::cerr <<
"cannot read " << s << std::endl;
1107 for (
unsigned int i = 0; i < 6; i += 1) {
1108 finit >> init_pos[i];
1158 const bool firstCameraIsReference)
1185 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
1196 unsigned int nbrows = 0;
1199 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1310 const bool firstCameraIsReference)
1369 const unsigned int lvl)
1373 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1388 bool newvisibleface =
false;
1389 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1392 edge->
visibleFace(*mapOfImages[it->first], it->second->cMo, newvisibleface);
1396 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1402 mapOfImages[it->first]->getHeight());
1406 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1412 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1464 const bool firstCameraIsReference)
1481 const std::string &cad_name,
1482 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
1551 const bool firstCameraIsReference)
1556 if (firstCameraIsReference) {
1557 this->
cam = camera1;
1559 this->
cam = camera2;
1585 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters)
1590 for (std::map<std::string, vpCameraParameters>::const_iterator it = mapOfCameraParameters.begin();
1591 it != mapOfCameraParameters.end(); ++it) {
1593 this->
cam = it->second;
1614 it->second = cameraTransformationMatrix;
1616 std::cerr <<
"Cannot find camera: " << cameraName <<
" !" << std::endl;
1628 const std::map<std::string, vpHomogeneousMatrix> &mapOfTransformationMatrix)
1719 #ifdef VISP_HAVE_OGRE 1812 const std::string &name)
1842 const std::string &name)
1898 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1900 it->second->setOgreVisibilityTest(v);
1903 #ifdef VISP_HAVE_OGRE 1904 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1906 it->second->faces.getOgreContext()->setWindowName(
"Multi Edge MBT Hybrid (" + it->first +
")");
1911 for (std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
1913 it->second->setOgreVisibilityTest(v);
1916 #ifdef VISP_HAVE_OGRE 1917 for (std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
1919 it->second->faces.getOgreContext()->setWindowName(
"Multi KLT MBT Hybrid (" + it->first +
")");
1947 std::cerr <<
"This method requires only 1 camera !" << std::endl;
1952 it_edge->second->setPose(I, cMo_);
1953 it_klt->second->setPose(I, cMo_);
1977 const bool firstCameraIsReference)
2009 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
2027 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
2029 it->second->setProjectionErrorComputation(flag);
2068 std::cerr <<
"The method vpMbEdgeKltMultiTracker::testTracking is not used !" << std::endl;
2086 std::map<std::string, const vpImage<unsigned char> *> mapOfImages;
2090 std::stringstream ss;
2112 std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
2113 std::map<std::string, const vpImage<unsigned char> *> mapOfImages;
2115 mapOfImages[it->first] = &I1;
2118 mapOfImages[it->first] = &I2;
2121 std::stringstream ss;
2122 ss <<
"Require two cameras ! There are " <<
m_mapOfKltTrackers.size() <<
" cameras !";
2141 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it_edge =
m_mapOfEdgeTrackers.begin();
2143 std::map<std::string, const vpImage<unsigned char> *>::const_iterator it_img = mapOfImages.find(it_edge->first);
2145 if (it_img == mapOfImages.end()) {
2151 for (std::map<std::string, vpMbKltTracker *>::const_iterator it_klt =
m_mapOfKltTrackers.begin();
2153 std::map<std::string, const vpImage<unsigned char> *>::const_iterator it_img = mapOfImages.find(it_klt->first);
2155 if (it_img == mapOfImages.end()) {
2179 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
2186 std::cerr <<
"Error in moving edge tracking" << std::endl;
2192 #elif !defined(VISP_BUILD_SHARED_LIBS) 2195 void dummy_vpMbEdgeKltMultiTracker(){};
2196 #endif // VISP_HAVE_OPENCV virtual unsigned int getClipping() const
bool m_computeInteraction
void setGoodNbRayCastingAttemptsRatio(const double &ratio)
virtual void initClick(const vpImage< unsigned char > &I, const std::vector< vpPoint > &points3D_list, const std::string &displayFile="")
Implementation of a matrix and operations on matrices.
virtual void loadModel(const std::string &modelFile, const bool verbose=false)
void displayPrimitive(const vpImage< unsigned char > &_I)
virtual void setMinLineLengthThresh(const double minLineLengthThresh, const std::string &name="")
virtual void setFarClippingDistance(const double &dist)
virtual void setFarClippingDistance(const double &dist)
virtual void setNearClippingDistance(const double &dist)
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
virtual void setLod(const bool useLod, const std::string &name="")
double thresholdMBT
The threshold used in the robust estimation of MBT.
virtual void setOgreVisibilityTest(const bool &v)
vpColVector m_error_edge
(s - s*)
virtual std::map< std::string, unsigned int > getEdgeMultiNbPolygon() const
vpColVector m_weightedError_edge
Weighted error.
virtual void setCovarianceComputation(const bool &flag)
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo)
void stack(const double &d)
bool hasEnoughPoints() const
bool hasEnoughPoints() const
vpMbHiddenFaces< vpMbtPolygon > faces
Set of faces describing the object.
virtual void setOptimizationMethod(const vpMbtOptimizationMethod &opt)
virtual void resetTracker()
virtual void computeProjectionError()
void setNbRayCastingAttemptsForVisibility(const unsigned int &attempts)
virtual void setAngleDisappear(const double &a)
std::map< std::string, vpHomogeneousMatrix > m_mapOfCameraTransformationMatrix
virtual void setDisplayFeatures(const bool displayF)
virtual void loadConfigFile(const std::string &configFile)
Implementation of an homogeneous matrix and operations on such kind of matrices.
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo)
virtual void trackMovingEdges(std::map< std::string, const vpImage< unsigned char > *> &mapOfImages)
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
void resize(const unsigned int nrows, const unsigned int ncols, const bool flagNullify=true, const bool recopy_=true)
Class to define colors available for display functionnalities.
virtual void setLod(const bool useLod, const std::string &name="")
vpColVector m_factor
Edge VVS variables.
virtual void computeVVSInit()
virtual void setFarClippingDistance(const double &dist)
vpHomogeneousMatrix cMo
The current pose.
double m_factorMBT
Factor for edge trackers.
void setGoodNbRayCastingAttemptsRatio(const double &ratio)
virtual void setDisplayFeatures(const bool displayF)
virtual void loadConfigFile(const std::string &configFile)
virtual void setDisplayFeatures(const bool displayF)
virtual void setCameraTransformationMatrix(const std::string &cameraName, const vpHomogeneousMatrix &cameraTransformationMatrix)
unsigned int m_nbrow
Number of features.
vpMbEdgeKltMultiTracker()
vpColVector m_w_edge
Robust weights.
virtual void setMinPolygonAreaThresh(const double minPolygonAreaThresh, const std::string &name="")
error that can be emited by ViSP classes.
virtual void setThresholdAcceptation(const double th)
virtual vpMbHiddenFaces< vpMbtPolygon > & getFaces()
virtual void setCovarianceComputation(const bool &flag)
virtual void setClipping(const unsigned int &flags)
unsigned int getRows() const
vpHomogeneousMatrix inverse() const
virtual void setOgreShowConfigDialog(const bool showConfigDialog)
virtual void init(const vpImage< unsigned char > &I)
virtual void setAngleAppear(const double &a)
virtual void setAngleDisappear(const double &a)
Make the complete tracking of an object by using its CAD model.
bool useOgre
Use Ogre3d for visibility tests.
virtual void setLod(const bool useLod, const std::string &name="")
virtual void initFaceFromCorners(vpMbtPolygon &polygon)
virtual void setMinPolygonAreaThresh(const double minPolygonAreaThresh, const std::string &name="")
void displayFeaturesOnImage(const vpImage< unsigned char > &I, const unsigned int lvl)
virtual void loadConfigFile(const std::string &configFile)
bool computeCovariance
Flag used to specify if the covariance matrix has to be computed or not.
void updateMovingEdge(const vpImage< unsigned char > &I)
vpMatrix m_L_hybridMulti
Interaction matrix.
virtual void computeVVS()
virtual void loadModel(const std::string &modelFile, const bool verbose=false)
virtual void computeVVSInteractionMatrixAndResidu()
virtual void setReferenceCameraName(const std::string &referenceCameraName)
virtual std::map< std::string, unsigned int > getMultiNbPolygon() const
virtual void setNearClippingDistance(const double &dist)
vpColVector m_weightedError_hybridMulti
Weighted error.
Implementation of a polygon of the model containing points of interest. It is used by the model-based...
virtual void computeVVSInteractionMatrixAndResidu()
Class that defines what is a point.
double thresholdKLT
The threshold used in the robust estimation of KLT.
vpCameraParameters cam
The camera parameters.
virtual void computeVVSWeights()
void computeClippedPolygons(const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam)
virtual ~vpMbEdgeKltMultiTracker()
vpHomogeneousMatrix ctTc0
virtual void setReferenceCameraName(const std::string &referenceCameraName)
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo_, const vpCameraParameters &cam_, const vpColor &col, const unsigned int thickness=1, const bool displayFullModel=false)
virtual void postTracking(std::map< std::string, const vpImage< unsigned char > *> &mapOfImages, const unsigned int lvl)
virtual vpHomogeneousMatrix getPose() const
virtual void initFaceFromLines(vpMbtPolygon &polygon)
virtual void computeVVSWeights()
vpRobust m_robust_klt
Robust.
virtual void track(const vpImage< unsigned char > &I)
void setGoodNbRayCastingAttemptsRatio(const double &ratio)
void insert(const vpMatrix &A, const unsigned int r, const unsigned int c)
vpMatrix oJo
The Degrees of Freedom to estimate.
Error that can be emited by the vpTracker class and its derivates.
Implementation of a polygon of the model used by the model-based tracker.
virtual vpMbHiddenFaces< vpMbtPolygon > & getFaces()
void initMovingEdge(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &_cMo)
virtual void setClipping(const unsigned int &flags)
void displayPrimitive(const vpImage< unsigned char > &_I)
virtual void setOgreShowConfigDialog(const bool showConfigDialog)
bool useScanLine
Use Scanline for visibility tests.
vpVelocityTwistMatrix buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
static double sqr(double x)
vpColVector m_error_hybridMulti
(s - s*)
virtual void setScanLineVisibilityTest(const bool &v)
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo)
virtual void setCameraParameters(const vpCameraParameters &camera)
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo_, const bool verbose=false)
Generic class defining intrinsic camera parameters.
virtual void setCameraTransformationMatrix(const std::string &cameraName, const vpHomogeneousMatrix &cameraTransformationMatrix)
Implementation of a polygon of the model containing points of interest. It is used by the model-based...
virtual void preTracking(std::map< std::string, const vpImage< unsigned char > *> &mapOfImages)
virtual unsigned int initMbtTracking(std::map< std::string, const vpImage< unsigned char > *> &mapOfImages, unsigned int lvl)
virtual void computeVVSInteractionMatrixAndResidu()
double m_initialMu
Initial Mu for Levenberg Marquardt optimization loop.
virtual std::map< std::string, unsigned int > getKltMultiNbPolygon() const
double m_lambda
Gain of the virtual visual servoing stage.
virtual void computeVVSWeights(vpRobust &robust, const vpColVector &error, vpColVector &w)
virtual void setMinPolygonAreaThresh(const double minPolygonAreaThresh, const std::string &name="")
virtual void setAngleAppear(const double &a)
Model based tracker using only KLT.
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo_, const vpCameraParameters &cam_, const vpColor &col, const unsigned int thickness=1, const bool displayFullModel=false)
std::map< std::string, vpMbEdgeTracker * > m_mapOfEdgeTrackers
Map of Model-based edge trackers.
vpColVector m_errorCylinders
virtual bool isVisible(const vpHomogeneousMatrix &cMo, const double alpha, const bool &modulo=false, const vpCameraParameters &cam=vpCameraParameters(), const vpImage< unsigned char > &I=vpImage< unsigned char >())
virtual void setCovarianceComputation(const bool &flag)
void reinitMovingEdge(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &_cMo)
vpColVector m_errorCircles
unsigned int m_maxIter
Maximum number of iterations of the virtual visual servoing stage.
void buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
virtual void postTracking(std::map< std::string, const vpImage< unsigned char > *> &mapOfImages)
virtual void resetTracker()
virtual void setThresholdAcceptation(const double th)
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
void computeProjectionError(const vpImage< unsigned char > &_I)
virtual void getCameraParameters(vpCameraParameters &camera) const
void insert(unsigned int i, const vpColVector &v)
vpRobust m_robustCylinders
virtual void setNearClippingDistance(const double &dist)
std::map< std::string, vpMbHiddenFaces< vpMbtPolygon > > getEdgeFaces() const
virtual void setCameraParameters(const vpCameraParameters &camera)
vpColVector m_w_klt
Robust weights.
void setNbRayCastingAttemptsForVisibility(const unsigned int &attempts)
bool displayFeatures
If true, the features are displayed.
virtual void initCylinder(const vpPoint &, const vpPoint &, const double, const int, const std::string &name="")
Implementation of column vector and the associated operations.
std::map< std::string, vpMbKltTracker * > m_mapOfKltTrackers
Map of Model-based klt trackers.
virtual std::map< std::string, unsigned int > getMultiNbPolygon() const
virtual void loadModel(const std::string &modelFile, const bool verbose=false)
virtual void computeVVSPoseEstimation(const bool isoJoIdentity_, const unsigned int iter, vpMatrix &L, vpMatrix <L, vpColVector &R, const vpColVector &error, vpColVector &error_prev, vpColVector <R, double &mu, vpColVector &v, const vpColVector *const w=NULL, vpColVector *const m_w_prev=NULL)
virtual void setCameraParameters(const vpCameraParameters &camera)
Implementation of a pose vector and operations on poses.
virtual vpMbHiddenFaces< vpMbtPolygon > & getFaces()
static vpHomogeneousMatrix direct(const vpColVector &v)
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo_, const bool verbose=false)
virtual void computeCovarianceMatrixVVS(const bool isoJoIdentity_, const vpColVector &w_true, const vpHomogeneousMatrix &cMoPrev, const vpMatrix &L_true, const vpMatrix &LVJ_true, const vpColVector &error)
void updateMovingEdgeWeights()
void visibleFace(const vpImage< unsigned char > &_I, const vpHomogeneousMatrix &_cMo, bool &newvisibleline)
virtual void computeVVSInit()
std::string m_referenceCameraName
Name of the reference camera.
virtual void setOgreShowConfigDialog(const bool showConfigDialog)
vpMbtPolygon * polygon
Pointer to the polygon that define a face.
virtual void computeVVSInit()
virtual void setScanLineVisibilityTest(const bool &v)
virtual std::vector< std::string > getCameraNames() const
void setNbRayCastingAttemptsForVisibility(const unsigned int &attempts)
virtual void setAngleDisappear(const double &a)
virtual void initClick(const vpImage< unsigned char > &I, const std::vector< vpPoint > &points3D_list, const std::string &displayFile="")
virtual void setClipping(const unsigned int &flags)
vpMatrix m_L_edge
Interaction matrix.
void trackMovingEdge(const vpImage< unsigned char > &I)
double m_factorKLT
Factor for KLT trackers.
virtual void setCameraTransformationMatrix(const std::string &cameraName, const vpHomogeneousMatrix &cameraTransformationMatrix)
vpColVector m_error_klt
(s - s*)
std::map< std::string, vpMbHiddenFaces< vpMbtPolygon > > getKltFaces() const
void resize(unsigned int n_data)
Resize containers for sort methods.
virtual void getCameraParameters(vpCameraParameters &camera) const
virtual unsigned int getNbPolygon() const
virtual void setMinLineLengthThresh(const double minLineLengthThresh, const std::string &name="")
Make the complete stereo (or more) tracking of an object by using its CAD model.
virtual void setProjectionErrorComputation(const bool &flag)
void computeVVSFirstPhaseFactor(const vpImage< unsigned char > &I, const unsigned int lvl=0)
void computeScanLineRender(const vpCameraParameters &cam, const unsigned int &w, const unsigned int &h)
vpColVector m_w_hybridMulti
Robust weights.
virtual void resetTracker()
virtual void setOptimizationMethod(const vpMbtOptimizationMethod &opt)
virtual void setReferenceCameraName(const std::string &referenceCameraName)
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo_, const bool verbose=false)
virtual void computeVVSCheckLevenbergMarquardt(const unsigned int iter, vpColVector &error, const vpColVector &m_error_prev, const vpHomogeneousMatrix &cMoPrev, double &mu, bool &reStartFromLastIncrement, vpColVector *const w=NULL, const vpColVector *const m_w_prev=NULL)
virtual void initCircle(const vpPoint &, const vpPoint &, const vpPoint &, const double, const int, const std::string &name="")
bool isoJoIdentity
Boolean to know if oJo is identity (for fast computation)
Model based stereo (or more) tracker using only KLT.
vpHomogeneousMatrix c0Mo
Initial pose.
virtual std::vector< std::string > getCameraNames() const
virtual void setAngleAppear(const double &a)
virtual void setOptimizationMethod(const vpMbtOptimizationMethod &opt)
virtual void testTracking()
virtual void setScanLineVisibilityTest(const bool &v)
void resize(const unsigned int i, const bool flagNullify=true)
virtual void setProjectionErrorComputation(const bool &flag)
vpMatrix m_L_klt
Interaction matrix.