44 #ifndef _vpMbKltMultiTracker_h_ 45 #define _vpMbKltMultiTracker_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/vpMbKltTracker.h> 106 const std::string &name =
"");
109 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
112 const vpColor &col,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
117 const bool displayFullModel =
false);
121 const vpColor &color,
const unsigned int thickness = 1,
const bool displayFullModel =
false);
124 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
125 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
const vpColor &col,
126 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);
133 virtual std::vector<std::string> getCameraNames()
const;
138 virtual void getCameraParameters(std::map<std::string, vpCameraParameters> &mapOfCameraParameters)
const;
141 virtual unsigned int getClipping(
const std::string &cameraName)
const;
145 virtual std::map<std::string, vpMbHiddenFaces<vpMbtPolygon> >
getFaces()
const;
148 virtual std::list<vpMbtDistanceCircle *> &
getFeaturesCircle(
const std::string &cameraName);
151 virtual std::list<vpMbtDistanceKltPoints *> &
getFeaturesKlt(
const std::string &cameraName);
156 virtual std::map<std::string, std::vector<vpImagePoint> >
getKltImagePoints()
const;
160 virtual std::map<std::string, vpKltOpencv>
getKltOpencv()
const;
162 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408) 163 virtual std::map<std::string, std::vector<cv::Point2f> >
getKltPoints()
const;
165 virtual std::map<std::string, CvPoint2D32f *>
getKltPoints();
171 virtual std::map<std::string, unsigned int> getMultiNbPolygon()
const;
183 virtual void getPose(std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
const;
191 #ifdef VISP_HAVE_MODULE_GUI 193 const std::string &displayFile =
"");
199 const std::string &initFile1,
const std::string &initFile2,
const bool displayHelp =
false,
200 const bool firstCameraIsReference =
true);
203 const std::string &initFile,
const bool displayHelp =
false);
206 const std::map<std::string, std::string> &mapOfInitFiles,
const bool displayHelp =
false);
215 const bool firstCameraIsReference =
true);
219 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
223 virtual void loadConfigFile(
const std::string &configFile1,
const std::string &configFile2,
224 const bool firstCameraIsReference =
true);
226 virtual void loadConfigFile(
const std::map<std::string, std::string> &mapOfConfigFiles);
228 virtual void loadModel(
const std::string &modelFile,
const bool verbose =
false,
237 const bool firstCameraIsReference =
true);
239 const std::string &cad_name,
240 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
241 const bool verbose =
false);
251 const bool firstCameraIsReference =
true);
255 virtual void setCameraParameters(
const std::map<std::string, vpCameraParameters> &mapOfCameraParameters);
257 virtual void setCameraTransformationMatrix(
const std::string &cameraName,
261 setCameraTransformationMatrix(
const std::map<std::string, vpHomogeneousMatrix> &mapOfTransformationMatrix);
263 virtual void setClipping(
const unsigned int &flags);
264 virtual void setClipping(
const std::string &cameraName,
const unsigned int &flags);
273 #ifdef VISP_HAVE_OGRE 282 virtual void setKltOpencv(
const std::map<std::string, vpKltOpencv> &mapOfOpenCVTrackers);
286 virtual void setLod(
const bool useLod,
const std::string &name =
"");
287 virtual void setLod(
const bool useLod,
const std::string &cameraName,
const std::string &name);
293 const std::string &name);
308 const bool firstCameraIsReference =
true);
314 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
316 virtual void setReferenceCameraName(
const std::string &referenceCameraName);
320 virtual void setUseKltTracking(
const std::string &name,
const bool &useKltTracking);
355 #endif // VISP_HAVE_OPENCV 356 #endif //#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS) 357 #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 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
void setUseKltTracking(const std::string &name, const bool &useKltTracking)
virtual unsigned int getClipping() const
virtual void setAngleDisappear(const double &a)
Implementation of an homogeneous matrix and operations on such kind of matrices.
virtual std::list< vpMbtDistanceKltPoints * > & getFeaturesKlt()
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 setOptimizationMethod(const vpMbtOptimizationMethod &opt)
virtual void loadModel(const std::string &modelFile, const bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
Class to define colors available for display functionnalities.
bool postTracking(const vpImage< unsigned char > &I, vpColVector &w)
virtual vpColVector getRobustWeights() 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()
Class that defines what is a point.
virtual void loadConfigFile(const std::string &configFile)
int getKltNbPoints() const
std::map< std::string, vpHomogeneousMatrix > m_mapOfCameraTransformationMatrix
std::vector< cv::Point2f > getKltPoints() const
std::vector< vpImagePoint > getKltImagePoints() const
virtual void setMinPolygonAreaThresh(const double minPolygonAreaThresh, const std::string &name="")
virtual void setGoodNbRayCastingAttemptsRatio(const double &ratio)
void setKltThresholdAcceptation(const double th)
virtual vpHomogeneousMatrix getPose() const
virtual std::list< vpMbtDistanceCircle * > & getFeaturesCircle()
vpColVector m_weightedError_kltMulti
Weighted error.
virtual void getCameraParameters(vpCameraParameters &camera) const
Generic class defining intrinsic camera parameters.
std::map< int, vpImagePoint > getKltImagePointsWithId() const
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 setNbRayCastingAttemptsForVisibility(const unsigned int &attempts)
virtual vpColVector getError() const
virtual void setMinLineLengthThresh(const double minLineLengthThresh, const std::string &name="")
vpColVector m_w_kltMulti
Robust weights.
int getNbKltPoints() const
vpKltOpencv getKltOpencv() const
virtual std::list< vpMbtDistanceKltCylinder * > & getFeaturesKltCylinder()
void setMaskBorder(const unsigned int &e)
void setCameraParameters(const vpCameraParameters &cam)
void preTracking(const vpImage< unsigned char > &I)
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 ...
virtual unsigned int getNbPolygon() const
virtual void computeVVSInit()
virtual void initClick(const vpImage< unsigned char > &I, const std::string &initFile, const bool displayHelp=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
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 vpMbHiddenFaces< vpMbtPolygon > & getFaces()
Model based stereo (or more) tracker using only KLT.
unsigned int getNumberOfCameras() 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)
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)