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 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)
935 const std::string &initFile1,
const std::string &initFile2,
936 const bool displayHelp,
const 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,
const bool displayHelp)
989 std::map<std::string, vpHomogeneousMatrix> mapOfCameraPoses;
1026 const std::map<std::string, std::string> &mapOfInitFiles,
1027 const bool displayHelp)
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 const 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();
1313 const bool firstCameraIsReference)
1375 const unsigned int lvl)
1379 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1394 bool newvisibleface =
false;
1395 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1398 edge->
visibleFace(*mapOfImages[it->first], it->second->cMo, newvisibleface);
1402 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1408 mapOfImages[it->first]->getHeight());
1412 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1418 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1474 const bool firstCameraIsReference)
1491 const std::string &cad_name,
1492 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
1561 const bool firstCameraIsReference)
1566 if (firstCameraIsReference) {
1567 this->
cam = camera1;
1569 this->
cam = camera2;
1595 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters)
1600 for (std::map<std::string, vpCameraParameters>::const_iterator it = mapOfCameraParameters.begin();
1601 it != mapOfCameraParameters.end(); ++it) {
1603 this->
cam = it->second;
1624 it->second = cameraTransformationMatrix;
1626 std::cerr <<
"Cannot find camera: " << cameraName <<
" !" << std::endl;
1638 const std::map<std::string, vpHomogeneousMatrix> &mapOfTransformationMatrix)
1729 #ifdef VISP_HAVE_OGRE 1822 const std::string &name)
1852 const std::string &name)
1908 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1910 it->second->setOgreVisibilityTest(v);
1913 #ifdef VISP_HAVE_OGRE 1914 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
1916 it->second->faces.getOgreContext()->setWindowName(
"Multi Edge MBT Hybrid (" + it->first +
")");
1921 for (std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
1923 it->second->setOgreVisibilityTest(v);
1926 #ifdef VISP_HAVE_OGRE 1927 for (std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
1929 it->second->faces.getOgreContext()->setWindowName(
"Multi KLT MBT Hybrid (" + it->first +
")");
1957 std::cerr <<
"This method requires only 1 camera !" << std::endl;
1962 it_edge->second->setPose(I, cMo_);
1963 it_klt->second->setPose(I, cMo_);
1987 const bool firstCameraIsReference)
2019 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
2037 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
2039 it->second->setProjectionErrorComputation(flag);
2078 std::cerr <<
"The method vpMbEdgeKltMultiTracker::testTracking is not used !" << std::endl;
2096 std::map<std::string, const vpImage<unsigned char> *> mapOfImages;
2100 std::stringstream ss;
2122 std::map<std::string, vpMbKltTracker *>::const_iterator it =
m_mapOfKltTrackers.begin();
2123 std::map<std::string, const vpImage<unsigned char> *> mapOfImages;
2125 mapOfImages[it->first] = &I1;
2128 mapOfImages[it->first] = &I2;
2131 std::stringstream ss;
2132 ss <<
"Require two cameras ! There are " <<
m_mapOfKltTrackers.size() <<
" cameras !";
2151 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it_edge =
m_mapOfEdgeTrackers.begin();
2153 std::map<std::string, const vpImage<unsigned char> *>::const_iterator it_img = mapOfImages.find(it_edge->first);
2155 if (it_img == mapOfImages.end()) {
2161 for (std::map<std::string, vpMbKltTracker *>::const_iterator it_klt =
m_mapOfKltTrackers.begin();
2163 std::map<std::string, const vpImage<unsigned char> *>::const_iterator it_img = mapOfImages.find(it_klt->first);
2165 if (it_img == mapOfImages.end()) {
2189 for (std::map<std::string, vpMbEdgeTracker *>::const_iterator it =
m_mapOfEdgeTrackers.begin();
2196 std::cerr <<
"Error in moving edge tracking" << std::endl;
2202 #elif !defined(VISP_BUILD_SHARED_LIBS) 2205 void dummy_vpMbEdgeKltMultiTracker(){}
2206 #endif // VISP_HAVE_OPENCV 2207 #elif !defined(VISP_BUILD_SHARED_LIBS) 2210 void dummy_vpMbEdgeKltMultiTracker(){}
2211 #endif //#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS) bool m_computeInteraction
void setGoodNbRayCastingAttemptsRatio(const double &ratio)
virtual void trackMovingEdges(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages)
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.
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 void loadModel(const std::string &modelFile, const bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
vpColVector m_weightedError_edge
Weighted error.
virtual void setCovarianceComputation(const bool &flag)
virtual unsigned int getClipping() const
std::map< std::string, vpMbHiddenFaces< vpMbtPolygon > > getEdgeFaces() const
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo)
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 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)
virtual std::map< std::string, unsigned int > getMultiNbPolygon() const
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.
bool hasEnoughPoints() const
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)
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.
virtual void getCameraParameters(vpCameraParameters &camera) const
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo_, const bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
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 postTracking(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages, const unsigned int lvl)
virtual void computeVVSInteractionMatrixAndResidu()
virtual void setReferenceCameraName(const std::string &referenceCameraName)
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 std::map< std::string, unsigned int > getEdgeMultiNbPolygon() const
virtual ~vpMbEdgeKltMultiTracker()
vpHomogeneousMatrix ctTc0
virtual void setReferenceCameraName(const std::string &referenceCameraName)
virtual void loadModel(const std::string &modelFile, const bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
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 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()
virtual void loadModel(const std::string &modelFile, const bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
void initMovingEdge(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &_cMo)
virtual void setClipping(const unsigned int &flags)
virtual vpHomogeneousMatrix getPose() const
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)
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo_, const bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
virtual unsigned int initMbtTracking(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages, unsigned int lvl)
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)
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 computeVVSInteractionMatrixAndResidu()
double m_initialMu
Initial Mu for Levenberg Marquardt optimization loop.
double m_lambda
Gain of the virtual visual servoing stage.
virtual void computeVVSWeights(vpRobust &robust, const vpColVector &error, vpColVector &w)
virtual void preTracking(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages)
virtual void setMinPolygonAreaThresh(const double minPolygonAreaThresh, const std::string &name="")
bool hasEnoughPoints() const
virtual void setAngleAppear(const double &a)
Model based tracker using only KLT.
unsigned int getRows() const
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 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)
void insert(unsigned int i, const vpColVector &v)
vpRobust m_robustCylinders
virtual void setNearClippingDistance(const double &dist)
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 std::map< std::string, unsigned int > getKltMultiNbPolygon() const
virtual void getCameraParameters(vpCameraParameters &camera) const
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 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.
vpHomogeneousMatrix inverse() const
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.
virtual void setOgreShowConfigDialog(const bool showConfigDialog)
virtual std::vector< std::string > getCameraNames() const
vpMbtPolygon * polygon
Pointer to the polygon that define a face.
virtual void computeVVSInit()
virtual std::vector< std::string > getCameraNames() const
virtual void postTracking(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages)
virtual void setScanLineVisibilityTest(const bool &v)
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*)
void resize(unsigned int n_data)
Resize containers for sort methods.
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo_, const bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
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 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::map< std::string, unsigned int > getMultiNbPolygon() const
std::map< std::string, vpMbHiddenFaces< vpMbtPolygon > > getKltFaces() const
virtual void setAngleAppear(const double &a)
virtual void setOptimizationMethod(const vpMbtOptimizationMethod &opt)
virtual unsigned int getNbPolygon() const
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.