44 #include <visp3/core/vpConfig.h> 46 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS) 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 m_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++) {
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 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 unsigned int thickness,
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,
unsigned int thickness,
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,
unsigned int thickness,
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,
unsigned int thickness,
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,
unsigned int thickness,
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)
935 const std::string &initFile1,
const std::string &initFile2,
936 bool displayHelp,
bool firstCameraIsReference)
942 std::map<std::string, vpMbKltTracker *>::const_iterator it_klt =
m_mapOfKltTrackers.begin();
943 if (firstCameraIsReference) {
945 it_klt->second->getPose(c2Mo);
947 it_klt->second->getPose(c2Mo);
984 const std::string &initFile,
bool displayHelp)
989 std::map<std::string, vpHomogeneousMatrix> mapOfCameraPoses;
1026 const std::map<std::string, std::string> &mapOfInitFiles,
1032 std::map<std::string, vpHomogeneousMatrix> mapOfCameraPoses;
1039 #endif //#ifdef VISP_HAVE_MODULE_GUI 1042 const std::string &)
1044 std::cerr <<
"The method initCircle is not used in vpMbEdgeKltMultiTracker !" << std::endl;
1048 const std::string &)
1050 std::cerr <<
"The method initCylinder is not used in vpMbEdgeKltMultiTracker !" << std::endl;
1055 std::cerr <<
"The method initFaceFromCorners is not used in " 1056 "vpMbEdgeKltMultiTracker !" 1062 std::cerr <<
"The method initFaceFromLines is not used in " 1063 "vpMbEdgeKltMultiTracker !" 1092 char s[FILENAME_MAX];
1096 std::string ext =
".pos";
1097 size_t pos = initFile.rfind(ext);
1099 if (pos == initFile.size() - ext.size() && pos != 0)
1100 sprintf(s,
"%s", initFile.c_str());
1102 sprintf(s,
"%s.pos", initFile.c_str());
1104 finit.open(s, std::ios::in);
1106 std::cerr <<
"cannot read " << s << std::endl;
1110 for (
unsigned int i = 0; i < 6; i += 1) {
1111 finit >> init_pos[i];
1161 bool firstCameraIsReference)
1188 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
1199 unsigned int nbrows = 0;
1202 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1305 bool firstCameraIsReference)
1367 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1382 bool newvisibleface =
false;
1383 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1386 edge->
visibleFace(*mapOfImages[it->first], it->second->m_cMo, newvisibleface);
1390 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1396 mapOfImages[it->first]->getHeight());
1400 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1406 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1409 edge->
initMovingEdge(*mapOfImages[it->first], it->second->m_cMo);
1462 bool firstCameraIsReference)
1479 const std::string &cad_name,
1480 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
1549 bool firstCameraIsReference)
1554 if (firstCameraIsReference) {
1583 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters)
1588 for (std::map<std::string, vpCameraParameters>::const_iterator it = mapOfCameraParameters.begin();
1589 it != mapOfCameraParameters.end(); ++it) {
1612 it->second = cameraTransformationMatrix;
1614 std::cerr <<
"Cannot find camera: " << cameraName <<
" !" << std::endl;
1626 const std::map<std::string, vpHomogeneousMatrix> &mapOfTransformationMatrix)
1717 #ifdef VISP_HAVE_OGRE 1810 const std::string &name)
1840 const std::string &name)
1896 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1898 it->second->setOgreVisibilityTest(v);
1901 #ifdef VISP_HAVE_OGRE 1902 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1904 it->second->faces.getOgreContext()->setWindowName(
"Multi Edge MBT Hybrid (" + it->first +
")");
1909 for (std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
1911 it->second->setOgreVisibilityTest(v);
1914 #ifdef VISP_HAVE_OGRE 1915 for (std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
1917 it->second->faces.getOgreContext()->setWindowName(
"Multi KLT MBT Hybrid (" + it->first +
")");
1945 std::cerr <<
"This method requires only 1 camera !" << std::endl;
1950 it_edge->second->setPose(I, cMo);
1951 it_klt->second->setPose(I, cMo);
1972 std::cerr <<
"This method requires only 1 camera !" << std::endl;
1978 it_edge->second->setPose(
m_I, cMo);
1979 it_klt->second->setPose(
m_I, cMo);
2003 bool firstCameraIsReference)
2035 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
2053 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
2055 it->second->setProjectionErrorComputation(flag);
2094 std::cerr <<
"The method vpMbEdgeKltMultiTracker::testTracking is not used !" << std::endl;
2112 std::map<std::string, const vpImage<unsigned char> *> mapOfImages;
2116 std::stringstream ss;
2132 std::cout <<
"Not supported interface, this class is deprecated." << std::endl;
2146 std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
2147 std::map<std::string, const vpImage<unsigned char> *> mapOfImages;
2149 mapOfImages[it->first] = &I1;
2152 mapOfImages[it->first] = &I2;
2155 std::stringstream ss;
2156 ss <<
"Require two cameras ! There are " <<
m_mapOfKltTrackers.size() <<
" cameras !";
2175 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it_edge =
m_mapOfEdgeTrackers.begin();
2177 std::map<std::string, const vpImage<unsigned char> *>::const_iterator it_img = mapOfImages.find(it_edge->first);
2179 if (it_img == mapOfImages.end()) {
2185 for (std::map<std::string, vpMbKltTracker *>::const_iterator it_klt =
m_mapOfKltTrackers.begin();
2187 std::map<std::string, const vpImage<unsigned char> *>::const_iterator it_img = mapOfImages.find(it_klt->first);
2189 if (it_img == mapOfImages.end()) {
2213 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
2220 std::cerr <<
"Error in moving edge tracking" << std::endl;
2226 #elif !defined(VISP_BUILD_SHARED_LIBS) 2229 void dummy_vpMbEdgeKltMultiTracker(){}
2230 #endif // VISP_HAVE_OPENCV 2231 #elif !defined(VISP_BUILD_SHARED_LIBS) 2234 void dummy_vpMbEdgeKltMultiTracker(){}
2235 #endif //#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS) 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 setLod(bool useLod, const std::string &name="")
void displayPrimitive(const vpImage< unsigned char > &_I)
virtual void setThresholdAcceptation(double th)
virtual void setFarClippingDistance(const double &dist)
virtual void setFarClippingDistance(const double &dist)
virtual void setNearClippingDistance(const double &dist)
vpCameraParameters m_cam
The camera parameters.
virtual std::vector< std::vector< double > > getFeaturesForDisplayEdge()
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
virtual void loadModel(const std::string &modelFile, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
virtual void computeVVSCheckLevenbergMarquardt(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 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)
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
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 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 display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false)
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false)
virtual void setMinPolygonAreaThresh(double minPolygonAreaThresh, const std::string &name="")
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
virtual void loadModel(const std::string &modelFile, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
Class to define colors available for display functionnalities.
vpColVector m_factor
Edge VVS variables.
virtual void computeVVSInit()
virtual void setFarClippingDistance(const double &dist)
double m_factorMBT
Factor for edge trackers.
void setGoodNbRayCastingAttemptsRatio(const double &ratio)
virtual void loadConfigFile(const std::string &configFile)
virtual void setMinPolygonAreaThresh(double minPolygonAreaThresh, const std::string &name="")
virtual void setCameraTransformationMatrix(const std::string &cameraName, const vpHomogeneousMatrix &cameraTransformationMatrix)
unsigned int m_nbrow
Number of features.
vpMbEdgeKltMultiTracker()
vpColVector m_w_edge
Robust weights.
error that can be emited by ViSP classes.
double m_thresholdMBT
The threshold used in the robust estimation of MBT.
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 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 initFaceFromCorners(vpMbtPolygon &polygon)
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 computeVVSInteractionMatrixAndResidu()
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
virtual void setReferenceCameraName(const std::string &referenceCameraName)
virtual std::map< std::string, unsigned int > getMultiNbPolygon() const
double m_thresholdKLT
The threshold used in the robust estimation of KLT.
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.
virtual void computeVVSWeights()
void computeClippedPolygons(const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam)
virtual void setDisplayFeatures(bool displayF)
virtual ~vpMbEdgeKltMultiTracker()
vpHomogeneousMatrix ctTc0
virtual void setReferenceCameraName(const std::string &referenceCameraName)
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)
vpMatrix oJo
The Degrees of Freedom to estimate.
virtual void setMinLineLengthThresh(double minLineLengthThresh, const std::string &name="")
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)
virtual void setOgreShowConfigDialog(bool showConfigDialog)
void displayPrimitive(const vpImage< unsigned char > &_I)
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 setLod(bool useLod, const std::string &name="")
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 loadModel(const std::string &modelFile, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
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 setAngleAppear(const double &a)
Model based tracker using only KLT.
void computeVVSFirstPhaseFactor(const vpImage< unsigned char > &I, unsigned int lvl=0)
std::map< std::string, vpMbEdgeTracker * > m_mapOfEdgeTrackers
Map of Model-based edge trackers.
vpColVector m_errorCylinders
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 bool isVisible(const vpHomogeneousMatrix &cMo, double alpha, const bool &modulo=false, const vpCameraParameters &cam=vpCameraParameters(), unsigned int width=0, unsigned int height=0)
virtual void setOgreShowConfigDialog(bool showConfigDialog)
virtual void postTracking(std::map< std::string, const vpImage< unsigned char > *> &mapOfImages)
virtual void resetTracker()
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 setOgreShowConfigDialog(bool showConfigDialog)
virtual void setCameraParameters(const vpCameraParameters &camera)
vpColVector m_w_klt
Robust weights.
void resize(unsigned int i, bool flagNullify=true)
void setNbRayCastingAttemptsForVisibility(const unsigned int &attempts)
virtual void computeVVSPoseEstimation(const bool isoJoIdentity_, 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)
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 setDisplayFeatures(bool displayF)
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 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.
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 setDisplayFeatures(bool displayF)
virtual void postTracking(std::map< std::string, const vpImage< unsigned char > *> &mapOfImages)
virtual void setClipping(const unsigned int &flags)
vpMatrix m_L_edge
Interaction matrix.
void insert(const vpMatrix &A, unsigned int r, unsigned int c)
void trackMovingEdge(const vpImage< unsigned char > &I)
virtual void setThresholdAcceptation(double th)
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 setMinLineLengthThresh(double minLineLengthThresh, const std::string &name="")
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
virtual void getCameraParameters(vpCameraParameters &camera) const
vpImage< unsigned char > m_I
Grayscale image buffer, used when passing color images.
virtual unsigned int getNbPolygon() const
Make the complete stereo (or more) tracking of an object by using its CAD model.
virtual void setProjectionErrorComputation(const bool &flag)
virtual void setLod(bool useLod, const std::string &name="")
void computeScanLineRender(const vpCameraParameters &cam, const unsigned int &w, const unsigned int &h)
vpHomogeneousMatrix m_cMo
The current pose.
vpColVector m_w_hybridMulti
Robust weights.
virtual void resetTracker()
virtual void setOptimizationMethod(const vpMbtOptimizationMethod &opt)
virtual void setReferenceCameraName(const std::string &referenceCameraName)
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 setMinPolygonAreaThresh(double minPolygonAreaThresh, const std::string &name="")
virtual void setAngleAppear(const double &a)
std::vector< std::vector< double > > m_featuresToBeDisplayedEdge
Display features.
virtual void setOptimizationMethod(const vpMbtOptimizationMethod &opt)
virtual void testTracking()
virtual void setScanLineVisibilityTest(const bool &v)
virtual void setProjectionErrorComputation(const bool &flag)
vpMatrix m_L_klt
Interaction matrix.