Visual Servoing Platform  version 3.0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
vpMbtDistanceKltPoints.cpp
1 /****************************************************************************
2  *
3  * This file is part of the ViSP software.
4  * Copyright (C) 2005 - 2017 by Inria. All rights reserved.
5  *
6  * This software is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * ("GPL") version 2 as published by the Free Software Foundation.
9  * See the file LICENSE.txt at the root directory of this source
10  * distribution for additional information about the GNU GPL.
11  *
12  * For using ViSP with software that can not be combined with the GNU
13  * GPL, please contact Inria about acquiring a ViSP Professional
14  * Edition License.
15  *
16  * See http://visp.inria.fr for more information.
17  *
18  * This software was developed at:
19  * Inria Rennes - Bretagne Atlantique
20  * Campus Universitaire de Beaulieu
21  * 35042 Rennes Cedex
22  * France
23  *
24  * If you have questions regarding the use of this file, please contact
25  * Inria at visp@inria.fr
26  *
27  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
28  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
29  *
30  * Description:
31  * Klt polygon, containing points of interest.
32  *
33  * Authors:
34  * Romain Tallonneau
35  * Aurelien Yol
36  *
37  *****************************************************************************/
38 
39 #include <visp3/mbt/vpMbtDistanceKltPoints.h>
40 #include <visp3/core/vpPolygon.h>
41 
42 #if defined(VISP_HAVE_MODULE_KLT) && (defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100))
43 
44 #if defined(__APPLE__) && defined(__MACH__) // Apple OSX and iOS (Darwin)
45 # include <TargetConditionals.h> // To detect OSX or IOS using TARGET_OS_IPHONE or TARGET_OS_IOS macro
46 #endif
47 
53  : H(), N(), N_cur(), invd0(1.), cRc0_0n(), initPoints(), curPoints(), curPointsInd(),
54  nbPointsCur(0), nbPointsInit(0), minNbPoint(4), enoughPoints(false), dt(1.), d0(1.),
55  cam(), isTrackedKltPoints(true), polygon(NULL), hiddenface(NULL), useScanLine(false)
56 {
57  initPoints = std::map<int, vpImagePoint>();
58  curPoints = std::map<int, vpImagePoint>();
59  curPointsInd = std::map<int, int>();
60 }
61 
67 {}
68 
76 void
78 {
79  // extract ids of the points in the face
80  nbPointsInit = 0;
81  nbPointsCur = 0;
82  initPoints = std::map<int, vpImagePoint>();
83  curPoints = std::map<int, vpImagePoint>();
84  curPointsInd = std::map<int, int>();
85  std::vector<vpImagePoint> roi;
86  polygon->getRoiClipped(cam, roi);
87 
88  for (unsigned int i = 0; i < static_cast<unsigned int>(_tracker.getNbFeatures()); i ++){
89  long id;
90  float x_tmp, y_tmp;
91  _tracker.getFeature((int)i, id, x_tmp, y_tmp);
92 
93  bool add = false;
94 
95  if(useScanLine)
96  {
97  if((unsigned int)y_tmp < hiddenface->getMbScanLineRenderer().getPrimitiveIDs().getHeight() &&
98  (unsigned int)x_tmp < hiddenface->getMbScanLineRenderer().getPrimitiveIDs().getWidth() &&
99  hiddenface->getMbScanLineRenderer().getPrimitiveIDs()[(unsigned int)y_tmp][(unsigned int)x_tmp] == polygon->getIndex())
100  add = true;
101  }
102  else if(vpPolygon::isInside(roi, y_tmp, x_tmp))
103  {
104  add = true;
105  }
106 
107  if(add){
108 #if TARGET_OS_IPHONE
109  initPoints[(int)id] = vpImagePoint(y_tmp, x_tmp);
110  curPoints[(int)id] = vpImagePoint(y_tmp, x_tmp);
111  curPointsInd[(int)id] = (int)i;
112 #else
113  initPoints[id] = vpImagePoint(y_tmp, x_tmp);
114  curPoints[id] = vpImagePoint(y_tmp, x_tmp);
115  curPointsInd[id] = (int)i;
116 #endif
117  nbPointsInit++;
118  nbPointsCur++;
119  }
120  }
121 
122  if(nbPointsCur >= minNbPoint) enoughPoints = true;
123  else enoughPoints = false;
124 
125  // initialisation of the value for the computation in SE3
127 
128  d0 = plan.getD();
129  N = plan.getNormal();
130 
131  N.normalize();
132  N_cur = N;
133  invd0 = 1.0 / d0;
134 }
135 
143 unsigned int
145 {
146  long id;
147  float x, y;
148  nbPointsCur = 0;
149  curPoints = std::map<int, vpImagePoint>();
150  curPointsInd = std::map<int, int>();
151 
152  for (unsigned int i = 0; i < static_cast<unsigned int>(_tracker.getNbFeatures()); i++){
153  _tracker.getFeature((int)i, id, x, y);
154  if(isTrackedFeature((int)id)){
155 #if TARGET_OS_IPHONE
156  curPoints[(int)id] = vpImagePoint(static_cast<double>(y),static_cast<double>(x));
157  curPointsInd[(int)id] = (int)i;
158 #else
159  curPoints[id] = vpImagePoint(static_cast<double>(y),static_cast<double>(x));
160  curPointsInd[id] = (int)i;
161 #endif
162  nbPointsCur++;
163  }
164  }
165 
166  if(nbPointsCur >= minNbPoint) enoughPoints = true;
167  else enoughPoints = false;
168 
169  return nbPointsCur;
170 }
171 
182 void
184 {
185  unsigned int index_ = 0;
186 
187  std::map<int, vpImagePoint>::const_iterator iter = curPoints.begin();
188  for( ; iter != curPoints.end(); iter++){
189  int id(iter->first);
190  double i_cur(iter->second.get_i()), j_cur(iter->second.get_j());
191 
192  double x_cur(0), y_cur(0);
193  vpPixelMeterConversion::convertPoint(cam, j_cur, i_cur, x_cur, y_cur);
194 
195  vpImagePoint iP0 = initPoints[id];
196  double x0(0), y0(0);
197  vpPixelMeterConversion::convertPoint(cam, iP0, x0, y0);
198 
199  double x0_transform, y0_transform ;// equivalent x and y in the first image (reference)
200  computeP_mu_t(x0, y0, x0_transform, y0_transform, H );
201 
202  double invZ = compute_1_over_Z(x_cur, y_cur);
203 
204  _J[2*index_][0] = - invZ;
205  _J[2*index_][1] = 0;
206  _J[2*index_][2] = x_cur * invZ;
207  _J[2*index_][3] = x_cur * y_cur;
208  _J[2*index_][4] = -(1+x_cur*x_cur);
209  _J[2*index_][5] = y_cur;
210 
211  _J[2*index_+1][0] = 0;
212  _J[2*index_+1][1] = - invZ;
213  _J[2*index_+1][2] = y_cur * invZ;
214  _J[2*index_+1][3] = (1+y_cur*y_cur);
215  _J[2*index_+1][4] = - y_cur * x_cur;
216  _J[2*index_+1][5] = - x_cur;
217 
218  _R[2*index_] = (x0_transform - x_cur);
219  _R[2*index_+1] = (y0_transform - y_cur);
220  index_++;
221  }
222 }
223 
224 double
225 vpMbtDistanceKltPoints::compute_1_over_Z(const double x, const double y)
226 {
227  double num = cRc0_0n[0] * x + cRc0_0n[1] * y + cRc0_0n[2];
228  double den = -(d0 - dt);
229  return num/den;
230 }
231 
244 inline void
245 vpMbtDistanceKltPoints::computeP_mu_t(const double x_in, const double y_in, double& x_out, double& y_out, const vpMatrix& _cHc0)
246 {
247  double p_mu_t_2 = x_in * _cHc0[2][0] + y_in * _cHc0[2][1] + _cHc0[2][2];
248 
249  if( fabs(p_mu_t_2) < std::numeric_limits<double>::epsilon()){
250  x_out = 0.0;
251  y_out = 0.0;
252  throw vpException(vpException::divideByZeroError, "the depth of the point is calculated to zero");
253  }
254 
255  x_out = (x_in * _cHc0[0][0] + y_in * _cHc0[0][1] + _cHc0[0][2]) / p_mu_t_2;
256  y_out = (x_in * _cHc0[1][0] + y_in * _cHc0[1][1] + _cHc0[1][2]) / p_mu_t_2;
257 }
258 
271 void
273 {
274  vpRotationMatrix cRc0;
275  vpTranslationVector ctransc0;
276 
277  _cTc0.extract(cRc0);
278  _cTc0.extract(ctransc0);
279  vpMatrix cHc0 = _cHc0.convert();
280 
281 // vpGEMM(cRc0, 1.0, invd0, cRc0, -1.0, _cHc0, VP_GEMM_A_T);
282  vpGEMM(ctransc0, N, -invd0, cRc0, 1.0, cHc0, VP_GEMM_B_T);
283  cHc0 /= cHc0[2][2];
284 
285  H = cHc0;
286 
287 // vpQuaternionVector NQuat(N[0], N[1], N[2], 0.0);
288 // vpQuaternionVector RotQuat(cRc0);
289 // vpQuaternionVector RotQuatConj(-RotQuat.x(), -RotQuat.y(), -RotQuat.z(), RotQuat.w());
290 // vpQuaternionVector partial = RotQuat * NQuat;
291 // vpQuaternionVector resQuat = (partial * RotQuatConj);
292 //
293 // cRc0_0n = vpColVector(3);
294 // cRc0_0n[0] = resQuat.x();
295 // cRc0_0n[1] = resQuat.y();
296 // cRc0_0n[2] = resQuat.z();
297 
298  cRc0_0n = cRc0*N;
299 
300 // vpPlane p(corners[0], corners[1], corners[2]);
301 // vpColVector Ncur = p.getNormal();
302 // Ncur.normalize();
303  N_cur = cRc0_0n;
304  dt = 0.0;
305  for (unsigned int i = 0; i < 3; i += 1){
306  dt += ctransc0[i] * (N_cur[i]);
307  }
308 }
309 
317 bool
318 vpMbtDistanceKltPoints::isTrackedFeature(const int _id)
319 {
320 // std::map<int, vpImagePoint>::const_iterator iter = initPoints.begin();
321 // while(iter != initPoints.end()){
322 // if(iter->first == _id){
323 // return true;
324 // }
325 // iter++;
326 // }
327 
328  std::map<int, vpImagePoint>::iterator iter = initPoints.find(_id);
329  if(iter != initPoints.end())
330  return true;
331 
332  return false;
333 }
334 
343 void
345 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
346  cv::Mat &mask,
347 #else
348  IplImage* mask,
349 #endif
350  unsigned char nb, unsigned int shiftBorder)
351 {
352 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
353  int width = mask.cols;
354  int height = mask.rows;
355 #else
356  int width = mask->width;
357  int height = mask->height;
358 #endif
359 
360  int i_min, i_max, j_min, j_max;
361  std::vector<vpImagePoint> roi;
362  polygon->getRoiClipped(cam, roi);
363  vpPolygon3D::getMinMaxRoi(roi, i_min, i_max, j_min,j_max);
364 
365  /* check image boundaries */
366  if(i_min > height){ //underflow
367  i_min = 0;
368  }
369  if(i_max > height){
370  i_max = height;
371  }
372  if(j_min > width){ //underflow
373  j_min = 0;
374  }
375  if(j_max > width){
376  j_max = width;
377  }
378 
379  double shiftBorder_d = (double) shiftBorder;
380 #if (VISP_HAVE_OPENCV_VERSION >= 0x020408)
381  for(int i=i_min; i< i_max; i++){
382  double i_d = (double) i;
383  for(int j=j_min; j< j_max; j++){
384  double j_d = (double) j;
385  if(shiftBorder != 0){
386  if( vpPolygon::isInside(roi, i_d, j_d)
387  && vpPolygon::isInside(roi, i_d+shiftBorder_d, j_d+shiftBorder_d)
388  && vpPolygon::isInside(roi, i_d-shiftBorder_d, j_d+shiftBorder_d)
389  && vpPolygon::isInside(roi, i_d+shiftBorder_d, j_d-shiftBorder_d)
390  && vpPolygon::isInside(roi, i_d-shiftBorder_d, j_d-shiftBorder_d) ){
391  mask.at<unsigned char>(i,j) = nb;
392  }
393  }
394  else{
395  if(vpPolygon::isInside(roi, i, j)){
396  mask.at<unsigned char>(i,j) = nb;
397  }
398  }
399  }
400  }
401 #else
402  unsigned char* ptrData = (unsigned char*)mask->imageData + i_min*mask->widthStep+j_min;
403  for(int i=i_min; i< i_max; i++){
404  double i_d = (double) i;
405  for(int j=j_min; j< j_max; j++){
406  double j_d = (double) j;
407  if(shiftBorder != 0){
408  if( vpPolygon::isInside(roi, i_d, j_d)
409  && vpPolygon::isInside(roi, i_d+shiftBorder_d, j_d+shiftBorder_d)
410  && vpPolygon::isInside(roi, i_d-shiftBorder_d, j_d+shiftBorder_d)
411  && vpPolygon::isInside(roi, i_d+shiftBorder_d, j_d-shiftBorder_d)
412  && vpPolygon::isInside(roi, i_d-shiftBorder_d, j_d-shiftBorder_d) ){
413  *(ptrData++) = nb;
414  }
415  else{
416  ptrData++;
417  }
418  }
419  else{
420  if(vpPolygon::isInside(roi, i, j)){
421  *(ptrData++) = nb;
422  }
423  else{
424  ptrData++;
425  }
426  }
427  }
428  ptrData += mask->widthStep - j_max + j_min;
429  }
430 #endif
431 }
432 
440 void
441 vpMbtDistanceKltPoints::removeOutliers(const vpColVector& _w, const double &threshold_outlier)
442 {
443  std::map<int, vpImagePoint> tmp;
444  std::map<int, int> tmp2;
445  unsigned int nbSupp = 0;
446  unsigned int k = 0;
447 
448  nbPointsCur = 0;
449  std::map<int, vpImagePoint>::const_iterator iter = curPoints.begin();
450  for( ; iter != curPoints.end(); iter++){
451  if(_w[k] > threshold_outlier && _w[k+1] > threshold_outlier){
452 // if(_w[k] > threshold_outlier || _w[k+1] > threshold_outlier){
453  tmp[iter->first] = vpImagePoint(iter->second.get_i(), iter->second.get_j());
454  tmp2[iter->first] = curPointsInd[iter->first];
455  nbPointsCur++;
456  }
457  else{
458  nbSupp++;
459  initPoints.erase(iter->first);
460  }
461 
462  k+=2;
463  }
464 
465  if(nbSupp != 0){
466  curPoints = tmp;
467  curPointsInd = tmp2;
468  if(nbPointsCur >= minNbPoint) enoughPoints = true;
469  else enoughPoints = false;
470  }
471 }
472 
478 void
480 {
481  std::map<int, vpImagePoint>::const_iterator iter = curPoints.begin();
482  for( ; iter != curPoints.end(); iter++){
483  int id(iter->first);
484  vpImagePoint iP;
485  iP.set_i(static_cast<double>(iter->second.get_i()));
486  iP.set_j(static_cast<double>(iter->second.get_j()));
487 
489 
490  iP.set_i( vpMath::round( iP.get_i() + 7 ) );
491  iP.set_j( vpMath::round( iP.get_j() + 7 ) );
492  char ide[10];
493  sprintf(ide, "%ld", static_cast<long int>(id));
494  vpDisplay::displayText(_I, iP, ide, vpColor::red);
495  }
496 }
497 
503 void
505 {
506  std::map<int, vpImagePoint>::const_iterator iter = curPoints.begin();
507  for( ; iter != curPoints.end(); iter++){
508  int id(iter->first);
509  vpImagePoint iP;
510  iP.set_i(static_cast<double>(iter->second.get_i()));
511  iP.set_j(static_cast<double>(iter->second.get_j()));
512 
514 
515  iP.set_i( vpMath::round( iP.get_i() + 7 ) );
516  iP.set_j( vpMath::round( iP.get_j() + 7 ) );
517  char ide[10];
518  sprintf(ide, "%ld", static_cast<long int>(id));
519  vpDisplay::displayText(_I, iP, ide, vpColor::red);
520  }
521 }
522 
523 void
525  const vpColor col, const unsigned int thickness, const bool displayFullModel)
526 {
527  if( (polygon->isVisible() && isTrackedKltPoints) || displayFullModel)
528  {
529  std::vector<std::pair<vpPoint,unsigned int> > roi;
531 
532  for (unsigned int j = 0; j < roi.size(); j += 1){
533  if(((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::NEAR_CLIPPING) == 0) &&
534  ((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::FAR_CLIPPING) == 0) &&
535  ((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::DOWN_CLIPPING) == 0) &&
536  ((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::UP_CLIPPING) == 0) &&
537  ((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::LEFT_CLIPPING) == 0) &&
538  ((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::RIGHT_CLIPPING) == 0)){
539 
540  vpImagePoint ip1, ip2;
541  std::vector<std::pair<vpPoint, vpPoint> > linesLst;
542 
543  if(useScanLine && !displayFullModel)
544  hiddenface->computeScanLineQuery(roi[j].first,roi[(j+1)%roi.size()].first,linesLst, true);
545  else
546  linesLst.push_back(std::make_pair(roi[j].first,roi[(j+1)%roi.size()].first));
547 
548  for(unsigned int i = 0 ; i < linesLst.size() ; i++){
549  linesLst[i].first.project();
550  linesLst[i].second.project();
551  vpMeterPixelConversion::convertPoint(camera,linesLst[i].first.get_x(),linesLst[i].first.get_y(),ip1);
552  vpMeterPixelConversion::convertPoint(camera,linesLst[i].second.get_x(),linesLst[i].second.get_y(),ip2);
553 
554  vpDisplay::displayLine(I,ip1,ip2,col, thickness);
555  }
556  }
557  }
558  }
559 }
560 
561 
562 void
564  const vpColor col, const unsigned int thickness, const bool displayFullModel)
565 {
566  if( (polygon->isVisible() && isTrackedKltPoints) || displayFullModel)
567  {
568  std::vector<std::pair<vpPoint,unsigned int> > roi;
570 
571  for (unsigned int j = 0; j < roi.size(); j += 1){
572  if(((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::NEAR_CLIPPING) == 0) &&
573  ((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::FAR_CLIPPING) == 0) &&
574  ((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::DOWN_CLIPPING) == 0) &&
575  ((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::UP_CLIPPING) == 0) &&
576  ((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::LEFT_CLIPPING) == 0) &&
577  ((roi[(j+1)%roi.size()].second & roi[j].second & vpPolygon3D::RIGHT_CLIPPING) == 0)){
578 
579  vpImagePoint ip1, ip2;
580  std::vector<std::pair<vpPoint, vpPoint> > linesLst;
581 
582  if(useScanLine && !displayFullModel)
583  hiddenface->computeScanLineQuery(roi[j].first,roi[(j+1)%roi.size()].first,linesLst, true);
584  else
585  linesLst.push_back(std::make_pair(roi[j].first,roi[(j+1)%roi.size()].first));
586 
587  for(unsigned int i = 0 ; i < linesLst.size() ; i++){
588  linesLst[i].first.project();
589  linesLst[i].second.project();
590  vpMeterPixelConversion::convertPoint(camera,linesLst[i].first.get_x(),linesLst[i].first.get_y(),ip1);
591  vpMeterPixelConversion::convertPoint(camera,linesLst[i].second.get_x(),linesLst[i].second.get_y(),ip2);
592 
593  vpDisplay::displayLine(I,ip1,ip2,col, thickness);
594  }
595  }
596  }
597  }
598 }
599 
600 #elif !defined(VISP_BUILD_SHARED_LIBS)
601 // Work arround to avoid warning: libvisp_mbt.a(vpMbtDistanceKltPoints.cpp.o) has no symbols
602 void dummy_vpMbtDistanceKltPoints() {};
603 #endif
Implementation of a matrix and operations on matrices.
Definition: vpMatrix.h:97
void getRoiClipped(const vpCameraParameters &cam, std::vector< vpImagePoint > &roi)
void init(const vpKltOpencv &_tracker)
double get_i() const
Definition: vpImagePoint.h:199
void removeOutliers(const vpColVector &weight, const double &threshold_outlier)
Implementation of an homogeneous matrix and operations on such kind of matrices.
static void convertPoint(const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v)
Point coordinates conversion from normalized coordinates in meter to pixel coordinates ...
Class to define colors available for display functionnalities.
Definition: vpColor.h:121
vpMbHiddenFaces< vpMbtPolygon > * hiddenface
Pointer to the list of faces.
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.
Definition: vpException.h:73
vpMbScanLine & getMbScanLineRenderer()
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
Point coordinates conversion from pixel coordinates to normalized coordinates in meter...
static int round(const double x)
Definition: vpMath.h:249
double get_j() const
Definition: vpImagePoint.h:210
static void getMinMaxRoi(const std::vector< vpImagePoint > &roi, int &i_min, int &i_max, int &j_min, int &j_max)
static const vpColor red
Definition: vpColor.h:163
Implementation of a rotation matrix and operations on such kind of matrices.
bool isInside(const vpImagePoint &iP, const PointInPolygonMethod &method=PnPolyRayCasting) const
Definition: vpPolygon.cpp:303
unsigned int computeNbDetectedCurrent(const vpKltOpencv &_tracker)
Implementation of an homography and operations on homographies.
Definition: vpHomography.h:179
void set_i(const double ii)
Definition: vpImagePoint.h:163
vpColVector & normalize()
vpPoint & getPoint(const unsigned int _index)
void displayPrimitive(const vpImage< unsigned char > &_I)
int getIndex() const
Definition: vpMbtPolygon.h:94
void getPolygonClipped(std::vector< std::pair< vpPoint, unsigned int > > &poly)
Generic class defining intrinsic camera parameters.
void extract(vpRotationMatrix &R) const
virtual bool isVisible(const vpHomogeneousMatrix &cMo, const double alpha, const bool &modulo=false, const vpCameraParameters &cam=vpCameraParameters(), const vpImage< unsigned char > &I=vpImage< unsigned char >())
void computeHomography(const vpHomogeneousMatrix &_cTc0, vpHomography &cHc0)
void set_j(const double jj)
Definition: vpImagePoint.h:174
static void displayCross(const vpImage< unsigned char > &I, const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)
void computeScanLineQuery(const vpPoint &a, const vpPoint &b, std::vector< std::pair< vpPoint, vpPoint > > &lines, const bool &displayResults=false)
Implementation of column vector and the associated operations.
Definition: vpColVector.h:72
Wrapper for the KLT (Kanade-Lucas-Tomasi) feature tracker implemented in OpenCV. Thus to enable this ...
Definition: vpKltOpencv.h:76
void getFeature(const int &index, long &id, float &x, float &y) const
int getNbFeatures() const
Get the number of current features.
Definition: vpKltOpencv.h:118
vpMatrix convert() const
vpMbtPolygon * polygon
Pointer to the polygon that define a face.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition: vpImagePoint.h:88
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)
This class defines the container for a plane geometrical structure.
Definition: vpPlane.h:58
Class that consider the case of a translation vector.
void computeInteractionMatrixAndResidu(vpColVector &_R, vpMatrix &_J)
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)
bool useScanLine
Use scanline rendering.
void updateMask(cv::Mat &mask, unsigned char _nb=255, unsigned int _shiftBorder=0)