ViSP  2.9.0
vpPoseRansac.cpp
1 /****************************************************************************
2  *
3  * $Id: vpPoseRansac.cpp 4649 2014-02-07 14:57:11Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2014 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  double r, r_lagrange, r_dementhon;
81 
82  vpHomogeneousMatrix cMo_lagrange, cMo_dementhon;
83 
84  if (size < 4) {
85  //vpERROR_TRACE("Not enough point to compute the pose");
87  "Not enough point to compute the pose")) ;
88  }
89 
90  bool foundSolution = false;
91 
92  while (nbTrials < ransacMaxTrials && nbInliers < (unsigned)ransacNbInlierConsensus)
93  {
94  cur_outliers.clear();
95  cur_randoms.clear();
96 
97  std::vector<bool> usedPt(size, false);
98 
99  vpPose poseMin ;
100  for(unsigned int i = 0; i < nbMinRandom; i++)
101  {
102  unsigned int r_ = (unsigned int)rand()%size;
103  while(usedPt[r_] ) r_ = (unsigned int)rand()%size;
104  usedPt[r_] = true;
105 
106  std::list<vpPoint>::const_iterator iter = listP.begin();
107  std::advance(iter, r_);
108  vpPoint pt = *iter;
109 
110  bool degenerate = false;
111  for(std::list<vpPoint>::const_iterator it = poseMin.listP.begin(); it != poseMin.listP.end(); ++it){
112  vpPoint ptdeg = *it;
113  if( ((fabs(pt.get_x() - ptdeg.get_x()) < 1e-6) && (fabs(pt.get_y() - ptdeg.get_y()) < 1e-6)) ||
114  ((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))){
115  degenerate = true;
116  break;
117  }
118  }
119  if(!degenerate){
120  poseMin.addPoint(pt) ;
121  cur_randoms.push_back(r_);
122  }
123  else
124  i--;
125  }
126 
127  poseMin.computePose(vpPose::LAGRANGE, cMo_lagrange) ;
128  r_lagrange = poseMin.computeResidual(cMo_lagrange) ;
129  poseMin.computePose(vpPose::DEMENTHON, cMo_dementhon) ;
130  r_dementhon = poseMin.computeResidual(cMo_dementhon) ;
131 
132  if (r_lagrange < r_dementhon) {
133  r = r_lagrange;
134  cMo = cMo_lagrange;
135  }
136  else {
137  r = r_dementhon;
138  cMo = cMo_dementhon;
139  }
140  r = sqrt(r)/(double)nbMinRandom;
141 
142  if (r < ransacThreshold)
143  {
144  unsigned int nbInliersCur = 0;
145  unsigned int iter = 0;
146  for (std::list<vpPoint>::const_iterator it = listP.begin(); it != listP.end(); ++it)
147  {
148  vpPoint pt = *it;
149  vpPoint p(pt) ;
150  p.track(cMo) ;
151 
152  double d = vpMath::sqr(p.get_x() - pt.get_x()) + vpMath::sqr(p.get_y() - pt.get_y()) ;
153  double error = sqrt(d) ;
154  if(error < ransacThreshold){
155  // the point is considered as inlier if the error is below the threshold
156  // But, we need also to check if it is not a degenerate point
157  bool degenerate = false;
158 
159  for(unsigned int it_inlier_index = 0; it_inlier_index< cur_consensus.size(); it_inlier_index++){
160  std::list<vpPoint>::const_iterator it_point = listP.begin();
161  std::advance(it_point, cur_consensus[it_inlier_index]);
162  pt = *it_point;
163 
164  vpPoint ptdeg = *it;
165  if( ((fabs(pt.get_x() - ptdeg.get_x()) < 1e-6) && (fabs(pt.get_y() - ptdeg.get_y()) < 1e-6)) ||
166  ((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))){
167  degenerate = true;
168  break;
169  }
170  }
171 
172  if(!degenerate){
173  nbInliersCur++;
174  cur_consensus.push_back(iter);
175  }
176  else {
177  cur_outliers.push_back(iter);
178  }
179  }
180  else
181  cur_outliers.push_back(iter);
182 
183  iter++;
184  }
185 
186  if(nbInliersCur > nbInliers)
187  {
188  foundSolution = true;
189  best_consensus = cur_consensus;
190  nbInliers = nbInliersCur;
191  }
192 
193  nbTrials++;
194  cur_consensus.clear();
195 
196  if(nbTrials >= ransacMaxTrials){
197  vpERROR_TRACE("Ransac reached the maximum number of trials");
198  foundSolution = true;
199  }
200  }
201  }
202 
203  if(foundSolution){
204  //std::cout << "Nombre d'inliers " << nbInliers << std::endl ;
205 
206  //Display the random picked points
207  /*
208  std::cout << "Randoms : ";
209  for(unsigned int i = 0 ; i < cur_randoms.size() ; i++)
210  std::cout << cur_randoms[i] << " ";
211  std::cout << std::endl;
212  */
213 
214  //Display the outliers
215  /*
216  std::cout << "Outliers : ";
217  for(unsigned int i = 0 ; i < cur_outliers.size() ; i++)
218  std::cout << cur_outliers[i] << " ";
219  std::cout << std::endl;
220  */
221 
222  if(nbInliers >= (unsigned)ransacNbInlierConsensus)
223  {
224  vpPose pose ;
225  for(unsigned i = 0 ; i < best_consensus.size(); i++)
226  {
227  std::list<vpPoint>::const_iterator iter = listP.begin();
228  std::advance(iter, best_consensus[i]);
229  vpPoint pt = *iter;
230 
231  pose.addPoint(pt) ;
232  ransacInliers.push_back(pt);
233  }
234 
235  pose.computePose(vpPose::LAGRANGE, cMo_lagrange) ;
236  r_lagrange = pose.computeResidual(cMo_lagrange) ;
237  pose.computePose(vpPose::DEMENTHON, cMo_dementhon) ;
238  r_dementhon = pose.computeResidual(cMo_dementhon) ;
239 
240  if (r_lagrange < r_dementhon) {
241  cMo = cMo_lagrange;
242  }
243  else {
244  cMo = cMo_dementhon;
245  }
246 
247  pose.computePose(vpPose::VIRTUAL_VS, cMo) ;
248  }
249  }
250 }
251 
276 void vpPose::findMatch(std::vector<vpPoint> &p2D,
277  std::vector<vpPoint> &p3D,
278  const unsigned int &numberOfInlierToReachAConsensus,
279  const double &threshold,
280  unsigned int &ninliers,
281  std::vector<vpPoint> &listInliers,
282  vpHomogeneousMatrix &cMo,
283  const int &maxNbTrials )
284 {
285  vpPose pose;
286 
287  int nbPts = 0;
288  for(unsigned int i = 0 ; i < p2D.size() ; i++)
289  {
290  for(unsigned int j = 0 ; j < p3D.size() ; j++)
291  {
292  vpPoint pt;
293  pt.set_x(p2D[i].get_x());
294  pt.set_y(p2D[i].get_y());
295  pt.setWorldCoordinates(p3D[j].getWorldCoordinates());
296  pose.addPoint(pt);
297  nbPts++;
298  }
299  }
300 
301  if (pose.listP.size() < 4)
302  {
303  vpERROR_TRACE("Ransac method cannot be used in that case ") ;
304  vpERROR_TRACE("(at least 4 points are required)") ;
305  vpERROR_TRACE("Not enough point (%d) to compute the pose ",pose.listP.size()) ;
307  "Not enough points ")) ;
308  }
309  else
310  {
311  pose.setRansacMaxTrials(maxNbTrials);
312  pose.setRansacNbInliersToReachConsensus(numberOfInlierToReachAConsensus);
313  pose.setRansacThreshold(threshold);
314  pose.computePose(vpPose::RANSAC, cMo);
315  ninliers = pose.getRansacNbInliers();
316  listInliers = pose.getRansacInliers();
317  }
318 }
319 
320 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
321 
322 /*
323 \brief
324 
325 determines if there more than one the same point in the chosen set of point
326 
327 point are coded this way
328 x1,y1, X1, Y1, Z1
329 xnm, ynm, Xnm, Ynm, Znm
330 
331 leading to 5*n*m
332 */
333 bool
335 {
336 
337  // vpTRACE("%p %p %d",&x, ind, x.getRows()) ;
338  for (int i=1 ; i < 4 ; i++)
339  for (int j=0 ; j<i ; j++)
340  {
341  unsigned int indi = 5*ind[i] ;
342  unsigned int indj = 5*ind[j] ;
343 
344  if ((fabs(x[indi] - x[indj]) < 1e-6) && (fabs(x[indi+1] - x[indj+1]) < 1e-6))
345  { return true ; }
346 
347  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))
348  { return true ; }
349  }
350 
351  return false ;
352 }
357 void
359 {
360  unsigned int i ;
361 
362  vpPoint p[4] ;
363 
364  vpPose pose ;
365  pose.clearPoint() ;
366  for(i=0 ; i < 4 ; i++)
367  {
368 
369  unsigned int index = 5*ind[i] ;
370 
371  p[i].set_x(x[index]) ;
372  p[i].set_y(x[index+1]) ;
373 
374  p[i].setWorldCoordinates(x[index+2],x[index+3], x[index+4]) ;
375  pose.addPoint(p[i]) ;
376  }
377 
378 
379  // pose.printPoint() ;
380  vpHomogeneousMatrix cMo ;
381  try {
382  pose.computePose(vpPose::DEMENTHON, cMo) ;
383  // std::cout << cMo << std::endl ;
384  }
385  catch(...)
386  {
387  cMo.setIdentity() ;
388  }
389 
390  M.resize(16) ;
391  for (i=0 ; i <16 ; i++)
392  {
393  M[i] = cMo.data[i] ;
394  }
395 
396 }
397 
398 
404 double
406 {
407 
408  unsigned int i ;
409  unsigned int n = x.getRows()/5 ;
410 
411  vpPoint *p;
412  p = new vpPoint [n] ;
413  {
414  // firsttime=1 ;
415  for( i=0 ; i < n ; i++)
416  {
417  p[i].setWorldCoordinates(x[5*i+2],x[5*i+3], x[5*i+4]) ;
418  }
419  }
420 
421  vpHomogeneousMatrix cMo ;
422  for (i=0 ; i <16 ; i++)
423  {
424  cMo.data[i] = M[i];
425  }
426 
427 
428  d.resize(n) ;
429  vpColVector cP, xy ;
430 
431  for( i=0 ; i < n ; i++)
432  {
433  p[i].changeFrame(cMo,cP) ;
434  p[i].projection(cP,xy) ;
435  d[i] = sqrt(vpMath::sqr(x[5*i]-xy[0])+vpMath::sqr(x[5*i+1]-xy[1])) ;
436  }
437 
438  delete [] p;
439 
440  return 0 ;
441 }
442 
443 void
444 vpPose::initRansac(const unsigned int n,
445  const double *x, const double *y,
446  const unsigned int m,
447  const double *X, const double *Y, const double *Z,
448  vpColVector &data)
449 {
450  data.resize(5*n*m) ;
451  unsigned int k =0 ;
452  for (unsigned int i=0 ; i < n ; i++)
453  {
454  for (unsigned int j=0 ; j < m ; j++)
455  {
456  data[k] = x[i] ;
457  data[k+1] = y[i] ;
458  data[k+2] = X[j] ;
459  data[k+3] = Y[j] ;
460  data[k+4] = Z[j] ;
461 
462  k+=5 ;
463  }
464  }
465 }
466 
467 
500 void
501 vpPose::ransac(const unsigned int n,
502  const double *x, const double *y,
503  const unsigned int m,
504  const double *X, const double *Y, const double *Z,
505  const int numberOfInlierToReachAConsensus,
506  const double threshold,
507  unsigned int &ninliers,
508  vpColVector &xi, vpColVector &yi,
509  vpColVector &Xi, vpColVector &Yi, vpColVector &Zi,
510  vpHomogeneousMatrix &cMo,
511  const int maxNbTrials)
512 {
513 
514 
515  double tms = vpTime::measureTimeMs() ;
516  vpColVector data ;
517  unsigned int i;
518  vpPose::initRansac(n,x,y,m,X,Y,Z, data) ;
519 
520  vpColVector M(16) ;
521  vpColVector inliers(n*m) ;
522  vpRansac<vpPose>::ransac(n*m,data,4,
523  threshold, M,inliers,
524  numberOfInlierToReachAConsensus, 0.0, maxNbTrials) ;
525 
526 
527  // we count the number of inliers
528  ninliers = 0 ;
529  for(i=0 ; i < n*m ; i++)
530  {
531  //if (inliers[i]==1)
532  if (std::fabs(inliers[i]-1) <= std::fabs(vpMath::maximum(inliers[i], 1.)) * std::numeric_limits<double>::epsilon())
533  {
534  ninliers++ ;
535  }
536  }
537 
538  xi.resize(ninliers) ;
539  yi.resize(ninliers) ;
540  Xi.resize(ninliers) ;
541  Yi.resize(ninliers) ;
542  Zi.resize(ninliers) ;
543 
544  unsigned int k =0 ;
545  for(i=0 ; i < n*m ; i++)
546  {
547  //if (inliers[i]==1)
548  if (std::fabs(inliers[i]-1) <= std::fabs(vpMath::maximum(inliers[i], 1.)) * std::numeric_limits<double>::epsilon())
549  {
550  xi[k] = data[5*i] ;
551  yi[k] = data[5*i+1] ;
552  Xi[k] = data[5*i+2] ;
553  Yi[k] = data[5*i+3] ;
554  Zi[k] = data[5*i+4] ;
555  k++ ;
556  }
557  }
558 
559  for (i=0 ; i <16 ; i++)
560  {
561  cMo.data[i] = M[i];
562  }
563 
564  std::cout << vpTime::measureTimeMs() - tms << "ms" << std::endl ;
565 
566 }
567 
593 void
594 vpPose::ransac(const unsigned int n,
595  const vpPoint *p,
596  const unsigned int m,
597  const vpPoint *P,
598  const int numberOfInlierToReachAConsensus,
599  const double threshold,
600  unsigned int &ninliers,
601  std::list<vpPoint> &lPi,
602  vpHomogeneousMatrix &cMo,
603  const int maxNbTrials)
604 {
605  double *x, *y;
606  x = new double [n];
607  y = new double [n] ;
608  for (unsigned int i=0 ; i < n ; i++)
609  {
610  x[i] = p[i].get_x() ;
611  y[i] = p[i].get_y() ;
612  }
613  double *X, *Y, *Z;
614  X = new double [m];
615  Y = new double [m];
616  Z = new double [m];
617  for (unsigned int i=0 ; i < m ; i++)
618  {
619  X[i] = P[i].get_oX() ;
620  Y[i] = P[i].get_oY() ;
621  Z[i] = P[i].get_oZ() ;
622  }
623 
624  vpColVector xi,yi,Xi,Yi,Zi ;
625 
626  ransac(n,x,y,
627  m,X,Y,Z, numberOfInlierToReachAConsensus,
628  threshold,
629  ninliers,
630  xi,yi,Xi,Yi,Zi,
631  cMo, maxNbTrials) ;
632 
633  for(unsigned int i=0 ; i < ninliers ; i++)
634  {
635  vpPoint Pi ;
636  Pi.setWorldCoordinates(Xi[i], Yi[i], Zi[i]) ;
637  Pi.set_x(xi[i]) ;
638  Pi.set_y(yi[i]) ;
639  lPi.push_back(Pi) ;
640  }
641 
642  delete [] x;
643  delete [] y;
644  delete [] X;
645  delete [] Y;
646  delete [] Z;
647 }
648 
672 void
673 vpPose::ransac(std::list<vpPoint> &lp,
674  std::list<vpPoint> &lP,
675  const int numberOfInlierToReachAConsensus,
676  const double threshold,
677  unsigned int &ninliers,
678  std::list<vpPoint> &lPi,
679  vpHomogeneousMatrix &cMo,
680  const int maxNbTrials)
681 {
682  unsigned int i;
683  unsigned int n = (unsigned int)lp.size() ;
684  unsigned int m = (unsigned int)lP.size() ;
685 
686  double *x, *y;
687  x = new double [n];
688  y = new double [n];
689 
690  vpPoint pin ;
691  i = 0;
692  for (std::list<vpPoint>::const_iterator it = lp.begin(); it != lp.end(); ++it)
693  {
694  pin = *it;
695  x[i] = pin.get_x() ;
696  y[i] = pin.get_y() ;
697  ++ i;
698  }
699 
700  double *X, *Y, *Z;
701  X = new double [m];
702  Y = new double [m];
703  Z = new double [m];
704  i = 0;
705  for (std::list<vpPoint>::const_iterator it = lP.begin(); it != lP.end(); ++it)
706  {
707  pin = *it;
708  X[i] = pin.get_oX() ;
709  Y[i] = pin.get_oY() ;
710  Z[i] = pin.get_oZ() ;
711  ++i;
712  }
713 
714  vpColVector xi,yi,Xi,Yi,Zi ;
715 
716  ransac(n,x,y,
717  m,X,Y,Z, numberOfInlierToReachAConsensus,
718  threshold,
719  ninliers,
720  xi,yi,Xi,Yi,Zi,
721  cMo, maxNbTrials) ;
722 
723  for( i=0 ; i < ninliers ; i++)
724  {
725  vpPoint Pi ;
726  Pi.setWorldCoordinates(Xi[i],Yi[i], Zi[i]) ;
727  Pi.set_x(xi[i]) ;
728  Pi.set_y(yi[i]) ;
729  lPi.push_back(Pi);
730  }
731 
732  delete [] x;
733  delete [] y;
734  delete [] X;
735  delete [] Y;
736  delete [] Z;
737 
738 }
739 #endif // VISP_BUILD_DEPRECATED_FUNCTIONS
740 
741 /*
742  * Local variables:
743  * c-basic-offset: 2
744  * End:
745  */
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:395
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
something is not initialized
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:118
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)
unsigned int getRansacNbInliers() const
Definition: vpPose.h:172
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:124
void computePose(vpPoseMethodType methode, vpHomogeneousMatrix &cMo)
compute the pose for a given method
Definition: vpPose.cpp:386
unsigned int getRows() const
Return the number of rows of the matrix.
Definition: vpMatrix.h:161
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:155
std::vector< vpPoint > getRansacInliers() const
Definition: vpPose.h:173
double computeResidual(const vpHomogeneousMatrix &cMo) const
Compute and return the residual expressed in meter for the pose matrix 'cMo'.
Definition: vpPose.cpp:344
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:133