Segment.h
Go to the documentation of this file.
00001 #ifndef SEGMENT_H
00002 #define SEGMENT_H
00003 
00004 #include <cmath>
00005 #include <vector>
00006 
00007 namespace AprilTags {
00008 
00010 class Segment {
00011 public:
00012   Segment();
00013 
00014   static int const minimumSegmentSize = 4; 
00015   static float const minimumLineLength; 
00016 
00017   float getX0() const { return x0; }
00018   void setX0(float newValue) { x0 = newValue; }
00019 
00020   float getY0() const { return y0; }
00021   void setY0(float newValue) { y0 = newValue; }
00022 
00023   float getX1() const { return x1; }
00024   void setX1(float newValue) { x1 = newValue; }
00025 
00026   float getY1() const { return y1; }
00027   void setY1(float newValue) { y1 = newValue; }
00028 
00029   float getTheta() const { return theta; }
00030   void setTheta(float newValue) { theta = newValue; }
00031 
00032   float getLength() const { return length; }
00033   void setLength(float newValue) { length = newValue; }
00034 
00036   float segmentLength();
00037 
00039   void printSegment();
00040 
00042   int getId() const { return segmentId; }
00043 
00044   std::vector<Segment*> children;
00045 
00046 private:
00047   float x0, y0, x1, y1;
00048   float theta; // gradient direction (points towards white)
00049   float length; // length of line segment in pixels
00050   int segmentId;
00051   static int idCounter;
00052 };
00053 
00054 } // namsepace
00055 
00056 #endif


apriltags
Author(s): Michael Kaess, Hordur Johannson
autogenerated on Thu Jun 6 2019 20:53:23