40 #include <visp3/core/vpImageConvert.h>
41 #include <visp3/core/vpTrackingException.h>
42 #include <visp3/core/vpVelocityTwistMatrix.h>
43 #include <visp3/mbt/vpMbKltTracker.h>
44 #include <visp3/mbt/vpMbtXmlGenericParser.h>
46 #if defined(VISP_HAVE_MODULE_KLT) && (defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100))
48 #if defined(__APPLE__) && defined(__MACH__)
49 #include <TargetConditionals.h>
82 double h00 = H[0][0], h01 = H[0][1], h02 = H[0][2];
83 double h10 = H[1][0], h11 = H[1][1], h12 = H[1][2];
84 double h20 = H[2][0], h21 = H[2][1], h22 = H[2][2];
86 double A = h00 * px + u0 * h20;
87 double B = h01 * px + u0 * h21;
88 double C = h02 * px + u0 * h22;
89 double D = h10 * py + v0 * h20;
90 double E = h11 * py + v0 * h21;
91 double F = h12 * py + v0 * h22;
93 G[0][0] = A * one_over_px;
94 G[1][0] = D * one_over_px;
95 G[2][0] = h20 * one_over_px;
97 G[0][1] = B * one_over_py;
98 G[1][1] = E * one_over_py;
99 G[2][1] = h21 * one_over_py;
101 double u0_one_over_px = u0 * one_over_px;
102 double v0_one_over_py = v0 * one_over_py;
104 G[0][2] = -A * u0_one_over_px - B * v0_one_over_py + C;
105 G[1][2] = -D * u0_one_over_px - E * v0_one_over_py + F;
106 G[2][2] = -h20 * u0_one_over_px - h21 * v0_one_over_py + h22;
114 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
119 c0Mo(), firstInitialisation(true), maskBorder(5), threshold_outlier(0.5), percentGood(0.6), ctTc0(), tracker(),
120 kltPolygons(), kltCylinders(), circles_disp(), m_nbInfos(0), m_nbFaceUsed(0), m_L_klt(), m_error_klt(), m_w_klt(),
121 m_weightedError_klt(), m_robust_klt(), m_featuresToBeDisplayedKlt()
133 #ifdef VISP_HAVE_OGRE
147 #if (VISP_HAVE_OPENCV_VERSION < 0x020408)
149 cvReleaseImage(&
cur);
155 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
157 if (kltpoly != NULL) {
167 if (kltPolyCylinder != NULL) {
168 delete kltPolyCylinder;
170 kltPolyCylinder = NULL;
192 bool reInitialisation =
false;
196 #ifdef VISP_HAVE_OGRE
231 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
232 cv::Mat mask((
int)I.
getRows(), (
int)I.
getCols(), CV_8UC1, cv::Scalar(0));
234 IplImage *mask = cvCreateImage(cvSize((
int)I.
getWidth(), (
int)I.
getHeight()), IPL_DEPTH_8U, 1);
243 unsigned char val = 255 ;
244 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
257 kltPolyCylinder = *it;
262 if (
faces[indCylBBox]->isVisible() &&
faces[indCylBBox]->getNbPoint() > 2u) {
263 faces[indCylBBox]->computePolygonClipped(
m_cam);
278 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
287 kltPolyCylinder = *it;
293 #if (VISP_HAVE_OPENCV_VERSION < 0x020408)
294 cvReleaseImage(&mask);
306 #if (VISP_HAVE_OPENCV_VERSION < 0x020408)
308 cvReleaseImage(&
cur);
314 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
316 if (kltpoly != NULL) {
326 if (kltPolyCylinder != NULL) {
327 delete kltPolyCylinder;
329 kltPolyCylinder = NULL;
377 #ifdef VISP_HAVE_OGRE
392 std::vector<vpImagePoint> kltPoints;
413 std::map<int, vpImagePoint> kltPoints;
455 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
477 std::cout <<
"WARNING: Cannot set pose when model contains cylinder(s). "
478 "This feature is not implemented yet."
480 std::cout <<
"Tracker will be reinitialized with the given pose." << std::endl;
490 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
491 std::vector<cv::Point2f> init_pts;
492 std::vector<long> init_ids;
493 std::vector<cv::Point2f> guess_pts;
495 unsigned int nbp = 0;
496 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
502 CvPoint2D32f *init_pts = NULL;
505 unsigned int iter_pts = 0;
507 CvPoint2D32f *guess_pts = NULL;
522 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
535 double invDc = 1.0 / plan.
getD();
539 vpGEMM(cdtc, Nc, -invDc, cdRc, 1.0, cdHc, VP_GEMM_B_T);
546 std::map<int, vpImagePoint>::const_iterator iter = kltpoly->
getCurrentPoints().begin();
549 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
551 if (std::find(init_ids.begin(), init_ids.end(), (
long)(kltpoly->
getCurrentPointsInd())[(
int)iter->first]) !=
554 if (std::find(init_ids.begin(), init_ids.end(),
565 cdp[0] = iter->second.get_j();
566 cdp[1] = iter->second.get_i();
569 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
570 cv::Point2f p((
float)cdp[0], (
float)cdp[1]);
571 init_pts.push_back(p);
578 init_pts[iter_pts].x = (float)cdp[0];
579 init_pts[iter_pts].y = (float)cdp[1];
583 double p_mu_t_2 = cdp[0] * cdGc[2][0] + cdp[1] * cdGc[2][1] + cdGc[2][2];
585 if (fabs(p_mu_t_2) < std::numeric_limits<double>::epsilon()) {
591 cdp[0] = (cdp[0] * cdGc[0][0] + cdp[1] * cdGc[0][1] + cdGc[0][2]) / p_mu_t_2;
592 cdp[1] = (cdp[0] * cdGc[1][0] + cdp[1] * cdGc[1][1] + cdGc[1][2]) / p_mu_t_2;
595 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
596 cv::Point2f p_guess((
float)cdp[0], (
float)cdp[1]);
597 guess_pts.push_back(p_guess);
599 guess_pts[iter_pts].x = (float)cdp[0];
600 guess_pts[iter_pts++].y = (float)cdp[1];
612 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
630 bool reInitialisation =
false;
638 #ifdef VISP_HAVE_OGRE
662 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
749 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
783 bool reInitialisation =
false;
785 unsigned int initialNumber = 0;
786 unsigned int currentNumber = 0;
787 unsigned int shift = 0;
789 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
824 double value =
percentGood * (double)initialNumber;
825 if ((
double)currentNumber < value) {
828 reInitialisation =
true;
833 #ifdef VISP_HAVE_OGRE
842 if (reInitialisation)
865 double normRes_1 = -1;
866 unsigned int iter = 0;
874 while (((
int)((normRes - normRes_1) * 1e8) != 0) && (iter <
m_maxIter)) {
877 bool reStartFromLastIncrement =
false;
879 if (reStartFromLastIncrement) {
883 if (!reStartFromLastIncrement) {
888 if (!isoJoIdentity) {
905 for (
unsigned int j = 0; j < 6; j++) {
941 unsigned int shift = 0;
944 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1091 std::cout <<
" *********** Parsing XML for MBT KLT Tracker ************ " << std::endl;
1093 xmlp.
parse(configFile.c_str());
1095 vpERROR_TRACE(
"Can't open XML file \"%s\"\n ", configFile.c_str());
1152 bool displayFullModel)
1154 std::vector<std::vector<double> > models =
1157 for (
size_t i = 0; i < models.size(); i++) {
1164 double n20 = models[i][3];
1165 double n11 = models[i][4];
1166 double n02 = models[i][5];
1179 std::stringstream ss;
1186 #ifdef VISP_HAVE_OGRE
1204 const vpColor &col,
unsigned int thickness,
bool displayFullModel)
1206 std::vector<std::vector<double> > models =
1209 for (
size_t i = 0; i < models.size(); i++) {
1216 double n20 = models[i][3];
1217 double n11 = models[i][4];
1218 double n02 = models[i][5];
1231 std::stringstream ss;
1238 #ifdef VISP_HAVE_OGRE
1246 std::vector<std::vector<double> > features;
1248 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1253 features.insert(features.end(), currentFeatures.begin(), currentFeatures.end());
1263 features.insert(features.end(), currentFeatures.begin(), currentFeatures.end());
1288 bool displayFullModel)
1290 std::vector<std::vector<double> > models;
1312 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1314 std::vector<std::vector<double> > modelLines = kltpoly->
getModelForDisplay(cam, displayFullModel);
1315 models.insert(models.end(), modelLines.begin(), modelLines.end());
1321 std::vector<std::vector<double> > modelLines = kltPolyCylinder->
getModelForDisplay(cMo, cam);
1322 models.insert(models.end(), modelLines.begin(), modelLines.end());
1327 std::vector<double> paramsCircle = displayCircle->
getModelForDisplay(cMo, cam, displayFullModel);
1328 if (!paramsCircle.empty()) {
1329 models.push_back(paramsCircle);
1344 unsigned int nbTotalPoints = 0;
1346 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1361 if (nbTotalPoints < 10) {
1362 std::cerr <<
"test tracking failed (too few points to realize a good tracking)." << std::endl;
1364 "test tracking failed (too few points to realize a good tracking).");
1379 const std::string & )
1409 const std::string &name)
1423 const std::string &name)
1425 bool already_here =
false;
1440 if (!already_here) {
1467 #if (VISP_HAVE_OPENCV_VERSION < 0x020408)
1469 cvReleaseImage(&
cur);
1477 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1479 if (kltpoly != NULL) {
1489 if (kltPolyCylinder != NULL) {
1490 delete kltPolyCylinder;
1492 kltPolyCylinder = NULL;
1520 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1528 #elif !defined(VISP_BUILD_SHARED_LIBS)
1531 void dummy_vpMbKltTracker(){};
void setWindowName(const Ogre::String &n)
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
unsigned int getRows() const
Generic class defining intrinsic camera parameters.
void computeFov(const unsigned int &w, const unsigned int &h)
double get_px_inverse() const
double get_py_inverse() const
Implementation of column vector and the associated operations.
vpColVector & normalize()
void resize(unsigned int i, bool flagNullify=true)
Class to define RGB colors available for display functionnalities.
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1, bool segment=true)
static void displayEllipse(const vpImage< unsigned char > &I, const vpImagePoint ¢er, const double &coef1, const double &coef2, const double &coef3, bool use_normalized_centered_moments, const vpColor &color, unsigned int thickness=1, bool display_center=false, bool display_arc=false)
static void displayCross(const vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
error that can be emited by ViSP classes.
@ divideByZeroError
Division by zero.
static vpHomogeneousMatrix direct(const vpColVector &v)
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpHomogeneousMatrix inverse() const
void extract(vpRotationMatrix &R) const
Implementation of an homography and operations on homographies.
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
unsigned int getWidth() const
unsigned int getCols() const
unsigned int getHeight() const
unsigned int getRows() const
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
double getQuality() const
int getMaxFeatures() const
Get the list of lost feature.
void setBlockSize(int blockSize)
void setQuality(double qualityLevel)
void track(const cv::Mat &I)
void setTrackerId(int tid)
int getWindowSize() const
Get the window size used to refine the corner locations.
int getNbFeatures() const
Get the number of current features.
void setHarrisFreeParameter(double harris_k)
void getFeature(const int &index, long &id, float &x, float &y) const
double getHarrisFreeParameter() const
Get the free parameter of the Harris detector.
void setMaxFeatures(int maxCount)
void setInitialGuess(const std::vector< cv::Point2f > &guess_pts)
void initTracking(const cv::Mat &I, const cv::Mat &mask=cv::Mat())
double getMinDistance() const
void setMinDistance(double minDistance)
int getBlockSize() const
Get the size of the averaging block used to track the features.
int getPyramidLevels() const
Get the list of features id.
void setUseHarris(int useHarrisDetector)
void setWindowSize(int winSize)
void setPyramidLevels(int pyrMaxLevel)
static double rad(double deg)
static bool equal(double x, double y, double threshold=0.001)
static double deg(double rad)
Implementation of a matrix and operations on matrices.
vpAROgre * getOgreContext()
void computeClippedPolygons(const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam)
vpMbScanLine & getMbScanLineRenderer()
unsigned int setVisibleOgre(unsigned int width, unsigned int height, const vpCameraParameters &cam, const vpHomogeneousMatrix &cMo, const double &angleAppears, const double &angleDisappears, bool &changed)
void initOgre(const vpCameraParameters &cam=vpCameraParameters())
unsigned int setVisible(unsigned int width, unsigned int height, const vpCameraParameters &cam, const vpHomogeneousMatrix &cMo, const double &angle, bool &changed)
void setBackgroundSizeOgre(const unsigned int &h, const unsigned int &w)
void computeScanLineRender(const vpCameraParameters &cam, const unsigned int &w, const unsigned int &h)
void displayOgre(const vpHomogeneousMatrix &cMo)
void setOgreShowConfigDialog(bool showConfigDialog)
std::list< vpMbtDistanceKltCylinder * > kltCylinders
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
vpColVector m_error_klt
(s - s*)
vpHomogeneousMatrix c0Mo
Initial pose.
virtual void track(const vpImage< unsigned char > &I)
vpHomogeneousMatrix ctTc0
std::list< vpMbtDistanceKltPoints * > kltPolygons
virtual std::vector< std::vector< double > > getModelForDisplay(unsigned int width, unsigned int height, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, bool displayFullModel=false)
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)
virtual void setKltOpencv(const vpKltOpencv &t)
virtual void initCylinder(const vpPoint &, const vpPoint &, double, int, const std::string &name="")
cv::Mat cur
Temporary OpenCV image for fast conversion.
std::map< int, vpImagePoint > getKltImagePointsWithId() const
virtual void loadConfigFile(const std::string &configFile, bool verbose=true)
std::list< vpMbtDistanceCircle * > circles_disp
Vector of the circles used here only to display the full model.
virtual void testTracking()
vpColVector m_weightedError_klt
Weighted error.
virtual ~vpMbKltTracker()
vpKltOpencv tracker
Points tracker.
virtual std::vector< std::vector< double > > getFeaturesForDisplayKlt()
void preTracking(const vpImage< unsigned char > &I)
void addCircle(const vpPoint &P1, const vpPoint &P2, const vpPoint &P3, double r, const std::string &name="")
virtual void initCircle(const vpPoint &, const vpPoint &, const vpPoint &, double, int, const std::string &name="")
bool postTracking(const vpImage< unsigned char > &I, vpColVector &w)
vpRobust m_robust_klt
Robust.
virtual void computeVVSInteractionMatrixAndResidu()
virtual void reinit(const vpImage< unsigned char > &I)
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, const vpColor &col, unsigned int thickness=1, bool displayFullModel=false)
std::vector< vpImagePoint > getKltImagePoints() const
unsigned int maskBorder
Erosion of the mask.
unsigned int m_nbFaceUsed
virtual void initFaceFromCorners(vpMbtPolygon &polygon)
vpColVector m_w_klt
Robust weights.
void setCameraParameters(const vpCameraParameters &cam)
std::vector< std::vector< double > > m_featuresToBeDisplayedKlt
Display features.
vpMatrix m_L_klt
Interaction matrix.
void setUseKltTracking(const std::string &name, const bool &useKltTracking)
virtual void computeVVSInit()
virtual void initFaceFromLines(vpMbtPolygon &polygon)
virtual void init(const vpImage< unsigned char > &I)
double m_lambda
Gain of the virtual visual servoing stage.
double minLineLengthThresholdGeneral
Minimum line length threshold for LOD mode (general setting)
virtual void computeVVSPoseEstimation(const bool isoJoIdentity, unsigned int iter, vpMatrix &L, vpMatrix <L, vpColVector &R, const vpColVector &error, vpColVector &error_prev, vpColVector <R, double &mu, vpColVector &v, const vpColVector *const w=NULL, vpColVector *const m_w_prev=NULL)
virtual void setMinLineLengthThresh(double minLineLengthThresh, const std::string &name="")
vpImage< unsigned char > m_I
Grayscale image buffer, used when passing color images.
virtual void computeVVSCheckLevenbergMarquardt(unsigned int iter, vpColVector &error, const vpColVector &m_error_prev, const vpHomogeneousMatrix &cMoPrev, double &mu, bool &reStartFromLastIncrement, vpColVector *const w=NULL, const vpColVector *const m_w_prev=NULL)
bool useLodGeneral
True if LOD mode is enabled.
double minPolygonAreaThresholdGeneral
Minimum polygon area threshold for LOD mode (general setting)
bool m_computeInteraction
vpMatrix oJo
The Degrees of Freedom to estimate.
virtual void setMinPolygonAreaThresh(double minPolygonAreaThresh, const std::string &name="")
double m_initialMu
Initial Mu for Levenberg Marquardt optimization loop.
vpHomogeneousMatrix m_cMo
The current pose.
vpCameraParameters m_cam
The camera parameters.
bool useOgre
Use Ogre3d for visibility tests.
virtual void computeVVSWeights(vpRobust &robust, const vpColVector &error, vpColVector &w)
vpMbHiddenFaces< vpMbtPolygon > faces
Set of faces describing the object.
virtual void setLod(bool useLod, const std::string &name="")
virtual void computeCovarianceMatrixVVS(const bool isoJoIdentity, const vpColVector &w_true, const vpHomogeneousMatrix &cMoPrev, const vpMatrix &L_true, const vpMatrix &LVJ_true, const vpColVector &error)
vpMbtOptimizationMethod m_optimizationMethod
Optimization method used.
bool displayFeatures
If true, the features are displayed.
double angleDisappears
Angle used to detect a face disappearance.
virtual unsigned int getNbPolygon() const
virtual void setNearClippingDistance(const double &dist)
bool applyLodSettingInConfig
virtual void setFarClippingDistance(const double &dist)
bool m_isoJoIdentity
Boolean to know if oJo is identity (for fast computation)
bool useScanLine
Use Scanline for visibility tests.
virtual void setClipping(const unsigned int &flags)
double angleAppears
Angle used to detect a face appearance.
const vpImage< bool > * m_mask
Mask used to disable tracking on a part of image.
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
virtual void loadModel(const std::string &modelFile, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
bool computeCovariance
Flag used to specify if the covariance matrix has to be computed or not.
unsigned int m_maxIter
Maximum number of iterations of the virtual visual servoing stage.
bool ogreShowConfigDialog
unsigned int clippingFlag
Flags specifying which clipping to used.
virtual void loadConfigFile(const std::string &configFile, bool verbose=true)
Manage a circle used in the model-based tracker.
void setCameraParameters(const vpCameraParameters &camera)
void buildFrom(const vpPoint &_p1, const vpPoint &_p2, const vpPoint &_p3, double r)
std::vector< double > getModelForDisplay(const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, bool displayFullModel=false)
void setName(const std::string &circle_name)
Implementation of a polygon of the model containing points of interest. It is used by the model-based...
virtual void setCameraParameters(const vpCameraParameters &_cam)
void buildFrom(const vpPoint &p1, const vpPoint &p2, const double &r)
void removeOutliers(const vpColVector &weight, const double &threshold_outlier)
unsigned int computeNbDetectedCurrent(const vpKltOpencv &_tracker)
std::vector< std::vector< double > > getFeaturesForDisplay()
void computeInteractionMatrixAndResidu(const vpHomogeneousMatrix &cMc0, vpColVector &_R, vpMatrix &_J)
bool useScanLine
Use scanline rendering.
void updateMask(cv::Mat &mask, unsigned char _nb=255, unsigned int _shiftBorder=0)
void init(const vpKltOpencv &_tracker, const vpHomogeneousMatrix &cMo)
std::vector< std::vector< double > > getModelForDisplay(const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam)
unsigned int getCurrentNumberPoints() const
std::vector< int > listIndicesCylinderBBox
Pointer to the polygon that define a face.
bool hasEnoughPoints() const
vpMbHiddenFaces< vpMbtPolygon > * hiddenface
Pointer to the list of faces.
unsigned int getInitialNumberPoint() const
Implementation of a polygon of the model containing points of interest. It is used by the model-based...
bool hasEnoughPoints() const
void updateMask(cv::Mat &mask, unsigned char _nb=255, unsigned int _shiftBorder=0)
bool useScanLine
Use scanline rendering.
void computeInteractionMatrixAndResidu(vpColVector &_R, vpMatrix &_J)
std::vector< std::vector< double > > getFeaturesForDisplay()
vpMbHiddenFaces< vpMbtPolygon > * hiddenface
Pointer to the list of faces.
void init(const vpKltOpencv &_tracker, const vpImage< bool > *mask=NULL)
unsigned int computeNbDetectedCurrent(const vpKltOpencv &_tracker, const vpImage< bool > *mask=NULL)
virtual void setCameraParameters(const vpCameraParameters &_cam)
unsigned int getCurrentNumberPoints() const
std::map< int, int > & getCurrentPointsInd()
std::vector< std::vector< double > > getModelForDisplay(const vpCameraParameters &cam, bool displayFullModel=false)
vpMbtPolygon * polygon
Pointer to the polygon that define a face.
std::map< int, vpImagePoint > & getCurrentPoints()
unsigned int getInitialNumberPoint() const
void removeOutliers(const vpColVector &weight, const double &threshold_outlier)
void computeHomography(const vpHomogeneousMatrix &_cTc0, vpHomography &cHc0)
void setTracked(const bool &track)
Implementation of a polygon of the model used by the model-based tracker.
std::string getName() const
virtual bool isVisible(const vpHomogeneousMatrix &cMo, double alpha, const bool &modulo=false, const vpCameraParameters &cam=vpCameraParameters(), unsigned int width=0, unsigned int height=0)
Parse an Xml file to extract configuration parameters of a mbtConfig object.
unsigned int getKltMaxFeatures() const
void setKltMinDistance(const double &mD)
unsigned int getKltBlockSize() const
void getCameraParameters(vpCameraParameters &cam) const
double getAngleAppear() const
void setKltMaskBorder(const unsigned int &mb)
double getLodMinLineLengthThreshold() const
unsigned int getKltMaskBorder() const
void setAngleDisappear(const double &adisappear)
double getKltQuality() const
double getAngleDisappear() const
void setKltPyramidLevels(const unsigned int &pL)
void setKltWindowSize(const unsigned int &w)
double getKltMinDistance() const
void setKltMaxFeatures(const unsigned int &mF)
void setAngleAppear(const double &aappear)
void setKltBlockSize(const unsigned int &bs)
void setKltHarrisParam(const double &hp)
void parse(const std::string &filename)
double getNearClippingDistance() const
void setKltQuality(const double &q)
bool hasNearClippingDistance() const
bool hasFarClippingDistance() const
unsigned int getKltPyramidLevels() const
double getKltHarrisParam() const
unsigned int getKltWindowSize() const
double getFarClippingDistance() const
bool getFovClipping() const
double getLodMinPolygonAreaThreshold() const
void setVerbose(bool verbose)
This class defines the container for a plane geometrical structure.
void changeFrame(const vpHomogeneousMatrix &cMo)
vpColVector getNormal() const
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
void changeFrame(const vpHomogeneousMatrix &cMo)
unsigned int getNbPoint() const
vpPoint * p
corners in the object frame
void computePolygonClipped(const vpCameraParameters &cam=vpCameraParameters())
void setMinMedianAbsoluteDeviation(double mad_min)
Implementation of a rotation matrix and operations on such kind of matrices.
Definition of the vpSubMatrix vpSubMatrix class provides a mask on a vpMatrix all properties of vpMat...
Error that can be emited by the vpTracker class and its derivates.
Class that consider the case of a translation vector.
vpVelocityTwistMatrix buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)