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,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
117 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
122 const bool displayFullModel =
false);
126 const vpColor &color,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
129 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
130 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
const vpColor &col,
131 const unsigned int thickness = 1,
const bool displayFullModel =
false);
134 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
135 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
const vpColor &col,
136 const unsigned int thickness = 1,
const bool displayFullModel =
false);
143 virtual void getCameraParameters(std::map<std::string, vpCameraParameters> &mapOfCameraParameters)
const;
146 virtual unsigned int getClipping(
const std::string &cameraName)
const;
150 std::map<std::string, vpMbHiddenFaces<vpMbtPolygon> > getEdgeFaces()
const;
152 std::map<std::string, vpMbHiddenFaces<vpMbtPolygon> > getKltFaces()
const;
169 virtual std::map<std::string, unsigned int> getEdgeMultiNbPolygon()
const;
170 virtual std::map<std::string, unsigned int> getKltMultiNbPolygon()
const;
182 virtual void getPose(std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
const;
190 #ifdef VISP_HAVE_MODULE_GUI 192 const std::string &displayFile =
"");
198 const std::string &initFile1,
const std::string &initFile2,
const bool displayHelp =
false,
199 const bool firstCameraIsReference =
true);
202 const std::string &initFile,
const bool displayHelp =
false);
205 const std::map<std::string, std::string> &mapOfInitFiles,
const bool displayHelp =
false);
209 const std::string &name =
"");
218 const bool firstCameraIsReference =
true);
222 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
229 virtual void loadConfigFile(
const std::string &configFile1,
const std::string &configFile2,
230 const bool firstCameraIsReference =
true);
232 virtual void loadConfigFile(
const std::map<std::string, std::string> &mapOfConfigFiles);
234 virtual void loadModel(
const std::string &modelFile,
const bool verbose =
false,
243 const bool firstCameraIsReference =
true);
245 const std::string &cad_name,
246 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
247 const bool verbose =
false);
257 const bool firstCameraIsReference =
true);
261 virtual void setCameraParameters(
const std::map<std::string, vpCameraParameters> &mapOfCameraParameters);
269 virtual void setClipping(
const unsigned int &flags);
270 virtual void setClipping(
const std::string &cameraName,
const unsigned int &flags);
284 inline void setFactorKLT(
const double factor) { m_factorKLT = factor; }
291 inline void setFactorMBT(
const double factor) { m_factorMBT = factor; }
293 #ifdef VISP_HAVE_OGRE 317 virtual void setLod(
const bool useLod,
const std::string &name =
"");
318 virtual void setLod(
const bool useLod,
const std::string &cameraName,
const std::string &name);
322 const std::string &name);
326 const std::string &name);
341 const bool firstCameraIsReference =
true);
347 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
371 const unsigned int lvl = 0);
377 std::map<std::string, vpVelocityTwistMatrix> &mapOfVelocityTwist);
394 #endif // VISP_HAVE_OPENCV 395 #endif //#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS) 396 #endif //_vpMbEdgeKltMultiTracker_h_ Implementation of a matrix and operations on matrices.
virtual void computeVVSInteractionMatrixAndResidu()
virtual void setMinLineLengthThresh(const double minLineLengthThresh, const std::string &name="")
virtual void setFarClippingDistance(const double &dist)
virtual void computeVVSWeights()
virtual void computeVVSInit()
virtual vpColVector getRobustWeights() const
virtual void setLod(const bool useLod, const std::string &name="")
double thresholdMBT
The threshold used in the robust estimation of MBT.
virtual void loadModel(const std::string &modelFile, const bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
virtual void initFaceFromCorners(vpMbtPolygon &polygon)
virtual unsigned int getClipping() const
void setNbRayCastingAttemptsForVisibility(const unsigned int &attempts)
std::map< std::string, vpHomogeneousMatrix > m_mapOfCameraTransformationMatrix
virtual void setDisplayFeatures(const bool displayF)
Implementation of an homogeneous matrix and operations on such kind of matrices.
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)
unsigned int m_nbrow
Number of features.
virtual void setThresholdAcceptation(const double th)
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 setOgreShowConfigDialog(const bool showConfigDialog)
vpMatrix m_L_hybridMulti
Interaction matrix.
virtual unsigned int getNbPolygon() const
virtual void computeVVS()
virtual void setReferenceCameraName(const std::string &referenceCameraName)
virtual void setNearClippingDistance(const double &dist)
vpColVector m_weightedError_hybridMulti
Weighted error.
Class that defines what is a point.
double thresholdKLT
The threshold used in the robust estimation of KLT.
virtual vpColVector getError() 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)
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 vpHomogeneousMatrix getPose() const
virtual void setOgreVisibilityTest(const bool &v)
virtual void computeVVS(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages, const unsigned int lvl)
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.
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 computeVVSWeights(vpRobust &robust, const vpColVector &error, vpColVector &w)
virtual void setMinPolygonAreaThresh(const double minPolygonAreaThresh, const std::string &name="")
void setFactorMBT(const double factor)
void setFactorKLT(const double factor)
virtual void setCovarianceComputation(const bool &flag)
virtual void resetTracker()
virtual void initFaceFromLines(vpMbtPolygon &polygon)
virtual void initCylinder(const vpPoint &p1, const vpPoint &p2, const double radius, const int idFace=0, const std::string &name="")
virtual void getCameraParameters(vpCameraParameters &camera) const
Implementation of column vector and the associated operations.
virtual void initCircle(const vpPoint &p1, const vpPoint &p2, const vpPoint &p3, const double radius, const 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 std::vector< std::string > getCameraNames() const
virtual void postTracking(std::map< std::string, const vpImage< unsigned char > * > &mapOfImages)
unsigned int getNumberOfCameras() const
virtual void setAngleDisappear(const double &a)
double m_factorKLT
Factor for KLT trackers.
double getFactorMBT() 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())
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 void setAngleAppear(const double &a)
double getFactorKLT() const