ViSP  2.6.2
vpMbtDistanceCylinder.cpp
1 /****************************************************************************
2  *
3  * $Id: vpMbtDistanceCylinder.cpp 3672 2012-04-04 15:49:57Z ayol $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2012 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  * Description:
34  * Make the complete tracking of an object by using its CAD model. Cylinder
35  * tracking.
36  *
37  * Authors:
38  * Nicolas Melchior
39  * Romain Tallonneau
40  * Eric Marchand
41  * Bertrand Delabarre
42  *
43  *****************************************************************************/
44 
45 #include <visp/vpConfig.h>
46 
47 #ifndef DOXYGEN_SHOULD_SKIP_THIS
48 
54 #include <visp/vpMbtDistanceCylinder.h>
55 #include <visp/vpPlane.h>
56 #include <visp/vpMeterPixelConversion.h>
57 #include <visp/vpPixelMeterConversion.h>
58 #include <visp/vpFeatureBuilder.h>
59 #include <visp/vpFeatureEllipse.h>
60 #include <stdlib.h>
61 #include <algorithm>
62 
63 #include <visp/vpPose.h>
64 
68 vpMbtDistanceCylinder::vpMbtDistanceCylinder()
69 {
70  name = "";
71  p1 = NULL ;
72  p2 = NULL ;
73  c = NULL ;
74  meline1 = NULL ;
75  meline2 = NULL ;
76  wmean1 = 1 ;
77  wmean2 = 1 ;
78  nbFeaturel1 =0 ;
79  nbFeaturel2 =0 ;
80  nbFeature =0 ;
81  Reinit = false;
82 
83  cercle1 = NULL;
84  cercle2 = NULL;
85 }
86 
90 vpMbtDistanceCylinder::~vpMbtDistanceCylinder()
91 {
92 // cout << "Deleting cylinder " << index << endl ;
93 
94  if (p1 != NULL) delete p1 ;
95  if (p2 != NULL) delete p2 ;
96  if (c != NULL) delete c ;
97  if (meline1 != NULL) delete meline1 ;
98  if (meline2 != NULL) delete meline2 ;
99  if (cercle1 != NULL) delete cercle1 ;
100  if (cercle2 != NULL) delete cercle2 ;
101 }
102 
108 void
109 vpMbtDistanceCylinder::project(const vpHomogeneousMatrix &cMo)
110 {
111  c->project(cMo) ;
112  p1->project(cMo) ;
113  p2->project(cMo) ;
114  cercle1->project(cMo) ;
115  cercle2->project(cMo) ;
116 }
117 
118 
126 void
127 vpMbtDistanceCylinder::buildFrom(const vpPoint &_p1, const vpPoint &_p2, const double r)
128 {
129  c = new vpCylinder ;
130  p1 = new vpPoint ;
131  p2 = new vpPoint ;
132  cercle1 = new vpCircle;
133  cercle2 = new vpCircle;
134 
135  // Get the points
136  *p1 = _p1;
137  *p2 = _p2;
138 
139  // Get the radius
140  radius = r;
141 
142  vpColVector ABC(3);
143  vpColVector V1(3);
144  vpColVector V2(3);
145 
146  V1[0] = _p1.get_oX();
147  V1[1] = _p1.get_oY();
148  V1[2] = _p1.get_oZ();
149  V2[0] = _p2.get_oX();
150  V2[1] = _p2.get_oY();
151  V2[2] = _p2.get_oZ();
152 
153  // Get the axis of the cylinder
154  ABC = V1-V2;
155 
156  // Build our extremity circles
157  cercle1->setWorldCoordinates(ABC[0],ABC[1],ABC[2],_p1.get_oX(),_p1.get_oY(),_p1.get_oZ(),r);
158  cercle2->setWorldCoordinates(ABC[0],ABC[1],ABC[2],_p2.get_oX(),_p2.get_oY(),_p2.get_oZ(),r);
159 
160  // Build our cylinder
161  c->setWorldCoordinates(ABC[0],ABC[1],ABC[2],(_p1.get_oX()+_p2.get_oX())/2.0,(_p1.get_oY()+_p2.get_oY())/2.0,(_p1.get_oZ()+_p2.get_oZ())/2.0,r);
162 }
163 
164 
170 void
171 vpMbtDistanceCylinder::setMovingEdge(vpMe *_me)
172 {
173  me = _me ;
174  if (meline1 != NULL)
175  {
176  meline1->setMe(me) ;
177  }
178  if (meline2 != NULL)
179  {
180  meline2->setMe(me) ;
181  }
182 }
183 
194 void
195 vpMbtDistanceCylinder::getCylinderLineExtremity(double &i, double &j,double rho, double theta,
196  vpCircle *circle)
197 {
198 // This was taken from the code of art-v1. (from the artCylinder class)
199  double px = cam.get_px() ;
200  double py = cam.get_py() ;
201  double u0 = cam.get_u0() ;
202  double v0 = cam.get_v0() ;
203 
204  double mu11 = circle->p[3];
205  double mu02 = circle->p[4];
206  double mu20 = circle->p[2];
207  double Xg = u0 + circle->p[0]*px;
208  double Yg = v0 + circle->p[1]*py;
209 
210  // Find Intersection between line and ellipse in the image.
211 
212  // Optimised calculation for X
213  double stheta = sin(theta);
214  double ctheta = cos(theta);
215  double sctheta = stheta*ctheta;
216  double m11yg = mu11*Yg;
217  double ctheta2 = vpMath::sqr(ctheta);
218  double m02xg = mu02*Xg;
219  double m11stheta = mu11*stheta;
220  j = ((mu11*Xg*sctheta-mu20*Yg*sctheta+mu20*rho*ctheta
221  -m11yg+m11yg*ctheta2+m02xg-m02xg*ctheta2+
222  m11stheta*rho)/(mu20*ctheta2+2.0*m11stheta*ctheta
223  +mu02-mu02*ctheta2));
224  //Optimised calculation for Y
225  double rhom02 = rho*mu02;
226  double sctheta2 = stheta*ctheta2;
227  double ctheta3 = ctheta2*ctheta;
228  i = (-(-rho*mu11*stheta*ctheta-rhom02+rhom02*ctheta2
229  +mu11*Xg*sctheta2-mu20*Yg*sctheta2-ctheta*mu11*Yg
230  +ctheta3*mu11*Yg+ctheta*mu02*Xg-ctheta3*mu02*Xg)/
231  (mu20*ctheta2+2.0*mu11*stheta*ctheta+mu02-
232  mu02*ctheta2)/stheta);
233 
234 }
235 
236 
244 void
245 vpMbtDistanceCylinder::initMovingEdge(const vpImage<unsigned char> &I, const vpHomogeneousMatrix &cMo)
246 {
247  // Perspective projection
248  p1->changeFrame(cMo);
249  p2->changeFrame(cMo);
250  cercle1->changeFrame(cMo);
251  cercle2->changeFrame(cMo);
252  c->changeFrame(cMo);
253 
254  p1->projection();
255  p2->projection();
256  try{
257  cercle1->projection();
258  }
259  catch(...){std::cout<<"Problem when projecting circle 1\n";}
260  try{
261  cercle2->projection();
262  }
263  catch(...){std::cout<<"Problem when projecting circle 2\n";}
264  c->projection();
265 
266  double rho1,theta1;
267  double rho2,theta2;
268 
269 // Create the moving edges containers
270  meline1 = new vpMbtMeLine ;
271  meline1->setMe(me) ;
272  meline2 = new vpMbtMeLine ;
273  meline2->setMe(me) ;
274 
275 // meline->setDisplay(vpMeSite::RANGE_RESULT) ;
276  meline1->setInitRange(0);
277  meline2->setInitRange(0);
278 
279  // Conversion meter to pixels
280  vpMeterPixelConversion::convertLine(cam,c->getRho1(),c->getTheta1(),rho1,theta1);
281  vpMeterPixelConversion::convertLine(cam,c->getRho2(),c->getTheta2(),rho2,theta2);
282 
283  // Determine intersections between circles and limbos
284  double i11,i12,i21,i22,j11,j12,j21,j22;
285  getCylinderLineExtremity(i11, j11, rho1, theta1, cercle1);
286  getCylinderLineExtremity(i12, j12, rho1, theta1, cercle2);
287  getCylinderLineExtremity(i21, j21, rho2, theta2, cercle1);
288  getCylinderLineExtremity(i22, j22, rho2, theta2, cercle2);
289 
290  // Create the image points
291  vpImagePoint ip11,ip12,ip21,ip22;
292  ip11.set_ij(i11,j11);
293  ip12.set_ij(i12,j12);
294  ip21.set_ij(i21,j21);
295  ip22.set_ij(i22,j22);
296 
297  // update limits of the melines.
298  int marge = /*10*/5; //ou 5 normalement
299  if (ip11.get_j()<ip12.get_j()) { meline1->jmin = (int)ip11.get_j()-marge ; meline1->jmax = (int)ip12.get_j()+marge ; } else{ meline1->jmin = (int)ip12.get_j()-marge ; meline1->jmax = (int)ip11.get_j()+marge ; }
300  if (ip11.get_i()<ip12.get_i()) { meline1->imin = (int)ip11.get_i()-marge ; meline1->imax = (int)ip12.get_i()+marge ; } else{ meline1->imin = (int)ip12.get_i()-marge ; meline1->imax = (int)ip11.get_i()+marge ; }
301 
302  if (ip21.get_j()<ip22.get_j()) { meline2->jmin = (int)ip21.get_j()-marge ; meline2->jmax = (int)ip22.get_j()+marge ; } else{ meline2->jmin = (int)ip22.get_j()-marge ; meline2->jmax = (int)ip21.get_j()+marge ; }
303  if (ip21.get_i()<ip22.get_i()) { meline2->imin = (int)ip21.get_i()-marge ; meline2->imax = (int)ip22.get_i()+marge ; } else{ meline2->imin = (int)ip22.get_i()-marge ; meline2->imax = (int)ip21.get_i()+marge ; }
304 
305  // Initialize the tracking
306  try
307  {
308  meline1->initTracking(I,ip11,ip12,rho1,theta1);
309  }
310  catch(...)
311  {
312  vpTRACE("the line can't be initialized");
313  }
314  try
315  {
316  meline2->initTracking(I,ip21,ip22,rho2,theta2);
317  }
318  catch(...)
319  {
320  vpTRACE("the line can't be initialized");
321  }
322 }
323 
324 
325 
332 void
333 vpMbtDistanceCylinder::trackMovingEdge(const vpImage<unsigned char> &I, const vpHomogeneousMatrix & /*cMo*/)
334 {
335  try
336  {
337  meline1->track(I) ;
338  }
339  catch(...)
340  {
341  std::cout << "Track meline1 failed" << std::endl;
342  Reinit = true;
343  }
344  try
345  {
346  meline2->track(I) ;
347  }
348  catch(...)
349  {
350  std::cout << "Track meline2 failed" << std::endl;
351  Reinit = true;
352  }
353 
354  // Update the number of features
355  nbFeaturel1 = meline1->getMeList().size();
356  nbFeaturel2 = meline2->getMeList().size();
357  nbFeature = meline1->getMeList().size()+meline2->getMeList().size();
358 }
359 
360 
367 void
368 vpMbtDistanceCylinder::updateMovingEdge(const vpImage<unsigned char> &I, const vpHomogeneousMatrix &cMo)
369 {
370  // Perspective projection
371  p1->changeFrame(cMo);
372  p2->changeFrame(cMo);
373  cercle1->changeFrame(cMo);
374  cercle2->changeFrame(cMo);
375  c->changeFrame(cMo);
376 
377  p1->projection();
378  p2->projection();
379  try{
380  cercle1->projection();
381  }
382  catch(...){std::cout<<"Probleme projection cercle 1\n";}
383  try{
384  cercle2->projection();
385  }
386  catch(...){std::cout<<"Probleme projection cercle 2\n";}
387  c->projection();
388 
389  // Get the limbos
390  double rho1,theta1;
391  double rho2,theta2;
392 
393  // Conversion meter to pixels
394  vpMeterPixelConversion::convertLine(cam,c->getRho1(),c->getTheta1(),rho1,theta1);
395  vpMeterPixelConversion::convertLine(cam,c->getRho2(),c->getTheta2(),rho2,theta2);
396 
397  // Determine intersections between circles and limbos
398  double i11,i12,i21,i22,j11,j12,j21,j22;
399 
400  getCylinderLineExtremity(i11, j11, rho1, theta1, cercle1);
401  getCylinderLineExtremity(i12, j12, rho1, theta1, cercle2);
402 
403  getCylinderLineExtremity(i21, j21, rho2, theta2, cercle1);
404  getCylinderLineExtremity(i22, j22, rho2, theta2, cercle2);
405 
406  // Create the image points
407  vpImagePoint ip11,ip12,ip21,ip22;
408  ip11.set_ij(i11,j11);
409  ip12.set_ij(i12,j12);
410  ip21.set_ij(i21,j21);
411  ip22.set_ij(i22,j22);
412 
413  // update limits of the meline.
414  int marge = /*10*/5; //ou 5 normalement
415  if (ip11.get_j()<ip12.get_j()) { meline1->jmin = (int)ip11.get_j()-marge ; meline1->jmax = (int)ip12.get_j()+marge ; } else{ meline1->jmin = (int)ip12.get_j()-marge ; meline1->jmax = (int)ip11.get_j()+marge ; }
416  if (ip11.get_i()<ip12.get_i()) { meline1->imin = (int)ip11.get_i()-marge ; meline1->imax = (int)ip12.get_i()+marge ; } else{ meline1->imin = (int)ip12.get_i()-marge ; meline1->imax = (int)ip11.get_i()+marge ; }
417 
418  if (ip21.get_j()<ip22.get_j()) { meline2->jmin = (int)ip21.get_j()-marge ; meline2->jmax = (int)ip22.get_j()+marge ; } else{ meline2->jmin = (int)ip22.get_j()-marge ; meline2->jmax = (int)ip21.get_j()+marge ; }
419  if (ip21.get_i()<ip22.get_i()) { meline2->imin = (int)ip21.get_i()-marge ; meline2->imax = (int)ip22.get_i()+marge ; } else{ meline2->imin = (int)ip22.get_i()-marge ; meline2->imax = (int)ip21.get_i()+marge ; }
420 
421  try
422  {
423  //meline1->updateParameters(I,rho1,theta1) ;
424  meline1->updateParameters(I,ip11,ip12,rho1,theta1) ;
425  }
426  catch(...)
427  {
428  Reinit = true;
429  }
430  try
431  {
432  //meline2->updateParameters(I,rho2,theta2) ;
433  meline2->updateParameters(I,ip21,ip22,rho2,theta2) ;
434  }
435  catch(...)
436  {
437  Reinit = true;
438  }
439 
440  // Update the numbers of features
441  nbFeaturel1 = meline1->getMeList().size();
442  nbFeaturel2 = meline2->getMeList().size();
443  nbFeature = meline1->getMeList().size()+meline2->getMeList().size();
444 }
445 
446 
455 void
456 vpMbtDistanceCylinder::reinitMovingEdge(const vpImage<unsigned char> &I, const vpHomogeneousMatrix &cMo)
457 {
458  if(meline1!= NULL)
459  delete meline1;
460  if(meline2!= NULL)
461  delete meline2;
462 
463  meline1 = NULL;
464  meline2 = NULL;
465 
466  initMovingEdge(I,cMo);
467 
468  Reinit = false;
469 }
470 
471 
481 void
482 vpMbtDistanceCylinder::display(const vpImage<unsigned char>&I, const vpHomogeneousMatrix &cMo, const vpCameraParameters&cam, const vpColor col, const unsigned int thickness)
483 {
484  // Perspective projection
485  p1->changeFrame(cMo);
486  p2->changeFrame(cMo);
487  cercle1->changeFrame(cMo);
488  cercle2->changeFrame(cMo);
489  c->changeFrame(cMo);
490 
491  p1->projection();
492  p2->projection();
493  try{
494  cercle1->projection();
495  }
496  catch(...){std::cout<<"Problem projection circle 1";}
497  try{
498  cercle2->projection();
499  }
500  catch(...){std::cout<<"Problem projection circle 2";}
501  c->projection();
502 
503  double rho1,theta1;
504  double rho2,theta2;
505 
506  // Meters to pixels conversion
507  vpMeterPixelConversion::convertLine(cam,c->getRho1(),c->getTheta1(),rho1,theta1);
508  vpMeterPixelConversion::convertLine(cam,c->getRho2(),c->getTheta2(),rho2,theta2);
509 
510  // Determine intersections between circles and limbos
511  double i11,i12,i21,i22,j11,j12,j21,j22;
512 
513  getCylinderLineExtremity(i11, j11, rho1, theta1, cercle1);
514  getCylinderLineExtremity(i12, j12, rho1, theta1, cercle2);
515 
516  getCylinderLineExtremity(i21, j21, rho2, theta2, cercle1);
517  getCylinderLineExtremity(i22, j22, rho2, theta2, cercle2);
518 
519  // Create the image points
520  vpImagePoint ip11,ip12,ip21,ip22;
521  ip11.set_ij(i11,j11);
522  ip12.set_ij(i12,j12);
523  ip21.set_ij(i21,j21);
524  ip22.set_ij(i22,j22);
525 
526  // Display
527  vpDisplay::displayLine(I,ip11,ip12,col, thickness);
528  vpDisplay::displayLine(I,ip21,ip22,col, thickness);
529 }
530 
540 void
541 vpMbtDistanceCylinder::display(const vpImage<vpRGBa>&I, const vpHomogeneousMatrix &cMo, const vpCameraParameters&cam, const vpColor col, const unsigned int thickness)
542 {
543  // Perspective projection
544  p1->changeFrame(cMo);
545  p2->changeFrame(cMo);
546  cercle1->changeFrame(cMo);
547  cercle2->changeFrame(cMo);
548  c->changeFrame(cMo);
549 
550  p1->projection();
551  p2->projection();
552  try{
553  cercle1->projection();
554  }
555  catch(...){std::cout<<"Problem projection circle 1";}
556  try{
557  cercle2->projection();
558  }
559  catch(...){std::cout<<"Problem projection circle 2";}
560  c->projection();
561 
562  double rho1,theta1;
563  double rho2,theta2;
564 
565  // Meters to pixels conversion
566  vpMeterPixelConversion::convertLine(cam,c->getRho1(),c->getTheta1(),rho1,theta1);
567  vpMeterPixelConversion::convertLine(cam,c->getRho2(),c->getTheta2(),rho2,theta2);
568 
569  // Determine intersections between circles and limbos
570  double i11,i12,i21,i22,j11,j12,j21,j22;
571 
572  getCylinderLineExtremity(i11, j11, rho1, theta1, cercle1);
573  getCylinderLineExtremity(i12, j12, rho1, theta1, cercle2);
574 
575  getCylinderLineExtremity(i21, j21, rho2, theta2, cercle1);
576  getCylinderLineExtremity(i22, j22, rho2, theta2, cercle2);
577 
578  // Create the image points
579  vpImagePoint ip11,ip12,ip21,ip22;
580  ip11.set_ij(i11,j11);
581  ip12.set_ij(i12,j12);
582  ip21.set_ij(i21,j21);
583  ip22.set_ij(i22,j22);
584 
585  // Display
586  vpDisplay::displayLine(I,ip11,ip12,col, thickness);
587  vpDisplay::displayLine(I,ip21,ip22,col, thickness);
588 }
589 
590 
601 void
602 vpMbtDistanceCylinder::displayMovingEdges(const vpImage<unsigned char> &I)
603 {
604  if (meline1 != NULL)
605  {
606  meline1->display(I);
607  }
608  if (meline2 != NULL)
609  {
610  meline2->display(I);
611  }
612 }
613 
617 void
618 vpMbtDistanceCylinder::initInteractionMatrixError()
619 {
620  L.resize(meline1->getMeList().size()+meline2->getMeList().size(),6) ;
621  error.resize(meline1->getMeList().size()+meline2->getMeList().size()) ;
622  nbFeaturel1 = meline1->getMeList().size();
623  nbFeaturel2 = meline2->getMeList().size();
624  nbFeature = meline1->getMeList().size()+meline2->getMeList().size() ;
625 }
626 
630 void
631 vpMbtDistanceCylinder::computeInteractionMatrixError(const vpHomogeneousMatrix &cMo, const vpImage<unsigned char> &I)
632 {
633  // Perspective projection
634  c->changeFrame(cMo) ;
635  c->projection() ;
636  cercle1->changeFrame(cMo) ;
637  cercle1->changeFrame(cMo) ;
638  try{
639  cercle1->projection();
640  }
641  catch(...){std::cout<<"Problem projection circle 1\n";}
642  try{
643  cercle2->projection();
644  }
645  catch(...){std::cout<<"Problem projection circle 2\n";}
646 
647  bool disp = false;
648  bool disp2 = false;
649  if (disp || disp2) vpDisplay::flush(I);
650 
651  // Build the lines
654 
655  double rho1 = featureline1.getRho() ;
656  double theta1 = featureline1.getTheta() ;
657  double rho2 = featureline2.getRho() ;
658  double theta2 = featureline2.getTheta() ;
659 
660  double co1 = cos(theta1);
661  double si1 = sin(theta1);
662  double co2 = cos(theta2);
663  double si2 = sin(theta2);
664 
665  double mx = 1.0/cam.get_px() ;
666  double my = 1.0/cam.get_py() ;
667  double xc = cam.get_u0() ;
668  double yc = cam.get_v0() ;
669 
670  double alpha1 ;
671  vpMatrix H1 ;
672  H1 = featureline1.interaction() ;
673  double alpha2 ;
674  vpMatrix H2 ;
675  H2 = featureline2.interaction() ;
676 
677  double x,y ;
678  vpMeSite p ;
679  unsigned int j =0 ;
680  for(std::list<vpMeSite>::const_iterator it=meline1->getMeList().begin(); it!=meline1->getMeList().end(); ++it){
681  x = (double)it->j;
682  y = (double)it->i;
683 
684  x = (x-xc)*mx ;
685  y = (y-yc)*my ;
686 
687  alpha1 = x*si1 - y*co1;
688 
689  double *Lrho = H1[0] ;
690  double *Ltheta = H1[1] ;
691  // Calculate interaction matrix for a distance
692  for (unsigned int k=0 ; k < 6 ; k++){
693  L[j][k] = (Lrho[k] + alpha1*Ltheta[k]);
694  }
695  error[j] = rho1 - ( x*co1 + y*si1) ;
696 
697  if (disp) vpDisplay::displayCross(I, it->i, it->j, (unsigned int)(error[j]*100), vpColor::orange,1);
698 
699  j++;
700  }
701 
702  for(std::list<vpMeSite>::const_iterator it=meline2->getMeList().begin(); it!=meline2->getMeList().end(); ++it){
703  x = (double)it->j;
704  y = (double)it->i;
705 
706  x = (x-xc)*mx ;
707  y = (y-yc)*my ;
708 
709  alpha2 = x*si2 - y*co2;
710 
711  double *Lrho = H2[0] ;
712  double *Ltheta = H2[1] ;
713  // Calculate interaction matrix for a distance
714  for (unsigned int k=0 ; k < 6 ; k++){
715  L[j][k] = (Lrho[k] + alpha2*Ltheta[k]);
716  }
717  error[j] = rho2 - ( x*co2 + y*si2) ;
718 
719  if (disp) vpDisplay::displayCross(I, it->i, it->j, (unsigned int)(error[j]*100),vpColor::red,1);
720 
721  j++;
722  }
723 }
724 
725 #endif
726 
Definition of the vpMatrix class.
Definition: vpMatrix.h:96
double get_u0() const
double get_i() const
Definition: vpImagePoint.h:181
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
#define vpTRACE
Definition: vpDebug.h:401
Performs search in a given direction(normal) for a given distance(pixels) for a given 'site'...
Definition: vpMeSite.h:76
Class to define colors available for display functionnalities.
Definition: vpColor.h:123
double get_oY() const
Get the point Y coordinate in the object frame.
Definition: vpPoint.h:136
Contains predetermined masks for sites and holds moving edges tracking parameters.
Definition: vpMe.h:70
double get_py() const
static void flush(const vpImage< unsigned char > &I)
Definition: vpDisplay.cpp:1964
double get_j() const
Definition: vpImagePoint.h:192
static const vpColor red
Definition: vpColor.h:165
Class that defines what is a point.
Definition: vpPoint.h:65
static const vpColor orange
Definition: vpColor.h:175
double get_v0() const
void set_ij(const double i, const double j)
Definition: vpImagePoint.h:167
static double sqr(double x)
Definition: vpMath.h:106
virtual void displayCross(const vpImagePoint &ip, unsigned int size, const vpColor &color, unsigned int thickness=1)=0
Generic class defining intrinsic camera parameters.
double get_oZ() const
Get the point Z coordinate in the object frame.
Definition: vpPoint.h:138
double get_px() const
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:134
Class that defines what is a cylinder.
Definition: vpCylinder.h:97
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
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
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
Class that defines what is a circle.
Definition: vpCircle.h:61
vpColVector p
Definition: vpTracker.h:78