44 #ifndef _vpMbEdgeKltMultiTracker_h_ 45 #define _vpMbEdgeKltMultiTracker_h_ 50 #include <visp3/core/vpConfig.h> 52 #if defined(VISP_BUILD_DEPRECATED_FUNCTIONS) 54 #if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100) 56 #include <visp3/mbt/vpMbEdgeMultiTracker.h> 57 #include <visp3/mbt/vpMbKltMultiTracker.h> 114 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
117 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
122 bool displayFullModel =
false);
126 const vpColor &color,
unsigned int thickness = 1,
bool displayFullModel =
false);
129 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
130 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
const vpColor &col,
131 unsigned int thickness = 1,
bool displayFullModel =
false);
134 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
135 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
const vpColor &col,
136 unsigned int thickness = 1,
bool displayFullModel =
false);
143 std::cerr <<
"Not implemented. Deprecated class." << std::endl;
144 return std::vector<std::vector<double> >();
152 virtual void getCameraParameters(std::map<std::string, vpCameraParameters> &mapOfCameraParameters)
const;
155 virtual unsigned int getClipping(
const std::string &cameraName)
const;
159 std::map<std::string, vpMbHiddenFaces<vpMbtPolygon> > getEdgeFaces()
const;
161 std::map<std::string, vpMbHiddenFaces<vpMbtPolygon> > getKltFaces()
const;
178 virtual std::map<std::string, unsigned int> getEdgeMultiNbPolygon()
const;
179 virtual std::map<std::string, unsigned int> getKltMultiNbPolygon()
const;
191 virtual void getPose(std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
const;
199 #ifdef VISP_HAVE_MODULE_GUI 201 const std::string &displayFile =
"");
207 const std::string &initFile1,
const std::string &initFile2,
bool displayHelp =
false,
208 bool firstCameraIsReference =
true);
211 const std::string &initFile,
bool displayHelp =
false);
214 const std::map<std::string, std::string> &mapOfInitFiles,
bool displayHelp =
false);
218 const std::string &name =
"");
227 bool firstCameraIsReference =
true);
231 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
238 virtual void loadConfigFile(
const std::string &configFile1,
const std::string &configFile2,
239 bool firstCameraIsReference =
true);
241 virtual void loadConfigFile(
const std::map<std::string, std::string> &mapOfConfigFiles);
243 virtual void loadModel(
const std::string &modelFile,
bool verbose =
false,
252 bool firstCameraIsReference =
true);
254 const std::string &cad_name,
255 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
256 bool verbose =
false);
266 bool firstCameraIsReference =
true);
270 virtual void setCameraParameters(
const std::map<std::string, vpCameraParameters> &mapOfCameraParameters);
278 virtual void setClipping(
const unsigned int &flags);
279 virtual void setClipping(
const std::string &cameraName,
const unsigned int &flags);
293 inline void setFactorKLT(
const double factor) { m_factorKLT = factor; }
300 inline void setFactorMBT(
const double factor) { m_factorMBT = factor; }
302 #ifdef VISP_HAVE_OGRE 326 virtual void setLod(
bool useLod,
const std::string &name =
"");
327 virtual void setLod(
bool useLod,
const std::string &cameraName,
const std::string &name);
331 const std::string &name);
335 const std::string &name);
351 bool firstCameraIsReference =
true);
357 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
382 unsigned int lvl = 0);
388 std::map<std::string, vpVelocityTwistMatrix> &mapOfVelocityTwist);
405 #endif // VISP_HAVE_OPENCV 406 #endif //#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS) 407 #endif //_vpMbEdgeKltMultiTracker_h_ virtual unsigned int getClipping() const
Implementation of a matrix and operations on matrices.
virtual void setLod(bool useLod, const std::string &name="")
virtual void computeVVSInteractionMatrixAndResidu()
virtual void setFarClippingDistance(const double &dist)
virtual vpColVector getError() const
virtual void computeVVSWeights()
virtual void computeVVSInit()
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 initFaceFromCorners(vpMbtPolygon &polygon)
void setNbRayCastingAttemptsForVisibility(const unsigned int &attempts)
std::map< std::string, vpHomogeneousMatrix > m_mapOfCameraTransformationMatrix
Implementation of an homogeneous matrix and operations on such kind of matrices.
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 initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
friend class vpMbEdgeKltMultiTracker
Class to define colors available for display functionnalities.
virtual void track(const vpImage< unsigned char > &I)
virtual void setProjectionErrorComputation(const bool &flag)
double m_factorMBT
Factor for edge trackers.
virtual void loadConfigFile(const std::string &configFile)
virtual void setMinPolygonAreaThresh(double minPolygonAreaThresh, const std::string &name="")
unsigned int m_nbrow
Number of features.
virtual vpColVector getRobustWeights() const
double m_thresholdMBT
The threshold used in the robust estimation of MBT.
Hybrid stereo (or more) tracker based on moving-edges and keypoints tracked using KLT tracker...
virtual void computeVVSInteractionMatrixAndResidu()
virtual void setClipping(const unsigned int &flags)
virtual void initCircle(const vpPoint &p1, const vpPoint &p2, const vpPoint &p3, double radius, int idFace=0, const std::string &name="")
vpMatrix m_L_hybridMulti
Interaction matrix.
virtual void computeVVS()
virtual void setReferenceCameraName(const std::string &referenceCameraName)
double m_thresholdKLT
The threshold used in the robust estimation of KLT.
virtual void setNearClippingDistance(const double &dist)
vpColVector m_weightedError_hybridMulti
Weighted error.
Class that defines what is a point.
virtual void setDisplayFeatures(bool displayF)
virtual std::vector< std::vector< double > > getModelForDisplay(unsigned int, unsigned int, const vpHomogeneousMatrix &, const vpCameraParameters &, bool=false)
virtual vpHomogeneousMatrix getPose() const
void setGoodNbRayCastingAttemptsRatio(const double &ratio)
virtual void initClick(const vpImage< unsigned char > &I, const std::vector< vpPoint > &points3D_list, const std::string &displayFile="")
void init(const vpImage< unsigned char > &I)
Implementation of a polygon of the model used by the model-based tracker.
virtual void setOgreShowConfigDialog(bool showConfigDialog)
virtual void setOgreVisibilityTest(const bool &v)
unsigned int getNumberOfCameras() const
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 testTracking()
virtual void setCameraParameters(const vpCameraParameters &camera)
Generic class defining intrinsic camera parameters.
unsigned int initMbtTracking(unsigned int &nberrors_lines, unsigned int &nberrors_cylinders, unsigned int &nberrors_circles)
virtual void setCameraTransformationMatrix(const std::string &cameraName, const vpHomogeneousMatrix &cameraTransformationMatrix)
virtual void loadModel(const std::string &modelFile, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
virtual void computeVVSWeights(vpRobust &robust, const vpColVector &error, vpColVector &w)
void setFactorMBT(const double factor)
void setFactorKLT(const double factor)
virtual void setCovarianceComputation(const bool &flag)
virtual void postTracking(std::map< std::string, const vpImage< unsigned char > *> &mapOfImages)
virtual void resetTracker()
double getFactorKLT() const
double getFactorMBT() const
virtual void initFaceFromLines(vpMbtPolygon &polygon)
Implementation of column vector and the associated operations.
virtual void initCylinder(const vpPoint &p1, const vpPoint &p2, double radius, int idFace=0, const std::string &name="")
Implementation of a pose vector and operations on poses.
virtual vpMbHiddenFaces< vpMbtPolygon > & getFaces()
std::string m_referenceCameraName
Name of the reference camera.
virtual unsigned int getNbPolygon() const
virtual void setAngleDisappear(const double &a)
virtual void setThresholdAcceptation(double th)
double m_factorKLT
Factor for KLT trackers.
virtual void setMinLineLengthThresh(double minLineLengthThresh, const std::string &name="")
virtual void getCameraParameters(vpCameraParameters &camera) const
Make the complete stereo (or more) tracking of an object by using its CAD model.
vpColVector m_w_hybridMulti
Robust weights.
virtual void setOptimizationMethod(const vpMbtOptimizationMethod &opt)
Model based stereo (or more) tracker using only KLT.
virtual std::vector< std::string > getCameraNames() const
virtual void setAngleAppear(const double &a)
virtual void computeVVS(std::map< std::string, const vpImage< unsigned char > *> &mapOfImages, unsigned int lvl)