 |
Visual Servoing Platform
version 3.3.0
|
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__) // Apple OSX and iOS (Darwin)
49 #include <TargetConditionals.h>
54 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
59 c0Mo(), firstInitialisation(true), maskBorder(5), threshold_outlier(0.5), percentGood(0.6), ctTc0(), tracker(),
60 kltPolygons(), kltCylinders(), circles_disp(), m_nbInfos(0), m_nbFaceUsed(0), m_L_klt(), m_error_klt(), m_w_klt(),
61 m_weightedError_klt(), m_robust_klt(), m_featuresToBeDisplayedKlt()
87 #if (VISP_HAVE_OPENCV_VERSION < 0x020408)
95 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
97 if (kltpoly != NULL) {
107 if (kltPolyCylinder != NULL) {
108 delete kltPolyCylinder;
110 kltPolyCylinder = NULL;
132 bool reInitialisation =
false;
136 #ifdef VISP_HAVE_OGRE
171 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
172 cv::Mat mask((
int)I.
getRows(), (
int)I.
getCols(), CV_8UC1, cv::Scalar(0));
174 IplImage *mask = cvCreateImage(cvSize((
int)I.
getWidth(), (
int)I.
getHeight()), IPL_DEPTH_8U, 1);
183 unsigned char val = 255 ;
184 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
197 kltPolyCylinder = *it;
202 if (
faces[indCylBBox]->isVisible() &&
faces[indCylBBox]->getNbPoint() > 2u) {
203 faces[indCylBBox]->computePolygonClipped(
m_cam);
218 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
227 kltPolyCylinder = *it;
233 #if (VISP_HAVE_OPENCV_VERSION < 0x020408)
234 cvReleaseImage(&mask);
246 #if (VISP_HAVE_OPENCV_VERSION < 0x020408)
248 cvReleaseImage(&
cur);
254 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
256 if (kltpoly != NULL) {
266 if (kltPolyCylinder != NULL) {
267 delete kltPolyCylinder;
269 kltPolyCylinder = NULL;
317 #ifdef VISP_HAVE_OGRE
332 std::vector<vpImagePoint> kltPoints;
353 std::map<int, vpImagePoint> kltPoints;
395 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
417 std::cout <<
"WARNING: Cannot set pose when model contains cylinder(s). "
418 "This feature is not implemented yet."
420 std::cout <<
"Tracker will be reinitialized with the given pose." << std::endl;
430 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
431 std::vector<cv::Point2f> init_pts;
432 std::vector<long> init_ids;
433 std::vector<cv::Point2f> guess_pts;
435 unsigned int nbp = 0;
436 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
442 CvPoint2D32f *init_pts = NULL;
445 unsigned int iter_pts = 0;
447 CvPoint2D32f *guess_pts = NULL;
462 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
475 double invDc = 1.0 / plan.
getD();
479 vpGEMM(cdtc, Nc, -invDc, cdRc, 1.0, cdHc, VP_GEMM_B_T);
486 std::map<int, vpImagePoint>::const_iterator iter = kltpoly->
getCurrentPoints().begin();
489 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
491 if (std::find(init_ids.begin(), init_ids.end(), (
long)(kltpoly->
getCurrentPointsInd())[(
int)iter->first]) !=
494 if (std::find(init_ids.begin(), init_ids.end(),
505 cdp[0] = iter->second.get_j();
506 cdp[1] = iter->second.get_i();
509 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
510 cv::Point2f p((
float)cdp[0], (
float)cdp[1]);
511 init_pts.push_back(p);
518 init_pts[iter_pts].x = (float)cdp[0];
519 init_pts[iter_pts].y = (float)cdp[1];
523 double p_mu_t_2 = cdp[0] * cdGc[2][0] + cdp[1] * cdGc[2][1] + cdGc[2][2];
525 if (fabs(p_mu_t_2) < std::numeric_limits<double>::epsilon()) {
531 cdp[0] = (cdp[0] * cdGc[0][0] + cdp[1] * cdGc[0][1] + cdGc[0][2]) / p_mu_t_2;
532 cdp[1] = (cdp[0] * cdGc[1][0] + cdp[1] * cdGc[1][1] + cdGc[1][2]) / p_mu_t_2;
535 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
536 cv::Point2f p_guess((
float)cdp[0], (
float)cdp[1]);
537 guess_pts.push_back(p_guess);
539 guess_pts[iter_pts].x = (float)cdp[0];
540 guess_pts[iter_pts++].y = (float)cdp[1];
552 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
570 bool reInitialisation =
false;
578 #ifdef VISP_HAVE_OGRE
600 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
687 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
721 bool reInitialisation =
false;
723 unsigned int initialNumber = 0;
724 unsigned int currentNumber = 0;
725 unsigned int shift = 0;
727 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
762 double value =
percentGood * (double)initialNumber;
763 if ((
double)currentNumber < value) {
766 reInitialisation =
true;
771 #ifdef VISP_HAVE_OGRE
780 if (reInitialisation)
803 double normRes_1 = -1;
804 unsigned int iter = 0;
808 while (((
int)((normRes - normRes_1) * 1e8) != 0) && (iter <
m_maxIter)) {
811 bool reStartFromLastIncrement =
false;
813 if (reStartFromLastIncrement) {
817 if (!reStartFromLastIncrement) {
839 for (
unsigned int j = 0; j < 6; j++) {
877 unsigned int shift = 0;
880 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1011 #ifdef VISP_HAVE_PUGIXML
1026 std::cout <<
" *********** Parsing XML for MBT KLT Tracker ************ " << std::endl;
1027 xmlp.
parse(configFile.c_str());
1029 vpERROR_TRACE(
"Can't open XML file \"%s\"\n ", configFile.c_str());
1073 std::cerr <<
"pugixml third-party is not properly built to read config file: " << configFile << std::endl;
1090 bool displayFullModel)
1094 for (
size_t i = 0; i < models.size(); i++) {
1101 double mu20 = models[i][3];
1102 double mu11 = models[i][4];
1103 double mu02 = models[i][5];
1116 std::stringstream ss;
1123 #ifdef VISP_HAVE_OGRE
1142 bool displayFullModel)
1146 for (
size_t i = 0; i < models.size(); i++) {
1153 double mu20 = models[i][3];
1154 double mu11 = models[i][4];
1155 double mu02 = models[i][5];
1168 std::stringstream ss;
1175 #ifdef VISP_HAVE_OGRE
1183 std::vector<std::vector<double> > features;
1185 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1190 features.insert(features.end(), currentFeatures.begin(), currentFeatures.end());
1200 features.insert(features.end(), currentFeatures.begin(), currentFeatures.end());
1223 bool displayFullModel)
1225 std::vector<std::vector<double> > models;
1247 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1249 std::vector<std::vector<double> > modelLines = kltpoly->
getModelForDisplay(cam, displayFullModel);
1250 models.insert(models.end(), modelLines.begin(), modelLines.end());
1256 std::vector<std::vector<double> > modelLines = kltPolyCylinder->
getModelForDisplay(cMo, cam);
1257 models.insert(models.end(), modelLines.begin(), modelLines.end());
1262 std::vector<double> paramsCircle = displayCircle->
getModelForDisplay(cMo, cam, displayFullModel);
1263 models.push_back(paramsCircle);
1277 unsigned int nbTotalPoints = 0;
1279 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1294 if (nbTotalPoints < 10) {
1295 std::cerr <<
"test tracking failed (too few points to realize a good tracking)." << std::endl;
1297 "test tracking failed (too few points to realize a good tracking).");
1312 const std::string & )
1342 int ,
const std::string &name)
1356 const std::string &name)
1358 bool already_here =
false;
1373 if (!already_here) {
1401 #if (VISP_HAVE_OPENCV_VERSION < 0x020408)
1403 cvReleaseImage(&
cur);
1411 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1413 if (kltpoly != NULL) {
1423 if (kltPolyCylinder != NULL) {
1424 delete kltPolyCylinder;
1426 kltPolyCylinder = NULL;
1454 for (std::list<vpMbtDistanceKltPoints *>::const_iterator it =
kltPolygons.begin(); it !=
kltPolygons.end(); ++it) {
1462 #elif !defined(VISP_BUILD_SHARED_LIBS)
1465 void dummy_vpMbKltTracker(){};
1466 #endif // VISP_HAVE_OPENCV
virtual void setCameraParameters(const vpCameraParameters &_cam)
void preTracking(const vpImage< unsigned char > &I)
int getBlockSize() const
Get the size of the averaging block used to track the features.
Error that can be emited by the vpTracker class and its derivates.
bool hasEnoughPoints() const
void setAngleAppear(const double &aappear)
virtual void loadConfigFile(const std::string &configFile)
@ divideByZeroError
Division by zero.
double getKltMinDistance() const
void setKltMaskBorder(const unsigned int &mb)
std::vector< std::vector< double > > getModelForDisplay(const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam)
std::vector< double > getModelForDisplay(const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, bool displayFullModel=false)
bool m_computeInteraction
void setTracked(const bool &track)
vpColVector m_w_klt
Robust weights.
void setKltHarrisParam(const double &hp)
vpHomogeneousMatrix m_cMo
The current pose.
void setMinDistance(double minDistance)
void setKltWindowSize(const unsigned int &w)
vpColVector m_error_klt
(s - s*)
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1, bool segment=true)
unsigned int computeNbDetectedCurrent(const vpKltOpencv &_tracker)
int getNbFeatures() const
Get the number of current features.
void displayOgre(const vpHomogeneousMatrix &cMo)
vpCameraParameters m_cam
The camera parameters.
void setKltMaxFeatures(const unsigned int &mF)
void track(const cv::Mat &I)
void setAngleDisappear(const double &adisappear)
std::vector< vpImagePoint > getKltImagePoints() const
void computeClippedPolygons(const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam)
bool useOgre
Use Ogre3d for visibility tests.
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)
static void convert(const vpImage< unsigned char > &src, vpImage< vpRGBa > &dest)
static double rad(double deg)
Implementation of a polygon of the model containing points of interest. It is used by the model-based...
Generic class defining intrinsic camera parameters.
vpMbHiddenFaces< vpMbtPolygon > * hiddenface
Pointer to the list of faces.
void init(const vpKltOpencv &_tracker, const vpHomogeneousMatrix &cMo)
double getAngleDisappear() const
void setKltQuality(const double &q)
void removeOutliers(const vpColVector &weight, const double &threshold_outlier)
Implementation of a polygon of the model containing points of interest. It is used by the model-based...
void addCircle(const vpPoint &P1, const vpPoint &P2, const vpPoint &P3, double r, const std::string &name="")
vpMatrix m_L_klt
Interaction matrix.
bool hasEnoughPoints() const
void setKltPyramidLevels(const unsigned int &pL)
unsigned int m_nbFaceUsed
vpColVector getNormal() const
static double deg(double rad)
void setQuality(double qualityLevel)
double getLodMinPolygonAreaThreshold() const
double getLodMinLineLengthThreshold() const
unsigned int getCols() const
virtual void initCylinder(const vpPoint &, const vpPoint &, double, int, const std::string &name="")
int getWindowSize() const
Get the window size used to refine the corner locations.
void setHarrisFreeParameter(double harris_k)
bool computeCovariance
Flag used to specify if the covariance matrix has to be computed or not.
vpMbHiddenFaces< vpMbtPolygon > faces
Set of faces describing the object.
vpColVector & normalize()
vpKltOpencv tracker
Points tracker.
void changeFrame(const vpHomogeneousMatrix &cMo)
int getMaxFeatures() const
Get the list of lost feature.
void computeInteractionMatrixAndResidu(vpColVector &_R, vpMatrix &_J)
virtual void computeVVSInit()
vpMbScanLine & getMbScanLineRenderer()
Manage a circle used in the model-based tracker.
virtual void initFaceFromCorners(vpMbtPolygon &polygon)
void setUseKltTracking(const std::string &name, const bool &useKltTracking)
std::vector< std::vector< double > > getFeaturesForDisplay()
unsigned int getCurrentNumberPoints() const
double getKltHarrisParam() const
Class that consider the case of a translation vector.
void setCameraParameters(const vpCameraParameters &cam)
std::string getName() const
bool getFovClipping() const
virtual void computeVVSInteractionMatrixAndResidu()
virtual void setLod(bool useLod, const std::string &name="")
virtual void initFaceFromLines(vpMbtPolygon &polygon)
vpPoint * p
corners in the object frame
virtual void setCameraParameters(const vpCameraParameters &_cam)
vpMbHiddenFaces< vpMbtPolygon > * hiddenface
Pointer to the list of faces.
virtual void track(const vpImage< unsigned char > &I)
virtual std::vector< std::vector< double > > getFeaturesForDisplayKlt()
double m_lambda
Gain of the virtual visual servoing stage.
virtual void initCircle(const vpPoint &, const vpPoint &, const vpPoint &, double, int, const std::string &name="")
Implementation of column vector and the associated operations.
virtual void init(const vpImage< unsigned char > &I)
bool useScanLine
Use Scanline for visibility tests.
Parse an Xml file to extract configuration parameters of a mbtConfig object.
virtual void reinit(const vpImage< unsigned char > &I)
void setWindowName(const Ogre::String &n)
void extract(vpRotationMatrix &R) const
void initTracking(const cv::Mat &I, const cv::Mat &mask=cv::Mat())
virtual void initFromPose(const vpImage< unsigned char > &I, const std::string &initFile)
unsigned int getRows() const
double getNearClippingDistance() const
unsigned int getKltMaskBorder() const
void buildFrom(const vpPoint &p1, const vpPoint &p2, const double &r)
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
Implementation of a matrix and operations on matrices.
void setThreshold(double noise_threshold)
unsigned int getKltWindowSize() const
void setKltMinDistance(const double &mD)
virtual void testTracking()
vpMatrix get_K_inverse() const
Implementation of a polygon of the model used by the model-based tracker.
void init(const vpKltOpencv &_tracker, const vpImage< bool > *mask=NULL)
std::map< int, int > & getCurrentPointsInd()
unsigned int setVisible(unsigned int width, unsigned int height, const vpCameraParameters &cam, const vpHomogeneousMatrix &cMo, const double &angle, bool &changed)
unsigned int getCurrentNumberPoints() const
double m_initialMu
Initial Mu for Levenberg Marquardt optimization loop.
vpColVector m_weightedError_klt
Weighted error.
unsigned int maskBorder
Erosion of the mask.
virtual void loadConfigFile(const std::string &configFile)
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
void resize(unsigned int nrows, unsigned int ncols, bool flagNullify=true, bool recopy_=true)
vpMbtOptimizationMethod m_optimizationMethod
Optimization method used.
virtual void setKltOpencv(const vpKltOpencv &t)
void parse(const std::string &filename)
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)
std::vector< std::vector< double > > getModelForDisplay(const vpCameraParameters &cam, bool displayFullModel=false)
virtual void setPose(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cdMo)
bool postTracking(const vpImage< unsigned char > &I, vpColVector &w)
vpMbtPolygon * polygon
Pointer to the polygon that define a face.
virtual void reInitModel(const vpImage< unsigned char > &I, const std::string &cad_name, const vpHomogeneousMatrix &cMo, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
void setTrackerId(int tid)
unsigned int getInitialNumberPoint() const
bool displayFeatures
If true, the features are displayed.
vpHomogeneousMatrix ctTc0
void setBackgroundSizeOgre(const unsigned int &h, const unsigned int &w)
Implementation of a rotation matrix and operations on such kind of matrices.
virtual unsigned int getNbPolygon() const
vpMatrix oJo
The Degrees of Freedom to estimate.
bool applyLodSettingInConfig
int getPyramidLevels() const
Get the list of features id.
unsigned int getHeight() const
double getAngleAppear() const
std::map< int, vpImagePoint > & getCurrentPoints()
Definition of the vpSubMatrix vpSubMatrix class provides a mask on a vpMatrix all properties of vpMat...
unsigned int getKltMaxFeatures() const
void computePolygonClipped(const vpCameraParameters &cam=vpCameraParameters())
std::list< vpMbtDistanceKltCylinder * > kltCylinders
virtual bool isVisible(const vpHomogeneousMatrix &cMo, double alpha, const bool &modulo=false, const vpCameraParameters &cam=vpCameraParameters(), unsigned int width=0, unsigned int height=0)
virtual void computeVVSWeights(vpRobust &robust, const vpColVector &error, vpColVector &w)
unsigned int getInitialNumberPoint() const
void setWindowSize(int winSize)
double getKltQuality() const
double minLineLengthThresholdGeneral
Minimum line length threshold for LOD mode (general setting)
static bool equal(double x, double y, double s=0.001)
Implementation of an homography and operations on homographies.
void setPyramidLevels(int pyrMaxLevel)
void setUseHarris(int useHarrisDetector)
double angleAppears
Angle used to detect a face appearance.
void getCameraParameters(vpCameraParameters &cam) const
void setInitialGuess(const std::vector< cv::Point2f > &guess_pts)
double minPolygonAreaThresholdGeneral
Minimum polygon area threshold for LOD mode (general setting)
virtual void setMinPolygonAreaThresh(double minPolygonAreaThresh, const std::string &name="")
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
std::map< int, vpImagePoint > getKltImagePointsWithId() const
unsigned int getKltPyramidLevels() const
static vpHomogeneousMatrix direct(const vpColVector &v)
double getMinDistance() const
vpVelocityTwistMatrix buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
std::list< vpMbtDistanceCircle * > circles_disp
Vector of the circles used here only to display the full model.
double getHarrisFreeParameter() const
Get the free parameter of the Harris detector.
unsigned int getNbPoint() const
double getFarClippingDistance() const
bool hasFarClippingDistance() const
void setOgreShowConfigDialog(bool showConfigDialog)
std::vector< std::vector< double > > m_featuresToBeDisplayedKlt
Display features.
const vpImage< bool > * m_mask
Mask used to disable tracking on a part of image.
void initOgre(const vpCameraParameters &cam=vpCameraParameters())
void getFeature(const int &index, long &id, float &x, float &y) const
void resize(unsigned int i, bool flagNullify=true)
bool hasNearClippingDistance() const
virtual ~vpMbKltTracker()
void removeOutliers(const vpColVector &weight, const double &threshold_outlier)
void resize(unsigned int n_data)
Resize containers for sort methods.
bool isoJoIdentity
Boolean to know if oJo is identity (for fast computation)
unsigned int computeNbDetectedCurrent(const vpKltOpencv &_tracker, const vpImage< bool > *mask=NULL)
void setName(const std::string &circle_name)
This class defines the container for a plane geometrical structure.
virtual void setClipping(const unsigned int &flags)
unsigned int m_maxIter
Maximum number of iterations of the virtual visual servoing stage.
bool ogreShowConfigDialog
void changeFrame(const vpHomogeneousMatrix &cMo)
double getQuality() const
virtual std::vector< std::vector< double > > getModelForDisplay(unsigned int width, unsigned int height, const vpHomogeneousMatrix &cMo, const vpCameraParameters &cam, bool displayFullModel=false)
vpRobust m_robust_klt
Robust.
vpHomogeneousMatrix c0Mo
Initial pose.
virtual void setMinLineLengthThresh(double minLineLengthThresh, const std::string &name="")
void buildFrom(const vpPoint &_p1, const vpPoint &_p2, const vpPoint &_p3, double r)
unsigned int clippingFlag
Flags specifying which clipping to used.
void updateMask(cv::Mat &mask, unsigned char _nb=255, unsigned int _shiftBorder=0)
vpAROgre * getOgreContext()
virtual void setNearClippingDistance(const double &dist)
std::list< vpMbtDistanceKltPoints * > kltPolygons
virtual void setFarClippingDistance(const double &dist)
static void displayCross(const vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
virtual void computeCovarianceMatrixVVS(const bool isoJoIdentity_, const vpColVector &w_true, const vpHomogeneousMatrix &cMoPrev, const vpMatrix &L_true, const vpMatrix &LVJ_true, const vpColVector &error)
vpHomogeneousMatrix inverse() const
void computeInteractionMatrixAndResidu(const vpHomogeneousMatrix &cMc0, vpColVector &_R, vpMatrix &_J)
void computeHomography(const vpHomogeneousMatrix &_cTc0, vpHomography &cHc0)
Class that defines what is a point.
static void displayEllipse(const vpImage< unsigned char > &I, const vpImagePoint ¢er, const double &coef1, const double &coef2, const double &coef3, bool use_centered_moments, const vpColor &color, unsigned int thickness=1)
Class to define colors available for display functionnalities.
bool useScanLine
Use scanline rendering.
Implementation of an homogeneous matrix and operations on such kind of matrices.
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< std::vector< double > > getFeaturesForDisplay()
void computeScanLineRender(const vpCameraParameters &cam, const unsigned int &w, const unsigned int &h)
std::vector< int > listIndicesCylinderBBox
Pointer to the polygon that define a face.
void setKltBlockSize(const unsigned int &bs)
error that can be emited by ViSP classes.
void computeFov(const unsigned int &w, const unsigned int &h)
unsigned int getKltBlockSize() const
bool useScanLine
Use scanline rendering.
unsigned int setVisibleOgre(unsigned int width, unsigned int height, const vpCameraParameters &cam, const vpHomogeneousMatrix &cMo, const double &angleAppears, const double &angleDisappears, bool &changed)
virtual void loadModel(const std::string &modelFile, bool verbose=false, const vpHomogeneousMatrix &T=vpHomogeneousMatrix())
void setCameraParameters(const vpCameraParameters &camera)
cv::Mat cur
Temporary OpenCV image for fast conversion.
double angleDisappears
Angle used to detect a face disappearance.
vpImage< unsigned char > m_I
Grayscale image buffer, used when passing color images.
void updateMask(cv::Mat &mask, unsigned char _nb=255, unsigned int _shiftBorder=0)
bool useLodGeneral
True if LOD mode is enabled.
void setBlockSize(int blockSize)
unsigned int getWidth() const
void setMaxFeatures(int maxCount)
unsigned int getRows() const