00001
00002
00003 #ifndef _DIRECT_SEGMENTS_DETECTOR_BASE_H_
00004 #define _DIRECT_SEGMENTS_DETECTOR_BASE_H_
00005
00006 #include <dseg/DirectSegmentsBase.hpp>
00007 #include <kernel/jafarMacro.hpp>
00008 #include <image/Image.hpp>
00009 #include <image/roi.hpp>
00010 #include <kernel/IdFactory.hpp>
00011
00012 namespace jafar {
00013
00014
00015
00016
00017
00018 namespace dseg {
00023 class DirectSegmentsDetectorBase : public DirectSegmentsBase {
00024 public:
00025 DirectSegmentsDetectorBase(kernel::IdFactory<>* _idMaker);
00026 virtual ~DirectSegmentsDetectorBase();
00031 JFR_DEFINE_PARAM_RW( bool, adaptativeStep, setAdaptativeStep )
00032 JFR_DEFINE_PARAM_RW( bool, mergeSegment, setMergeSegment )
00033 JFR_DEFINE_PARAM_RW( bool, computeDescriptor, setComputeDescriptor )
00034 protected:
00035 class LoopDetectionContext;
00036 void loopDetect( LoopDetectionContext* _context, double _minimumSegmentLengthScale);
00037 virtual void detectedSegment( SegmentHypothesis*, LoopDetectionContext* _context, GrowSegmentContext&) = 0;
00038 protected:
00039 unsigned int nextId();
00040 virtual bool isInASegment( LoopDetectionContext* _context, int _x, int _y );
00041 private:
00042 double m_qualityThresholdPow2;
00043 kernel::IdFactory<>* m_idMaker;
00044 bool m_ownIdMaker;
00045 };
00046 }
00047 }
00048
00049
00050 #endif