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,
unsigned int thickness = 1,
bool displayFullModel =
false);
112 const vpColor &col,
unsigned int thickness = 1,
bool displayFullModel =
false);
117 bool displayFullModel =
false);
121 const vpColor &color,
unsigned int thickness = 1,
bool displayFullModel =
false);
124 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
125 const std::map<std::string, vpCameraParameters> &mapOfCameraParameters,
const vpColor &col,
126 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);
138 std::cerr <<
"Not implemented. Deprecated class." << std::endl;
139 return std::vector<std::vector<double> >();
142 virtual std::vector<std::string> getCameraNames()
const;
147 virtual void getCameraParameters(std::map<std::string, vpCameraParameters> &mapOfCameraParameters)
const;
150 virtual unsigned int getClipping(
const std::string &cameraName)
const;
154 virtual std::map<std::string, vpMbHiddenFaces<vpMbtPolygon> >
getFaces()
const;
157 virtual std::list<vpMbtDistanceCircle *> &
getFeaturesCircle(
const std::string &cameraName);
160 virtual std::list<vpMbtDistanceKltPoints *> &
getFeaturesKlt(
const std::string &cameraName);
165 virtual std::map<std::string, std::vector<vpImagePoint> >
getKltImagePoints()
const;
169 virtual std::map<std::string, vpKltOpencv>
getKltOpencv()
const;
171 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408) 172 virtual std::map<std::string, std::vector<cv::Point2f> >
getKltPoints()
const;
174 virtual std::map<std::string, CvPoint2D32f *>
getKltPoints();
180 virtual std::map<std::string, unsigned int> getMultiNbPolygon()
const;
192 virtual void getPose(std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses)
const;
200 #ifdef VISP_HAVE_MODULE_GUI 203 const std::string &displayFile =
"");
209 const std::string &initFile1,
const std::string &initFile2,
bool displayHelp =
false,
210 bool firstCameraIsReference =
true);
213 const std::string &initFile,
bool displayHelp =
false);
216 const std::map<std::string, std::string> &mapOfInitFiles,
bool displayHelp =
false);
226 bool firstCameraIsReference =
true);
230 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
234 virtual void loadConfigFile(
const std::string &configFile1,
const std::string &configFile2,
235 bool firstCameraIsReference =
true);
237 virtual void loadConfigFile(
const std::map<std::string, std::string> &mapOfConfigFiles);
239 virtual void loadModel(
const std::string &modelFile,
bool verbose =
false,
248 bool firstCameraIsReference =
true);
250 const std::string &cad_name,
251 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses,
252 bool verbose =
false);
262 bool firstCameraIsReference =
true);
266 virtual void setCameraParameters(
const std::map<std::string, vpCameraParameters> &mapOfCameraParameters);
268 virtual void setCameraTransformationMatrix(
const std::string &cameraName,
272 setCameraTransformationMatrix(
const std::map<std::string, vpHomogeneousMatrix> &mapOfTransformationMatrix);
274 virtual void setClipping(
const unsigned int &flags);
275 virtual void setClipping(
const std::string &cameraName,
const unsigned int &flags);
284 #ifdef VISP_HAVE_OGRE 293 virtual void setKltOpencv(
const std::map<std::string, vpKltOpencv> &mapOfOpenCVTrackers);
297 virtual void setLod(
bool useLod,
const std::string &name =
"");
298 virtual void setLod(
bool useLod,
const std::string &cameraName,
const std::string &name);
304 const std::string &name);
321 bool firstCameraIsReference =
true);
327 const std::map<std::string, vpHomogeneousMatrix> &mapOfCameraPoses);
329 virtual void setReferenceCameraName(
const std::string &referenceCameraName);
333 virtual void setUseKltTracking(
const std::string &name,
const bool &useKltTracking);
369 #endif // VISP_HAVE_OPENCV 370 #endif //#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS) 371 #endif //_vpMbKltMultiTracker_h_ virtual void setKltOpencv(const vpKltOpencv &t)
virtual unsigned int getClipping() const
virtual void track(const vpImage< unsigned char > &I)
virtual void setCovarianceComputation(const bool &flag)
Implementation of a matrix and operations on matrices.
vpMatrix m_L_kltMulti
Interaction matrix.
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 setScanLineVisibilityTest(const bool &v)
friend class vpMbKltMultiTracker
void setUseKltTracking(const std::string &name, const bool &useKltTracking)
virtual void loadModel(const std::string &modelFile, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
void setKltThresholdAcceptation(double th)
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
virtual void initClick(const vpImage< unsigned char > &I, const std::string &initFile, bool displayHelp=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
virtual void setOgreShowConfigDialog(bool showConfigDialog)
void setThresholdAcceptation(double th)
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 setLod(bool useLod, const std::string &name="")
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 setGoodNbRayCastingAttemptsRatio(const double &ratio)
virtual std::list< vpMbtDistanceCircle * > & getFeaturesCircle()
vpColVector m_weightedError_kltMulti
Weighted error.
Generic class defining intrinsic camera parameters.
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 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 void setMinPolygonAreaThresh(double minPolygonAreaThresh, const std::string &name="")
vpColVector m_w_kltMulti
Robust weights.
virtual std::list< vpMbtDistanceKltCylinder * > & getFeaturesKltCylinder()
void setMaskBorder(const unsigned int &e)
virtual vpColVector getRobustWeights() const
void setCameraParameters(const vpCameraParameters &cam)
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()
void addCircle(const vpPoint &P1, const vpPoint &P2, const vpPoint &P3, double r, const std::string &name="")
virtual void setClipping(const unsigned int &flags)
virtual void init(const vpImage< unsigned char > &I)
virtual void setMinLineLengthThresh(double minLineLengthThresh, const std::string &name="")
virtual std::vector< std::vector< double > > getModelForDisplay(unsigned int, unsigned int, const vpHomogeneousMatrix &, const vpCameraParameters &, bool=false)
vpColVector m_error_kltMulti
(s - s*)
virtual void setFarClippingDistance(const double &dist)
virtual vpColVector getError() const
virtual vpMbHiddenFaces< vpMbtPolygon > & getFaces()
virtual void setDisplayFeatures(bool displayF)
Model based stereo (or more) tracker using only KLT.
virtual void getCameraParameters(vpCameraParameters &cam) const
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)
virtual void setNearClippingDistance(const double &dist)