Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
SegmentHypothesis.hpp
00001 /* $Id$ */
00002 
00003 #ifndef _SEGMENTS_HYPOTHESIS_H_
00004 #define _SEGMENTS_HYPOTHESIS_H_
00005 
00006 #include "jmath/jblas.hpp"
00007 
00008 namespace jafar {
00009   namespace dseg {
00010     class LineFitterKalman2;
00011     class SegmentHypothesisDebug;
00012     class GradientStatsDescriptor;
00013     class GradientsDescriptor;
00018     class SegmentHypothesis {
00019       friend class SegmentsSet;
00020       public:
00021         SegmentHypothesis(double x_o, double y_o, double angle_o);
00022         SegmentHypothesis(const SegmentHypothesis& _hyp);
00023         ~SegmentHypothesis();
00031         void addPoint(double _t, double _x, double _y, double _angle, double sigmaPx);
00032         const jblas::vec2& lineParameters() const;
00033         void dump(bool _verbose) const;
00038         int countPoints() const;
00043         void setExtremity1(double _x1, double _y1);
00044         double x1() const;
00045         double y1() const;
00046         double t1() const;
00051         void setExtremity2(double _x2, double _y2);
00052         double x2() const;
00053         double y2() const;
00054         double t2() const;
00058         double squareLength() const;
00059         void merge(const SegmentHypothesis& rhs);
00060         const LineFitterKalman2& lineFitter() const;
00061         unsigned int id() const;
00062         void setId( unsigned int _id );
00063         const SegmentHypothesisDebug* segmentHypothesisDebug() const;
00064         SegmentHypothesisDebug* segmentHypothesisDebug();
00065         void setSegmentHypothesisDebug( SegmentHypothesisDebug* );
00066         bool isCompatible( const SegmentHypothesis& ) const;
00067         void setUncertainty( double sigma_u, double sigma_x0, double sigma_v, double sigma_y0 );
00068         GradientStatsDescriptor& gradientDescriptor();
00069         const GradientStatsDescriptor& gradientDescriptor() const;
00070         void setGradientDescriptor(const GradientStatsDescriptor& descriptor);
00071         void setDescriptor( GradientsDescriptor* _descriptor );
00072         const GradientsDescriptor* descriptor( ) const;
00076         void applyScale(double v);
00080         void computeTMinMax( double& _tMin, double& _tMax ) const;
00081       private: // Used for memory management purpose in SegmentSet
00082         void incRef();
00083         void decRef();
00084         bool isRef();
00085       private:
00086         void solve() const;
00087       private:
00088         struct Private;
00089         Private* const d;
00090     };
00091   }
00092 }
00093 
00094 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:18 for Jafar by doxygen 1.7.6.1
LAAS-CNRS