ViSP  2.8.0
vpPoseRansac.cpp
1 /****************************************************************************
2  *
3  * $Id: vpPoseRansac.cpp 4303 2013-07-04 14:14:00Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2013 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Pose computation.
36  *
37  * Authors:
38  * Eric Marchand
39  * Aurelien Yol
40  *
41  *****************************************************************************/
42 
43 
49 #include <visp/vpPose.h>
50 #include <visp/vpColVector.h>
51 #include <visp/vpRansac.h>
52 #include <visp/vpTime.h>
53 #include <visp/vpList.h>
54 #include <visp/vpPoseException.h>
55 
56 #include <iostream>
57 #include <cmath> // std::fabs
58 #include <limits> // numeric_limits
59 #include <stdlib.h>
60 
61 #define eps 1e-6
62 
63 
70 {
71  srand(0);
72  std::vector<unsigned int> best_consensus;
73  std::vector<unsigned int> cur_consensus;
74  std::vector<unsigned int> cur_outliers;
75  std::vector<unsigned int> cur_randoms;
76  unsigned int size = (unsigned int)listP.size();
77  int nbTrials = 0;
78  unsigned int nbMinRandom = 4 ;
79  unsigned int nbInliers = 0;
80 
81  vpHomogeneousMatrix cMo_lagrange, cMo_dementhon;
82  double r, r_lagrange, r_dementhon;
83 
84  bool foundSolution = false;
85 
86  while (nbTrials < ransacMaxTrials && nbInliers < (unsigned)ransacNbInlierConsensus)
87  {
88  cur_outliers.clear();
89  cur_randoms.clear();
90 
91  std::vector<bool> usedPt(size, false);
92 
93  vpPose poseMin ;
94  for(unsigned int i = 0; i < nbMinRandom; i++)
95  {
96  unsigned int r = (unsigned int)rand()%size;
97  while(usedPt[r] ) r = (unsigned int)rand()%size;
98  usedPt[r] = true;
99 
100  std::list<vpPoint>::const_iterator iter = listP.begin();
101  std::advance(iter, r);
102  vpPoint pt = *iter;
103 
104  bool degenerate = false;
105  for(std::list<vpPoint>::const_iterator it = poseMin.listP.begin(); it != poseMin.listP.end(); ++it){
106  vpPoint ptdeg = *it;
107  if( ((fabs(pt.get_x() - ptdeg.get_x()) < 1e-6) && (fabs(pt.get_y() - ptdeg.get_y()) < 1e-6)) ||
108  ((fabs(pt.get_oX() - ptdeg.get_oX()) < 1e-6) && (fabs(pt.get_oY() - ptdeg.get_oY()) < 1e-6) && (fabs(pt.get_oZ() - ptdeg.get_oZ()) < 1e-6))){
109  degenerate = true;
110  break;
111  }
112  }
113  if(!degenerate){
114  poseMin.addPoint(pt) ;
115  cur_randoms.push_back(r);
116  }
117  else
118  i--;
119  }
120 
121  poseMin.computePose(vpPose::LAGRANGE, cMo_lagrange) ;
122  r_lagrange = poseMin.computeResidual(cMo_lagrange) ;
123  poseMin.computePose(vpPose::DEMENTHON, cMo_dementhon) ;
124  r_dementhon = poseMin.computeResidual(cMo_dementhon) ;
125 
126  if (r_lagrange < r_dementhon) {
127  r = r_lagrange;
128  cMo = cMo_lagrange;
129  }
130  else {
131  r = r_dementhon;
132  cMo = cMo_dementhon;
133  }
134  r = sqrt(r)/(double)nbMinRandom;
135 
136  if (r < ransacThreshold)
137  {
138  unsigned int nbInliersCur = 0;
139  unsigned int iter = 0;
140  for (std::list<vpPoint>::const_iterator it = listP.begin(); it != listP.end(); ++it)
141  {
142  vpPoint pt = *it;
143  vpPoint p(pt) ;
144  p.track(cMo) ;
145 
146  double d = vpMath::sqr(p.get_x() - pt.get_x()) + vpMath::sqr(p.get_y() - pt.get_y()) ;
147  double error = sqrt(d) ;
148  if(error < ransacThreshold){
149  // the point is considered as inlier if the error is below the threshold
150  // But, we need also to check if it is not a degenerate point
151  bool degenerate = false;
152 
153  for(unsigned int it_inlier_index = 0; it_inlier_index< cur_consensus.size(); it_inlier_index++){
154  std::list<vpPoint>::const_iterator it_point = listP.begin();
155  std::advance(it_point, cur_consensus[it_inlier_index]);
156  vpPoint pt = *it_point;
157 
158  vpPoint ptdeg = *it;
159  if( ((fabs(pt.get_x() - ptdeg.get_x()) < 1e-6) && (fabs(pt.get_y() - ptdeg.get_y()) < 1e-6)) ||
160  ((fabs(pt.get_oX() - ptdeg.get_oX()) < 1e-6) && (fabs(pt.get_oY() - ptdeg.get_oY()) < 1e-6) && (fabs(pt.get_oZ() - ptdeg.get_oZ()) < 1e-6))){
161  degenerate = true;
162  break;
163  }
164  }
165 
166  if(!degenerate){
167  nbInliersCur++;
168  cur_consensus.push_back(iter);
169  }
170  else {
171  cur_outliers.push_back(iter);
172  }
173  }
174  else
175  cur_outliers.push_back(iter);
176 
177  iter++;
178  }
179 
180  if(nbInliersCur > nbInliers)
181  {
182  foundSolution = true;
183  best_consensus = cur_consensus;
184  nbInliers = nbInliersCur;
185  }
186 
187  nbTrials++;
188  cur_consensus.clear();
189 
190  if(nbTrials >= ransacMaxTrials){
191  vpERROR_TRACE("Ransac reached the maximum number of trials");
192  foundSolution = true;
193  }
194  }
195  }
196 
197  if(foundSolution){
198  //std::cout << "Nombre d'inliers " << nbInliers << std::endl ;
199 
200  //Display the random picked points
201  /*
202  std::cout << "Randoms : ";
203  for(unsigned int i = 0 ; i < cur_randoms.size() ; i++)
204  std::cout << cur_randoms[i] << " ";
205  std::cout << std::endl;
206  */
207 
208  //Display the outliers
209  /*
210  std::cout << "Outliers : ";
211  for(unsigned int i = 0 ; i < cur_outliers.size() ; i++)
212  std::cout << cur_outliers[i] << " ";
213  std::cout << std::endl;
214  */
215 
216  if(nbInliers >= (unsigned)ransacNbInlierConsensus)
217  {
218  vpPose pose ;
219  for(unsigned i = 0 ; i < best_consensus.size(); i++)
220  {
221  std::list<vpPoint>::const_iterator iter = listP.begin();
222  std::advance(iter, best_consensus[i]);
223  vpPoint pt = *iter;
224 
225  pose.addPoint(pt) ;
226  ransacInliers.push_back(pt);
227  }
228 
229  pose.computePose(vpPose::LAGRANGE, cMo_lagrange) ;
230  r_lagrange = pose.computeResidual(cMo_lagrange) ;
231  pose.computePose(vpPose::DEMENTHON, cMo_dementhon) ;
232  r_dementhon = pose.computeResidual(cMo_dementhon) ;
233 
234  if (r_lagrange < r_dementhon) {
235  cMo = cMo_lagrange;
236  }
237  else {
238  cMo = cMo_dementhon;
239  }
240 
241  pose.computePose(vpPose::VIRTUAL_VS, cMo) ;
242  }
243  }
244 }
245 
270 void vpPose::findMatch(std::vector<vpPoint> &p2D,
271  std::vector<vpPoint> &p3D,
272  const unsigned int &numberOfInlierToReachAConsensus,
273  const double &threshold,
274  unsigned int &ninliers,
275  std::vector<vpPoint> &listInliers,
276  vpHomogeneousMatrix &cMo,
277  const int &maxNbTrials )
278 {
279  vpPose pose;
280 
281  int nbPts = 0;
282  for(unsigned int i = 0 ; i < p2D.size() ; i++)
283  {
284  for(unsigned int j = 0 ; j < p3D.size() ; j++)
285  {
286  vpPoint pt;
287  pt.set_x(p2D[i].get_x());
288  pt.set_y(p2D[i].get_y());
289  pt.setWorldCoordinates(p3D[j].getWorldCoordinates());
290  pose.addPoint(pt);
291  nbPts++;
292  }
293  }
294 
295  if (pose.listP.size() < 4)
296  {
297  vpERROR_TRACE("Ransac method cannot be used in that case ") ;
298  vpERROR_TRACE("(at least 4 points are required)") ;
299  vpERROR_TRACE("Not enough point (%d) to compute the pose ",pose.listP.size()) ;
301  "Not enough points ")) ;
302  }
303  else
304  {
305  pose.setRansacMaxTrials(maxNbTrials);
306  pose.setRansacNbInliersToReachConsensus(numberOfInlierToReachAConsensus);
307  pose.setRansacThreshold(threshold);
308  pose.computePose(vpPose::RANSAC, cMo);
309  ninliers = pose.getRansacNbInliers();
310  listInliers = pose.getRansacInliers();
311  }
312 }
313 
314 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
315 
316 /*
317 \brief
318 
319 determines if there more than one the same point in the chosen set of point
320 
321 point are coded this way
322 x1,y1, X1, Y1, Z1
323 xnm, ynm, Xnm, Ynm, Znm
324 
325 leading to 5*n*m
326 */
327 bool
329 {
330 
331  // vpTRACE("%p %p %d",&x, ind, x.getRows()) ;
332  for (int i=1 ; i < 4 ; i++)
333  for (int j=0 ; j<i ; j++)
334  {
335  unsigned int indi = 5*ind[i] ;
336  unsigned int indj = 5*ind[j] ;
337 
338  if ((fabs(x[indi] - x[indj]) < 1e-6) && (fabs(x[indi+1] - x[indj+1]) < 1e-6))
339  { return true ; }
340 
341  if ((fabs(x[indi+2] - x[indj+2]) < 1e-6) && (fabs(x[indi+3] - x[indj+3]) < 1e-6) && (fabs(x[indi+4] - x[indj+4]) < 1e-6))
342  { return true ; }
343  }
344 
345  return false ;
346 }
351 void
353 {
354  unsigned int i ;
355 
356  vpPoint p[4] ;
357 
358  vpPose pose ;
359  pose.clearPoint() ;
360  for(i=0 ; i < 4 ; i++)
361  {
362 
363  unsigned int index = 5*ind[i] ;
364 
365  p[i].set_x(x[index]) ;
366  p[i].set_y(x[index+1]) ;
367 
368  p[i].setWorldCoordinates(x[index+2],x[index+3], x[index+4]) ;
369  pose.addPoint(p[i]) ;
370  }
371 
372 
373  // pose.printPoint() ;
374  vpHomogeneousMatrix cMo ;
375  try {
376  pose.computePose(vpPose::DEMENTHON, cMo) ;
377  // std::cout << cMo << std::endl ;
378  }
379  catch(...)
380  {
381  cMo.setIdentity() ;
382  }
383 
384  M.resize(16) ;
385  for (i=0 ; i <16 ; i++)
386  {
387  M[i] = cMo.data[i] ;
388  }
389 
390 }
391 
392 
398 double
400 {
401 
402  unsigned int i ;
403  unsigned int n = x.getRows()/5 ;
404 
405  vpPoint *p;
406  p = new vpPoint [n] ;
407  {
408  // firsttime=1 ;
409  for( i=0 ; i < n ; i++)
410  {
411  p[i].setWorldCoordinates(x[5*i+2],x[5*i+3], x[5*i+4]) ;
412  }
413  }
414 
415  vpHomogeneousMatrix cMo ;
416  for (i=0 ; i <16 ; i++)
417  {
418  cMo.data[i] = M[i];
419  }
420 
421 
422  d.resize(n) ;
423  vpColVector cP, xy ;
424 
425  for( i=0 ; i < n ; i++)
426  {
427  p[i].changeFrame(cMo,cP) ;
428  p[i].projection(cP,xy) ;
429  d[i] = sqrt(vpMath::sqr(x[5*i]-xy[0])+vpMath::sqr(x[5*i+1]-xy[1])) ;
430  }
431 
432  delete [] p;
433 
434  return 0 ;
435 }
436 
437 void
438 vpPose::initRansac(const unsigned int n,
439  const double *x, const double *y,
440  const unsigned int m,
441  const double *X, const double *Y, const double *Z,
442  vpColVector &data)
443 {
444  data.resize(5*n*m) ;
445  unsigned int k =0 ;
446  for (unsigned int i=0 ; i < n ; i++)
447  {
448  for (unsigned int j=0 ; j < m ; j++)
449  {
450  data[k] = x[i] ;
451  data[k+1] = y[i] ;
452  data[k+2] = X[j] ;
453  data[k+3] = Y[j] ;
454  data[k+4] = Z[j] ;
455 
456  k+=5 ;
457  }
458  }
459 }
460 
461 
494 void
495 vpPose::ransac(const unsigned int n,
496  const double *x, const double *y,
497  const unsigned int m,
498  const double *X, const double *Y, const double *Z,
499  const int numberOfInlierToReachAConsensus,
500  const double threshold,
501  unsigned int &ninliers,
502  vpColVector &xi, vpColVector &yi,
503  vpColVector &Xi, vpColVector &Yi, vpColVector &Zi,
504  vpHomogeneousMatrix &cMo,
505  const int maxNbTrials)
506 {
507 
508 
509  double tms = vpTime::measureTimeMs() ;
510  vpColVector data ;
511  unsigned int i;
512  vpPose::initRansac(n,x,y,m,X,Y,Z, data) ;
513 
514  vpColVector M(16) ;
515  vpColVector inliers(n*m) ;
516  vpRansac<vpPose>::ransac(n*m,data,4,
517  threshold, M,inliers,
518  numberOfInlierToReachAConsensus, 0.0, maxNbTrials) ;
519 
520 
521  // we count the number of inliers
522  ninliers = 0 ;
523  for(i=0 ; i < n*m ; i++)
524  {
525  //if (inliers[i]==1)
526  if (std::fabs(inliers[i]-1) <= std::fabs(vpMath::maximum(inliers[i], 1.)) * std::numeric_limits<double>::epsilon())
527  {
528  ninliers++ ;
529  }
530  }
531 
532  xi.resize(ninliers) ;
533  yi.resize(ninliers) ;
534  Xi.resize(ninliers) ;
535  Yi.resize(ninliers) ;
536  Zi.resize(ninliers) ;
537 
538  unsigned int k =0 ;
539  for(i=0 ; i < n*m ; i++)
540  {
541  //if (inliers[i]==1)
542  if (std::fabs(inliers[i]-1) <= std::fabs(vpMath::maximum(inliers[i], 1.)) * std::numeric_limits<double>::epsilon())
543  {
544  xi[k] = data[5*i] ;
545  yi[k] = data[5*i+1] ;
546  Xi[k] = data[5*i+2] ;
547  Yi[k] = data[5*i+3] ;
548  Zi[k] = data[5*i+4] ;
549  k++ ;
550  }
551  }
552 
553  for (i=0 ; i <16 ; i++)
554  {
555  cMo.data[i] = M[i];
556  }
557 
558  std::cout << vpTime::measureTimeMs() - tms << "ms" << std::endl ;
559 
560 }
561 
587 void
588 vpPose::ransac(const unsigned int n,
589  const vpPoint *p,
590  const unsigned int m,
591  const vpPoint *P,
592  const int numberOfInlierToReachAConsensus,
593  const double threshold,
594  unsigned int &ninliers,
595  std::list<vpPoint> &lPi,
596  vpHomogeneousMatrix &cMo,
597  const int maxNbTrials)
598 {
599  double *x, *y;
600  x = new double [n];
601  y = new double [n] ;
602  for (unsigned int i=0 ; i < n ; i++)
603  {
604  x[i] = p[i].get_x() ;
605  y[i] = p[i].get_y() ;
606  }
607  double *X, *Y, *Z;
608  X = new double [m];
609  Y = new double [m];
610  Z = new double [m];
611  for (unsigned int i=0 ; i < m ; i++)
612  {
613  X[i] = P[i].get_oX() ;
614  Y[i] = P[i].get_oY() ;
615  Z[i] = P[i].get_oZ() ;
616  }
617 
618  vpColVector xi,yi,Xi,Yi,Zi ;
619 
620  ransac(n,x,y,
621  m,X,Y,Z, numberOfInlierToReachAConsensus,
622  threshold,
623  ninliers,
624  xi,yi,Xi,Yi,Zi,
625  cMo, maxNbTrials) ;
626 
627  for(unsigned int i=0 ; i < ninliers ; i++)
628  {
629  vpPoint Pi ;
630  Pi.setWorldCoordinates(Xi[i], Yi[i], Zi[i]) ;
631  Pi.set_x(xi[i]) ;
632  Pi.set_y(yi[i]) ;
633  lPi.push_back(Pi) ;
634  }
635 
636  delete [] x;
637  delete [] y;
638  delete [] X;
639  delete [] Y;
640  delete [] Z;
641 }
642 
666 void
667 vpPose::ransac(std::list<vpPoint> &lp,
668  std::list<vpPoint> &lP,
669  const int numberOfInlierToReachAConsensus,
670  const double threshold,
671  unsigned int &ninliers,
672  std::list<vpPoint> &lPi,
673  vpHomogeneousMatrix &cMo,
674  const int maxNbTrials)
675 {
676  unsigned int i;
677  unsigned int n = (unsigned int)lp.size() ;
678  unsigned int m = (unsigned int)lP.size() ;
679 
680  double *x, *y;
681  x = new double [n];
682  y = new double [n];
683 
684  vpPoint pin ;
685  i = 0;
686  for (std::list<vpPoint>::const_iterator it = lp.begin(); it != lp.end(); ++it)
687  {
688  pin = *it;
689  x[i] = pin.get_x() ;
690  y[i] = pin.get_y() ;
691  ++ i;
692  }
693 
694  double *X, *Y, *Z;
695  X = new double [m];
696  Y = new double [m];
697  Z = new double [m];
698  i = 0;
699  for (std::list<vpPoint>::const_iterator it = lP.begin(); it != lP.end(); ++it)
700  {
701  pin = *it;
702  X[i] = pin.get_oX() ;
703  Y[i] = pin.get_oY() ;
704  Z[i] = pin.get_oZ() ;
705  ++i;
706  }
707 
708  vpColVector xi,yi,Xi,Yi,Zi ;
709 
710  ransac(n,x,y,
711  m,X,Y,Z, numberOfInlierToReachAConsensus,
712  threshold,
713  ninliers,
714  xi,yi,Xi,Yi,Zi,
715  cMo, maxNbTrials) ;
716 
717  for( i=0 ; i < ninliers ; i++)
718  {
719  vpPoint Pi ;
720  Pi.setWorldCoordinates(Xi[i],Yi[i], Zi[i]) ;
721  Pi.set_x(xi[i]) ;
722  Pi.set_y(yi[i]) ;
723  lPi.push_back(Pi);
724  }
725 
726  delete [] x;
727  delete [] y;
728  delete [] X;
729  delete [] Y;
730  delete [] Z;
731 
732 }
733 #endif // VISP_BUILD_DEPRECATED_FUNCTIONS
734 
735 /*
736  * Local variables:
737  * c-basic-offset: 2
738  * End:
739  */
void projection(const vpColVector &_cP, vpColVector &_p)
Projection onto the image plane of a point. Input: the 3D coordinates in the camera frame _cP...
Definition: vpPoint.cpp:132
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
#define vpERROR_TRACE
Definition: vpDebug.h:379
void setIdentity()
Basic initialisation (identity)
double get_oY() const
Get the point Y coordinate in the object frame.
Definition: vpPoint.h:129
void setRansacThreshold(const double &t)
Definition: vpPose.h:170
void set_x(const double x)
Set the point x coordinate in the image plane.
Definition: vpPoint.h:194
void track(const vpHomogeneousMatrix &cMo)
static double measureTimeMs()
Definition: vpTime.cpp:86
double get_y() const
Get the point y coordinate in the image plane.
Definition: vpPoint.h:138
static void computeTransformation(vpColVector &x, unsigned int *ind, vpColVector &M)
std::list< vpPoint > listP
array of point (use here class vpPoint)
Definition: vpPose.h:95
Class that defines what is a point.
Definition: vpPoint.h:65
static Type maximum(const Type &a, const Type &b)
Definition: vpMath.h:137
double * data
address of the first element of the data array
Definition: vpMatrix.h:116
static void findMatch(std::vector< vpPoint > &p2D, std::vector< vpPoint > &p3D, const unsigned int &numberOfInlierToReachAConsensus, const double &threshold, unsigned int &ninliers, std::vector< vpPoint > &listInliers, vpHomogeneousMatrix &cMo, const int &maxNbTrials=10000)
std::vector< vpPoint > getRansacInliers()
Definition: vpPose.h:173
static double sqr(double x)
Definition: vpMath.h:106
Class used for pose computation from N points (pose from point only).
Definition: vpPose.h:78
double get_oZ() const
Get the point Z coordinate in the object frame.
Definition: vpPoint.h:131
void set_y(const double y)
Set the point y coordinate in the image plane.
Definition: vpPoint.h:196
double get_x() const
Get the point x coordinate in the image plane.
Definition: vpPoint.h:136
void poseRansac(vpHomogeneousMatrix &cMo)
compute the pose using the Ransac approach
void setRansacMaxTrials(const int &rM)
Definition: vpPose.h:171
static void ransac(const unsigned int n, const double *x, const double *y, const unsigned int m, const double *X, const double *Y, const double *Z, const int numberOfInlierToReachAConsensus, const double threshold, unsigned int &ninliers, vpColVector &xi, vpColVector &yi, vpColVector &Xi, vpColVector &Yi, vpColVector &Zi, vpHomogeneousMatrix &cMo, const int maxNbTrials=10000)
void setRansacNbInliersToReachConsensus(const unsigned int &nbC)
Definition: vpPose.h:169
static bool degenerateConfiguration(vpColVector &x, unsigned int *ind)
double get_oX() const
Get the point X coordinate in the object frame.
Definition: vpPoint.h:127
Error that can be emited by the vpPose class and its derivates.
Class that provides a data structure for the column vectors as well as a set of operations on these v...
Definition: vpColVector.h:72
static bool ransac(unsigned int npts, vpColVector &x, unsigned int s, double t, vpColVector &model, vpColVector &inliers, int consensus=1000, double areaThreshold=0.0, const int maxNbumbersOfTrials=10000)
RANSAC - Robustly fits a model to data with the RANSAC algorithm.
Definition: vpRansac.h:138
unsigned int getRansacNbInliers()
Definition: vpPose.h:172
void computePose(vpPoseMethodType methode, vpHomogeneousMatrix &cMo)
compute the pose for a given method
Definition: vpPose.cpp:382
unsigned int getRows() const
Return the number of rows of the matrix.
Definition: vpMatrix.h:157
void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &_cP)
Definition: vpPoint.cpp:150
void addPoint(const vpPoint &P)
Add a new point in this array.
Definition: vpPose.cpp:150
double computeResidual(const vpHomogeneousMatrix &cMo) const
Compute and return the residual expressed in meter for the pose matrix 'cMo'.
Definition: vpPose.cpp:339
void setWorldCoordinates(const double ox, const double oy, const double oz)
Set the point world coordinates. We mean here the coordinates of the point in the object frame...
Definition: vpPoint.cpp:74
void resize(const unsigned int i, const bool flagNullify=true)
Definition: vpColVector.h:94
void clearPoint()
suppress all the point in the array of point
Definition: vpPose.cpp:128