46 #ifndef __vpMbKltMultiTracker_h__ 47 #define __vpMbKltMultiTracker_h__ 52 #include <visp3/core/vpConfig.h> 54 #if defined(VISP_HAVE_MODULE_KLT) && defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100) 56 #include <visp3/mbt/vpMbKltTracker.h> 104 const std::string &name =
"");
107 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
110 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
115 const bool displayFullModel =
false);
119 const vpColor &color,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
122 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
123 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
const vpColor &col,
124 const unsigned int thickness = 1,
const bool displayFullModel =
false);
127 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
128 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
const vpColor &col,
129 const unsigned int thickness = 1,
const bool displayFullModel =
false);
131 virtual std::vector<std::string> getCameraNames()
const;
136 virtual void getCameraParameters(std::map<std::string, vpCameraParameters> &mapOfCameraParameters)
const;
139 virtual unsigned int getClipping(
const std::string &cameraName)
const;
143 virtual std::map<std::string, vpMbHiddenFaces<vpMbtPolygon> >
getFaces()
const;
146 virtual std::list<vpMbtDistanceCircle *> &
getFeaturesCircle(
const std::string &cameraName);
149 virtual std::list<vpMbtDistanceKltPoints *> &
getFeaturesKlt(
const std::string &cameraName);
154 virtual std::map<std::string, std::vector<vpImagePoint> >
getKltImagePoints()
const;
158 virtual std::map<std::string, vpKltOpencv>
getKltOpencv()
const;
160 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408) 161 virtual std::map<std::string, std::vector<cv::Point2f> >
getKltPoints()
const;
163 virtual std::map<std::string, CvPoint2D32f *>
getKltPoints();
169 virtual std::map<std::string, unsigned int> getMultiNbPolygon()
const;
181 virtual void getPose(std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
const;
189 #ifdef VISP_HAVE_MODULE_GUI 191 const std::string &displayFile =
"");
196 const std::string &initFile1,
const std::string &initFile2,
const bool displayHelp =
false,
197 const bool firstCameraIsReference =
true);
200 const std::string &initFile,
const bool displayHelp =
false);
203 const std::map<std::string, std::string> &mapOfInitFiles,
const bool displayHelp =
false);
212 const bool firstCameraIsReference =
true);
216 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
220 virtual void loadConfigFile(
const std::string &configFile1,
const std::string &configFile2,
221 const bool firstCameraIsReference =
true);
223 virtual void loadConfigFile(
const std::map<std::string, std::string> &mapOfConfigFiles);
225 virtual void loadModel(
const std::string &modelFile,
const bool verbose =
false);
232 const bool firstCameraIsReference =
true);
234 const std::string &cad_name,
235 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
236 const bool verbose =
false);
246 const bool firstCameraIsReference =
true);
250 virtual void setCameraParameters(
const std::map<std::string, vpCameraParameters> &mapOfCameraParameters);
252 virtual void setCameraTransformationMatrix(
const std::string &cameraName,
256 setCameraTransformationMatrix(
const std::map<std::string, vpHomogeneousMatrix> &mapOfTransformationMatrix);
258 virtual void setClipping(
const unsigned int &flags);
259 virtual void setClipping(
const std::string &cameraName,
const unsigned int &flags);
268 #ifdef VISP_HAVE_OGRE 277 virtual void setKltOpencv(
const std::map<std::string, vpKltOpencv> &mapOfOpenCVTrackers);
281 virtual void setLod(
const bool useLod,
const std::string &name =
"");
282 virtual void setLod(
const bool useLod,
const std::string &cameraName,
const std::string &name);
288 const std::string &name);
303 const bool firstCameraIsReference =
true);
309 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
311 virtual void setReferenceCameraName(
const std::string &referenceCameraName);
315 virtual void setUseKltTracking(
const std::string &name,
const bool &useKltTracking);
350 #endif // VISP_HAVE_OPENCV 351 #endif //__vpMbKltMultiTracker_h__ virtual void setKltOpencv(const vpKltOpencv &t)
void addCircle(const vpPoint &P1, const vpPoint &P2, const vpPoint &P3, const double r, const std::string &name="")
virtual unsigned int getClipping() const
virtual void track(const vpImage< unsigned char > &I)
virtual void setDisplayFeatures(const bool displayF)
virtual void setCovarianceComputation(const bool &flag)
virtual void setOgreShowConfigDialog(const bool showConfigDialog)
void setThresholdAcceptation(const double th)
Implementation of a matrix and operations on matrices.
vpMatrix m_L_kltMulti
Interaction matrix.
virtual void setScanLineVisibilityTest(const bool &v)
friend class vpMbKltMultiTracker
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo_, const bool verbose=false)
void setUseKltTracking(const std::string &name, const bool &useKltTracking)
virtual void setAngleDisappear(const double &a)
std::vector< vpImagePoint > getKltImagePoints() const
Implementation of an homogeneous matrix and operations on such kind of matrices.
int getKltNbPoints() const
virtual std::list< vpMbtDistanceKltPoints * > & getFeaturesKlt()
virtual void setOptimizationMethod(const vpMbtOptimizationMethod &opt)
Class to define colors available for display functionnalities.
bool postTracking(const vpImage< unsigned char > &I, vpColVector &w)
vpKltOpencv getKltOpencv() const
std::vector< cv::Point2f > getKltPoints() const
void setKltMaskBorder(const unsigned int &e)
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
virtual void reinit(const vpImage< unsigned char > &I)
virtual void computeVVSInteractionMatrixAndResidu()
unsigned int getNumberOfCameras() const
Class that defines what is a point.
virtual void loadConfigFile(const std::string &configFile)
std::map< std::string, vpHomogeneousMatrix > m_mapOfCameraTransformationMatrix
virtual vpHomogeneousMatrix getPose() const
virtual void setMinPolygonAreaThresh(const double minPolygonAreaThresh, const std::string &name="")
virtual void setGoodNbRayCastingAttemptsRatio(const double &ratio)
void setKltThresholdAcceptation(const double th)
virtual std::list< vpMbtDistanceCircle * > & getFeaturesCircle()
vpColVector m_weightedError_kltMulti
Weighted error.
Generic class defining intrinsic camera parameters.
virtual void computeVVSWeights(vpRobust &robust, const vpColVector &error, vpColVector &w)
virtual void setAngleAppear(const double &a)
Model based tracker using only KLT.
std::string m_referenceCameraName
Name of the reference camera.
virtual void initClick(const vpImage< unsigned char > &I, const std::string &initFile, const bool displayHelp=false)
virtual void setNbRayCastingAttemptsForVisibility(const unsigned int &attempts)
virtual void setMinLineLengthThresh(const double minLineLengthThresh, const std::string &name="")
vpColVector m_w_kltMulti
Robust weights.
virtual std::list< vpMbtDistanceKltCylinder * > & getFeaturesKltCylinder()
void setMaskBorder(const unsigned int &e)
virtual void loadModel(const char *modelFile, const bool verbose=false)
virtual vpColVector getRobustWeights() const
void setCameraParameters(const vpCameraParameters &cam)
virtual void getCameraParameters(vpCameraParameters &camera) const
void preTracking(const vpImage< unsigned char > &I)
virtual unsigned int getNbPolygon() const
Implementation of column vector and the associated operations.
std::map< std::string, vpMbKltTracker * > m_mapOfKltTrackers
Map of Model-based klt trackers.
virtual void setOgreVisibilityTest(const bool &v)
Implementation of a pose vector and operations on poses.
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
std::map< int, vpImagePoint > getKltImagePointsWithId() const
int getNbKltPoints() const
virtual void computeVVSInit()
virtual void setClipping(const unsigned int &flags)
virtual void init(const vpImage< unsigned char > &I)
vpColVector m_error_kltMulti
(s - s*)
virtual void setFarClippingDistance(const double &dist)
virtual vpColVector getError() const
virtual vpMbHiddenFaces< vpMbtPolygon > & getFaces()
Model based stereo (or more) 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)
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)
virtual void setLod(const bool useLod, const std::string &name="")
virtual void setNearClippingDistance(const double &dist)