00001
00002
00003 #ifndef _DSEG_GRADIENTS_DESCRIPTOR_HPP_
00004 #define _DSEG_GRADIENTS_DESCRIPTOR_HPP_
00005
00006 #include <jmath/jblas.hpp>
00007
00008 namespace jafar {
00009 namespace image {
00010 class Image;
00011 }
00012 namespace dseg {
00013 class SegmentHypothesis;
00014 class GradientsDescriptor {
00015 public:
00016 GradientsDescriptor( const SegmentHypothesis& _segHyp, const image::Image& _dx, const image::Image& _dy );
00017 ~GradientsDescriptor();
00018 double comparison( const GradientsDescriptor* _rhs, bool verbose = false ) const;
00019 void dump();
00020 private:
00021 void fillHisto( const image::Image& _dx, const image::Image& _dy, double* _histo, const jblas::vec2& _startPoint, const jblas::vec2& _direction, double _lineAngle, int _length, double _coef );
00022 private:
00023 int m_count;
00024 int m_subdescriptorsCount;
00025 int m_total;
00026 double* m_topHisto;
00027 double* m_bottomHisto;
00028 };
00029 }
00030 }
00031
00032 #endif