ViSP  2.9.0
vpMbtDistanceLine.cpp
1 /****************************************************************************
2  *
3  * $Id: vpMbtDistanceLine.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  * Make the complete tracking of an object by using its CAD model
36  *
37  * Authors:
38  * Nicolas Melchior
39  * Romain Tallonneau
40  * Eric Marchand
41  *
42  *****************************************************************************/
43 #include <visp/vpConfig.h>
44 
50 #include <visp/vpMbtDistanceLine.h>
51 #include <visp/vpPlane.h>
52 #include <visp/vpMeterPixelConversion.h>
53 #include <visp/vpFeatureBuilder.h>
54 #include <stdlib.h>
55 
56 void buildPlane(vpPoint &P, vpPoint &Q, vpPoint &R, vpPlane &plane);
57 void buildLine(vpPoint &P1, vpPoint &P2, vpPoint &P3, vpPoint &P4, vpLine &L);
58 
63  : name(), index(0), cam(), me(NULL), alpha(0), wmean(1),
64  featureline(), poly(), meline(NULL), line(NULL), p1(NULL), p2(NULL), L(),
65  error(), nbFeature(0), Reinit(false), hiddenface(NULL), Lindex_polygon(),
66  isvisible(false)
67 {
68 }
69 
74 {
75 // cout << "Deleting line " << index << endl ;
76  if (line != NULL) delete line ;
77  if (meline != NULL) delete meline ;
78 
79 }
80 
86 void
87 vpMbtDistanceLine::project(const vpHomogeneousMatrix &cMo)
88 {
89  line->project(cMo) ;
90  p1->project(cMo) ;
91  p2->project(cMo) ;
92 }
93 
102 void
103 buildPlane(vpPoint &P, vpPoint &Q, vpPoint &R, vpPlane &plane)
104 {
105  vpColVector a(3);
106  vpColVector b(3);
107  vpColVector n(3);
108  //Calculate vector corresponding to PQ
109  a[0]=P.get_oX()-Q.get_oX();
110  a[1]=P.get_oY()-Q.get_oY();
111  a[2]=P.get_oZ()-Q.get_oZ();
112 
113  //Calculate vector corresponding to PR
114  b[0]=P.get_oX()-R.get_oX();
115  b[1]=P.get_oY()-R.get_oY();
116  b[2]=P.get_oZ()-R.get_oZ();
117 
118  //Calculate normal vector to plane PQ x PR
119  n=vpColVector::cross(a,b);
120 
121  //Equation of the plane is given by:
122  double A = n[0];
123  double B = n[1];
124  double C = n[2];
125  double D=-(A*P.get_oX()+B*P.get_oY()+C*P.get_oZ());
126 
127  double norm = sqrt(A*A+B*B+C*C) ;
128  plane.setA(A/norm) ;
129  plane.setB(B/norm) ;
130  plane.setC(C/norm) ;
131  plane.setD(D/norm) ;
132 }
133 
134 
146 void
147 buildLine(vpPoint &P1, vpPoint &P2, vpPoint &P3, vpPoint &P4, vpLine &L)
148 {
149  vpPlane plane1;
150  vpPlane plane2 ;
151  buildPlane(P1,P2,P3,plane1) ;
152  buildPlane(P1,P2,P4,plane2) ;
153 
154  L.setWorldCoordinates(plane1.getA(),plane1.getB(), plane1.getC(),plane1.getD(),
155  plane2.getA(),plane2.getB(), plane2.getC(),plane2.getD()) ;
156 }
157 
158 
165 void
167 {
168  line = new vpLine ;
169  poly.setNbPoint(2);
170  poly.addPoint(0, _p1);
171  poly.addPoint(1, _p2);
172 
173  p1 = &poly.p[0];
174  p2 = &poly.p[1];
175 
176  vpColVector V1(3);
177  vpColVector V2(3);
178  vpColVector V3(3);
179  vpColVector V4(3);
180 
181  V1[0] = p1->get_oX();
182  V1[1] = p1->get_oY();
183  V1[2] = p1->get_oZ();
184  V2[0] = p2->get_oX();
185  V2[1] = p2->get_oY();
186  V2[2] = p2->get_oZ();
187 
188  //if((V1-V2).sumSquare()!=0)
189  if(std::fabs((V1-V2).sumSquare()) > std::numeric_limits<double>::epsilon())
190  {
191  {
192  V3[0]=double(rand()%1000)/100;
193  V3[1]=double(rand()%1000)/100;
194  V3[2]=double(rand()%1000)/100;
195 
196 
197  vpColVector v_tmp1,v_tmp2;
198  v_tmp1 = V2-V1;
199  v_tmp2 = V3-V1;
200  V4=vpColVector::cross(v_tmp1,v_tmp2);
201  }
202 
203  vpPoint P3;
204  P3.setWorldCoordinates(V3[0],V3[1],V3[2]);
205  vpPoint P4;
206  P4.setWorldCoordinates(V4[0],V4[1],V4[2]);
207  buildLine(*p1,*p2, P3,P4, *line) ;
208  }
209  else
210  {
211  vpPoint P3;
212  P3.setWorldCoordinates(V1[0],V1[1],V1[2]);
213  vpPoint P4;
214  P4.setWorldCoordinates(V2[0],V2[1],V2[2]);
215  buildLine(*p1,*p2,P3,P4,*line) ;
216  }
217 }
218 
219 
225 void
227 {
228  me = _me ;
229  if (meline != NULL)
230  {
231  meline->setMe(me) ;
232  }
233 }
234 
235 
243 void
245 {
246  if(isvisible){
247  p1->changeFrame(cMo);
248  p2->changeFrame(cMo);
249 
250  if(poly.getClipping() > 3) // Contains at least one FOV constraint
251  cam.computeFov(I.getWidth(), I.getHeight());
252 
253  poly.computeRoiClipped(cam);
254 
255  if(poly.roiPointsClip.size() == 2){ //Les points sont visibles.
256  vpImagePoint ip1, ip2;
257  double rho,theta;
258  line->changeFrame(cMo);
259  line->projection();
260 
261  vpMeterPixelConversion::convertPoint(cam,poly.roiPointsClip[0].first.get_x(),poly.roiPointsClip[0].first.get_y(),ip1);
262  vpMeterPixelConversion::convertPoint(cam,poly.roiPointsClip[1].first.get_x(),poly.roiPointsClip[1].first.get_y(),ip2);
263 
264  //rho theta uv
266 
267  while (theta > M_PI) { theta -= M_PI ; }
268  while (theta < -M_PI) { theta += M_PI ; }
269 
270  if (theta < -M_PI/2.0) theta = -theta - 3*M_PI/2.0;
271  else theta = M_PI/2.0 - theta;
272 
273  meline = new vpMbtMeLine ;
274  meline->setMe(me) ;
275 
276  // meline->setDisplay(vpMeSite::RANGE_RESULT) ;
277  meline->setInitRange(0);
278 
279  int marge = /*10*/5; //ou 5 normalement
280  if (ip1.get_j()<ip2.get_j()) { meline->jmin = (int)ip1.get_j()-marge ; meline->jmax = (int)ip2.get_j()+marge ; } else{ meline->jmin = (int)ip2.get_j()-marge ; meline->jmax = (int)ip1.get_j()+marge ; }
281  if (ip1.get_i()<ip2.get_i()) { meline->imin = (int)ip1.get_i()-marge ; meline->imax = (int)ip2.get_i()+marge ; } else{ meline->imin = (int)ip2.get_i()-marge ; meline->imax = (int)ip1.get_i()+marge ; }
282 
283  try
284  {
285  meline->initTracking(I,ip1,ip2,rho,theta);
286  }
287  catch(...)
288  {
289  //vpTRACE("the line can't be initialized");
290  }
291  }
292  else{
293  if (meline!=NULL) delete meline;
294  meline=NULL;
295  isvisible = false;
296  }
297  }
298 // trackMovingEdge(I,cMo) ;
299 }
300 
301 
302 
309 void
311 {
312 
313  if (isvisible)
314  {
315 // p1->changeFrame(cMo) ;
316 // p2->changeFrame(cMo) ;
317 //
318 // p1->projection() ;
319 // p2->projection() ;
320 //
321 // vpImagePoint ip1, ip2;
322 //
323 // vpMeterPixelConversion::convertPoint(*cam,p1->get_x(),p1->get_y(),ip1) ;
324 // vpMeterPixelConversion::convertPoint(*cam,p2->get_x(),p2->get_y(),ip2) ;
325 //
326 // int marge = /*10*/5; //ou 5 normalement
327 // if (ip1.get_j()<ip2.get_j()) { meline->jmin = ip1.get_j()-marge ; meline->jmax = ip2.get_j()+marge ; }
328 // else{ meline->jmin = ip2.get_j()-marge ; meline->jmax = ip1.get_j()+marge ; }
329 // if (ip1.get_i()<ip2.get_i()) { meline->imin = ip1.get_i()-marge ; meline->imax = ip2.get_i()+marge ; }
330 // else{ meline->imin = ip2.get_i()-marge ; meline->imax = ip1.get_i()+marge ; }
331 
332  try
333  {
334  meline->track(I) ;
335  }
336  catch(...)
337  {
338  Reinit = true;
339  }
340  nbFeature =(unsigned int) meline->getMeList().size();
341  }
342 }
343 
344 
351 void
353 {
354  if(isvisible){
355  p1->changeFrame(cMo);
356  p2->changeFrame(cMo);
357 
358  if(poly.getClipping() > 3) // Contains at least one FOV constraint
359  cam.computeFov(I.getWidth(), I.getHeight());
360 
361  poly.computeRoiClipped(cam);
362 
363  if(poly.roiPointsClip.size() == 2){ //Les points sont visibles.
364  vpImagePoint ip1, ip2;
365  double rho,theta;
366  line->changeFrame(cMo);
367  line->projection();
368 
369  vpMeterPixelConversion::convertPoint(cam,poly.roiPointsClip[0].first.get_x(),poly.roiPointsClip[0].first.get_y(),ip1);
370  vpMeterPixelConversion::convertPoint(cam,poly.roiPointsClip[1].first.get_x(),poly.roiPointsClip[1].first.get_y(),ip2);
371 
372  //rho theta uv
374 
375  while (theta > M_PI) { theta -= M_PI ; }
376  while (theta < -M_PI) { theta += M_PI ; }
377 
378  if (theta < -M_PI/2.0) theta = -theta - 3*M_PI/2.0;
379  else theta = M_PI/2.0 - theta;
380 
381  int marge = /*10*/5; //ou 5 normalement
382  if (ip1.get_j()<ip2.get_j()) { meline->jmin = (int)ip1.get_j()-marge ; meline->jmax = (int)ip2.get_j()+marge ; } else{ meline->jmin = (int)ip2.get_j()-marge ; meline->jmax = (int)ip1.get_j()+marge ; }
383  if (ip1.get_i()<ip2.get_i()) { meline->imin = (int)ip1.get_i()-marge ; meline->imax = (int)ip2.get_i()+marge ; } else{ meline->imin = (int)ip2.get_i()-marge ; meline->imax = (int)ip1.get_i()+marge ; }
384 
385  try
386  {
387  //meline->updateParameters(I,rho,theta) ;
388  meline->updateParameters(I,ip1,ip2,rho,theta) ;
389  }
390  catch(...)
391  {
392  Reinit = true;
393  }
394  nbFeature = (unsigned int)meline->getMeList().size();
395  }
396  else{
397  if (meline!=NULL) delete meline;
398  meline=NULL;
399  isvisible = false;
400  }
401  }
402 }
403 
404 
413 void
415 {
416  if(meline!= NULL)
417  delete meline;
418 
419  initMovingEdge(I,cMo);
420 
421  Reinit = false;
422 }
423 
424 
435 void
437  const vpCameraParameters &camera, const vpColor col, const unsigned int thickness, const bool displayFullModel)
438 {
439  p1->changeFrame(cMo);
440  p2->changeFrame(cMo);
441 
442  if(isvisible || displayFullModel){
443  vpImagePoint ip1, ip2;
444  vpCameraParameters c = camera;
445  if(poly.getClipping() > 3) // Contains at least one FOV constraint
446  c.computeFov(I.getWidth(), I.getHeight());
447 
448  poly.computeRoiClipped(c);
449 
450  if( poly.roiPointsClip.size() == 2 &&
451  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::NEAR_CLIPPING) == 0) &&
452  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::FAR_CLIPPING) == 0) &&
453  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::DOWN_CLIPPING) == 0) &&
454  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::UP_CLIPPING) == 0) &&
455  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::LEFT_CLIPPING) == 0) &&
456  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::RIGHT_CLIPPING) == 0)){
457  vpMeterPixelConversion::convertPoint(cam,poly.roiPointsClip[0].first.get_x(),poly.roiPointsClip[0].first.get_y(),ip1);
458  vpMeterPixelConversion::convertPoint(cam,poly.roiPointsClip[1].first.get_x(),poly.roiPointsClip[1].first.get_y(),ip2);
459 
460  vpDisplay::displayLine(I,ip1,ip2,col, thickness);
461  }
462  }
463 }
464 
465 
476 void
478  const vpCameraParameters &camera, const vpColor col,
479  const unsigned int thickness, const bool displayFullModel)
480 {
481  p1->changeFrame(cMo);
482  p2->changeFrame(cMo);
483 
484  if(isvisible || displayFullModel){
485  vpImagePoint ip1, ip2;
486  vpCameraParameters c = camera;
487  if(poly.getClipping() > 3) // Contains at least one FOV constraint
488  c.computeFov(I.getWidth(), I.getHeight());
489 
490  poly.computeRoiClipped(c);
491 
492  if( poly.roiPointsClip.size() == 2 &&
493  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::NEAR_CLIPPING) == 0) &&
494  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::FAR_CLIPPING) == 0) &&
495  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::DOWN_CLIPPING) == 0) &&
496  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::UP_CLIPPING) == 0) &&
497  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::LEFT_CLIPPING) == 0) &&
498  ((poly.roiPointsClip[1].second & poly.roiPointsClip[0].second & vpMbtPolygon::RIGHT_CLIPPING) == 0)){
499  vpMeterPixelConversion::convertPoint(cam,poly.roiPointsClip[0].first.get_x(),poly.roiPointsClip[0].first.get_y(),ip1);
500  vpMeterPixelConversion::convertPoint(cam,poly.roiPointsClip[1].first.get_x(),poly.roiPointsClip[1].first.get_y(),ip2);
501 
502  vpDisplay::displayLine(I,ip1,ip2,col, thickness);
503  }
504  }
505 }
506 
507 
518 void
520 {
521  if (meline != NULL)
522  {
523  meline->display(I);
524  }
525 }
526 
530 void
532 {
533  if (isvisible == true)
534  {
535  L.resize((unsigned int)meline->getMeList().size(),6) ;
536  error.resize((unsigned int)meline->getMeList().size()) ;
537  nbFeature = (unsigned int)meline->getMeList().size() ;
538  }
539  else
540  nbFeature = 0 ;
541 }
542 
546 void
548 {
549 
550  if (isvisible)
551  {
552  // feature projection
553  line->changeFrame(cMo) ;
554  line->projection() ;
555 
556  vpFeatureBuilder::create(featureline,*line) ;
557 
558  double rho = featureline.getRho() ;
559  double theta = featureline.getTheta() ;
560 
561  double co = cos(theta);
562  double si = sin(theta);
563 
564  double mx = 1.0/cam.get_px() ;
565  double my = 1.0/cam.get_py() ;
566  double xc = cam.get_u0() ;
567  double yc = cam.get_v0() ;
568 
569  double alpha_ ;
570  vpMatrix H ;
571  H = featureline.interaction() ;
572 
573  double x,y ;
574  vpMeSite p ;
575  unsigned int j =0 ;
576  for(std::list<vpMeSite>::const_iterator it=meline->getMeList().begin(); it!=meline->getMeList().end(); ++it){
577  x = (double)it->j ;
578  y = (double)it->i ;
579 
580  x = (x-xc)*mx ;
581  y = (y-yc)*my ;
582 
583  alpha_ = x*si - y*co;
584 
585  double *Lrho = H[0] ;
586  double *Ltheta = H[1] ;
587  // Calculate interaction matrix for a distance
588  for (unsigned int k=0 ; k < 6 ; k++)
589  {
590  L[j][k] = (Lrho[k] + alpha_*Ltheta[k]);
591  }
592  error[j] = rho - ( x*co + y*si) ;
593  j++;
594  }
595  }
596 }
597 
605 bool
606 vpMbtDistanceLine::closeToImageBorder(const vpImage<unsigned char>& I, const unsigned int threshold)
607 {
608  if(threshold > I.getWidth() || threshold > I.getHeight()){
609  return true;
610  }
611  if (isvisible){
612 
613  for(std::list<vpMeSite>::const_iterator it=meline->getMeList().begin(); it!=meline->getMeList().end(); ++it){
614  int i = it->i ;
615  int j = it->j ;
616 
617  if(i < 0 || j < 0){ //out of image.
618  return true;
619  }
620 
621  if( ((unsigned int)i > (I.getHeight()- threshold) ) || (unsigned int)i < threshold ||
622  ((unsigned int)j > (I.getWidth ()- threshold) ) || (unsigned int)j < threshold ) {
623  return true;
624  }
625  }
626  }
627  return false;
628 }
Definition of the vpMatrix class.
Definition: vpMatrix.h:98
void setD(const double d)
Definition: vpPlane.h:96
double get_u0() const
vpLine * line
The 3D line.
void updateMovingEdge(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo)
double get_i() const
Definition: vpImagePoint.h:194
unsigned int getWidth() const
Definition: vpImage.h:159
unsigned int getClipping() const
Definition: vpMbtPolygon.h:135
bool Reinit
Indicates if the line has to be reinitialized.
static vpColVector cross(const vpColVector &a, const vpColVector &b)
Definition: vpColVector.h:153
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
void setWorldCoordinates(const double &A1, const double &B1, const double &C1, const double &D1, const double &A2, const double &B2, const double &C2, const double &D2)
Definition: vpLine.cpp:98
Performs search in a given direction(normal) for a given distance(pixels) for a given 'site'...
Definition: vpMeSite.h:76
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:125
void trackMovingEdge(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo)
void track(const vpImage< unsigned char > &I)
vpPoint * p1
The first extremity.
void displayMovingEdges(const vpImage< unsigned char > &I)
double get_oY() const
Get the point Y coordinate in the object frame.
Definition: vpPoint.h:129
Contains predetermined masks for sites and holds moving edges tracking parameters.
Definition: vpMe.h:70
double getRho() const
double get_py() const
Implementation of a line used by the model-based tracker.
Definition: vpMbtMeLine.h:62
void initTracking(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, double rho, double theta)
double getTheta() const
bool isvisible
Indicates if the line is visible or not.
double get_j() const
Definition: vpImagePoint.h:205
void display(const vpImage< unsigned char > &, vpColor)
Definition: vpMbtMeLine.h:80
unsigned int nbFeature
The number of moving edges.
Class that defines what is a point.
Definition: vpPoint.h:65
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)
double getTheta() const
Definition: vpLine.h:166
std::vector< std::pair< vpPoint, unsigned int > > roiPointsClip
Region of interest clipped.
Definition: vpMbtPolygon.h:97
double getRho() const
Definition: vpLine.h:177
void addPoint(const unsigned int n, const vpPoint &P)
Class that defines a line in the object frame, the camera frame and the image plane. All the parameters must be set in meter.
Definition: vpLine.h:124
void reinitMovingEdge(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo)
void updateParameters(const vpImage< unsigned char > &I, double rho, double theta)
double get_v0() const
vpPoint * p2
The second extremity.
void setInitRange(const unsigned int &r)
Definition: vpMeTracker.h:126
vpColVector error
The error vector.
Generic class defining intrinsic camera parameters.
double get_oZ() const
Get the point Z coordinate in the object frame.
Definition: vpPoint.h:131
void setA(const double a)
Definition: vpPlane.h:90
vpMatrix interaction(const unsigned int select=FEATURE_ALL)
void computeRoiClipped(const vpCameraParameters &cam=vpCameraParameters())
std::list< vpMeSite > & getMeList()
Definition: vpMeTracker.h:161
void projection()
Definition: vpLine.cpp:216
void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &cP)
Definition: vpLine.cpp:366
double get_px() const
void setC(const double c)
Definition: vpPlane.h:94
static void convertLine(const vpCameraParameters &cam, const double &rho_m, const double &theta_m, double &rho_p, double &theta_p)
line coordinates conversion (rho,theta)
double get_oX() const
Get the point X coordinate in the object frame.
Definition: vpPoint.h:127
bool closeToImageBorder(const vpImage< unsigned char > &I, const unsigned int threshold)
int j
Definition: vpMeSite.h:98
Class that provides a data structure for the column vectors as well as a set of operations on these v...
Definition: vpColVector.h:72
void setMovingEdge(vpMe *Me)
void computeInteractionMatrixError(const vpHomogeneousMatrix &cMo)
double getB() const
Definition: vpPlane.h:113
void setB(const double b)
Definition: vpPlane.h:92
double getA() const
Definition: vpPlane.h:111
unsigned int getHeight() const
Definition: vpImage.h:150
double getC() const
Definition: vpPlane.h:115
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
Definition: vpImagePoint.h:92
virtual void displayLine(const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1)=0
This class defines the container for a plane geometrical structure.
Definition: vpPlane.h:67
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
void setMe(vpMe *p_me)
Definition: vpMeTracker.h:140
void changeFrame(const vpHomogeneousMatrix &cMo, vpColVector &_cP)
Definition: vpPoint.cpp:150
void initMovingEdge(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo)
virtual void setNbPoint(const unsigned int nb)
vpMbtMeLine * meline
The moving edge container.
void buildFrom(vpPoint &_p1, vpPoint &_p2)
double getD() const
Definition: vpPlane.h:117
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 computeFov(const unsigned int &w, const unsigned int &h)
vpPoint * p
corners in the object frame
Definition: vpMbtPolygon.h:95