49 #ifndef vpMbEdgeTracker_HH
50 #define vpMbEdgeTracker_HH
52 #include <visp/vpPoint.h>
53 #include <visp/vpMbTracker.h>
54 #include <visp/vpMe.h>
55 #include <visp/vpMbtMeLine.h>
56 #include <visp/vpMbtDistanceLine.h>
57 #include <visp/vpMbtDistanceCylinder.h>
58 #include <visp/vpXmlParser.h>
65 #if defined(VISP_HAVE_COIN)
67 #include <Inventor/nodes/SoSeparator.h>
68 #include <Inventor/VRMLnodes/SoVRMLIndexedFaceSet.h>
69 #include <Inventor/VRMLnodes/SoVRMLIndexedLineSet.h>
70 #include <Inventor/VRMLnodes/SoVRMLCoordinate.h>
71 #include <Inventor/actions/SoWriteAction.h>
72 #include <Inventor/actions/SoSearchAction.h>
73 #include <Inventor/misc/SoChildList.h>
74 #include <Inventor/actions/SoGetMatrixAction.h>
75 #include <Inventor/actions/SoGetPrimitiveCountAction.h>
76 #include <Inventor/actions/SoToVRML2Action.h>
77 #include <Inventor/VRMLnodes/SoVRMLGroup.h>
78 #include <Inventor/VRMLnodes/SoVRMLShape.h>
81 #ifdef VISP_HAVE_OPENCV
82 # if VISP_HAVE_OPENCV_VERSION >= 0x020101
83 # include <opencv2/core/core.hpp>
84 # include <opencv2/imgproc/imgproc.hpp>
85 # include <opencv2/imgproc/imgproc_c.h>
91 #ifdef VISP_BUILD_DEPRECATED_FUNCTIONS
92 # include <visp/vpList.h>
282 std::vector< std::list< vpMbtDistanceLine*> >
lines;
284 std::vector< std::list< vpMbtDistanceCylinder*> >
cylinders;
308 std::vector< const vpImage<unsigned char>* >
Ipyramid;
328 const vpColor& col ,
const unsigned int thickness=1,
const bool displayFullModel =
false);
330 const vpColor& col ,
const unsigned int thickness=1,
const bool displayFullModel =
false);
342 void getLline(std::list<vpMbtDistanceLine *>& linesList,
const unsigned int level = 0);
343 void getLcylinder(std::list<vpMbtDistanceCylinder *>& cylindersList,
const unsigned int level = 0);
352 unsigned int getNbPoints(
const unsigned int level=0);
353 unsigned int getNbPolygon();
365 void loadModel(
const std::string &cad_name);
407 for (
unsigned int i = 0; i < scales.size(); i += 1){
409 for(std::list<vpMbtDistanceLine*>::const_iterator it=lines[i].begin(); it!=lines[i].end(); ++it){
410 (*it)->setCameraParameters(cam);
413 for(std::list<vpMbtDistanceCylinder*>::const_iterator it=cylinders[i].begin(); it!=cylinders[i].end(); ++it){
414 (*it)->setCameraParameters(cam);
448 inline void setLambda(
const double lambda) {this->lambda = lambda;}
450 void setMovingEdge(
const vpMe &me);
452 virtual void setOgreVisibilityTest(
const bool &v);
456 void setScales(
const std::vector<bool>& _scales);
461 void addCylinder(
const vpPoint &P1,
const vpPoint &P2,
const double r,
const std::string& name =
"");
462 void addLine(
vpPoint &p1,
vpPoint &p2,
int polygone = -1, std::string name =
"");
466 void downScale(
const unsigned int _scale);
469 virtual void initFaceFromCorners(
const std::vector<vpPoint>& _corners,
const unsigned int _indexFace = -1);
472 void reInitLevel(
const unsigned int _lvl);
474 void removeCylinder(
const std::string& name);
475 void removeLine(
const std::string& name);
479 void upScale(
const unsigned int _scale);