Jafar
|
This is the main class for detection segments in an image. More...
This is the main class for detection segments in an image.
It uses a Hierarchical approach.
Definition at line 16 of file HierarchicalDirectSegmentsDetector.hpp.
#include <HierarchicalDirectSegmentsDetector.hpp>
Public Member Functions | |
HierarchicalDirectSegmentsDetector (kernel::IdFactory<> *_idMaker=0) | |
void | detectSegment (const jafar::image::Image &_image, const image::ConvexRoi *roiPtr, SegmentsSet &segmentStorage, SegmentDebug *_sdebug=0) |
Start detection of segments in an image. | |
void | detectSegment (PyramidSP *pyramid, const jafar::image::Image &_image, const image::ConvexRoi *roiPtr, SegmentsSet &segmentStorage, SegmentDebug *_sdebug=0) |
PyramidSP * | computePyramid (const jafar::image::Image &_image) |
Protected Member Functions | |
virtual void | detectedSegment (SegmentHypothesis *, DirectSegmentsDetectorBase::LoopDetectionContext *_context, GrowSegmentContext &) |
Define the number of levels of the pyramid (minimum is 1, default is 3). | |
virtual bool | isInASegment (DirectSegmentsDetectorBase::LoopDetectionContext *_context, int _x, int _y) |
Private Member Functions | |
void | detectSegmentAtScale (SegmentHypothesis *segHyp, DirectSegmentsDetectorBase::LoopDetectionContext *_context, int level) |
Detect segment at a given scale using an hypothesis coming from a different level. | |
SegmentHypothesis * | findSegHyp (const jblas::vec2 &_center, double angle, std::vector< GrowSegmentContext > &hyps, int _level, DirectSegmentsDetectorBase::LoopDetectionContext *_context, double *grads, double scaledMinLength2) |
Find a segment hypothesis around _center . | |
void | updateIntervals (SegmentHypothesis *_segHyp, const Interval &_currentInterval, std::list< Interval > &_intervals, int _level, const jblas::vec2 &_center, const jblas::vec2 &_dir, double _scaledMinLength) |
Private Attributes | |
PyramidSP * | m_pyramidSP |
int | m_topToBottomScale |
void jafar::dseg::HierarchicalDirectSegmentsDetector::detectSegment | ( | const jafar::image::Image & | _image, |
const image::ConvexRoi * | roiPtr, | ||
SegmentsSet & | segmentStorage, | ||
SegmentDebug * | _sdebug = 0 |
||
) |
Start detection of segments in an image.
_image | image on which to makes the detection |
segmentStorage | storage that will be filled with newly extracted segment, if there are segments in the storage before calling this function, then the dector will avoid segment detection on the already existing segments (the detection can be called after tracking, and tracked segments won't be detected again). |
SegmentDebug | collect some debug information |
void jafar::dseg::HierarchicalDirectSegmentsDetector::detectSegmentAtScale | ( | SegmentHypothesis * | segHyp, |
DirectSegmentsDetectorBase::LoopDetectionContext * | _context, | ||
int | level | ||
) | [private] |
Detect segment at a given scale using an hypothesis coming from a different level.
segHyp | is the hypothesis at level level - 1 |
level | is the pyramid level |
This function will repeatively called itself until level
== 0
Generated on Wed Oct 15 2014 00:37:34 for Jafar by doxygen 1.7.6.1 |