|
Fawkes API
Fawkes Development Version
|
Gradient classifier. More...
#include <>>

Public Member Functions | |
| GradientClassifier (std::list< ScanlineGrid * > *scanlines, Qualifier *q, unsigned int threshold, unsigned int max_size=0, bool use_rising_flank=true, bool use_falling_flank=true) | |
| Constructor. | |
| virtual | ~GradientClassifier () |
| Destructor. | |
| virtual std::list< ROI > * | classify () |
| Classify image. | |
| virtual void | set_src_buffer (unsigned char *yuv422_planar, unsigned int width, unsigned int height) |
| Set source buffer. | |
| virtual void | set_threshold (unsigned int threshold, unsigned int max_size=0) |
| Threshold setter. | |
| virtual void | set_edges (bool use_rising_edge, bool use_falling_edge) |
| Edge setter. | |
Public Member Functions inherited from firevision::Classifier | |
| Classifier (const char *name) | |
| Constructor. | |
| virtual | ~Classifier () |
| Destructor. | |
| virtual const char * | name () const |
| Get name of classifier. | |
Additional Inherited Members | |
Protected Attributes inherited from firevision::Classifier | |
| unsigned char * | _src |
| Source buffer, encoded as YUV422_PLANAR. | |
| unsigned int | _width |
| Width in pixels of _src buffer. | |
| unsigned int | _height |
| Height in pixels of _src buffer. | |
Gradient classifier.
Uses the difference of the current and the last value.
Definition at line 36 of file gradient.h.
| firevision::GradientClassifier::GradientClassifier | ( | std::list< ScanlineGrid * > * | scanlines, |
| Qualifier * | q, | ||
| unsigned int | threshold, | ||
| unsigned int | max_size = 0, |
||
| bool | use_rising_flank = true, |
||
| bool | use_falling_flank = true |
||
| ) |
Constructor.
| scanlines | list of scanline models (Does only work with ScanlineGrid) |
| q | Qualifier for a single pixel (The qualifier gets deleted by this class) |
| threshold | minimum rise required for classification |
| max_size | of an object to be detected (if 0 value will be ignored) |
| use_rising_flank | if true the classification can start on a rising flank |
| use_falling_flank | if true the classification can start on a falling flank |
Definition at line 51 of file gradient.cpp.
References set_edges(), and set_threshold().
|
virtual |
Destructor.
Definition at line 72 of file gradient.cpp.
|
virtual |
Classify image.
The current buffer is processed and scanned for the features the classifier has been written and initialized for. It returns a list of disjunct regions of interest.
Implements firevision::Classifier.
Definition at line 121 of file gradient.cpp.
References firevision::Qualifier::get(), firevision::Qualifier::get_buffer(), firevision::ROI::pixel_step, firevision::ROI::set_height(), firevision::ROI::set_pixel_step(), firevision::ROI::set_start(), firevision::ROI::set_width(), firevision::ROI::start, fawkes::point_t::x, and fawkes::point_t::y.
|
virtual |
Edge setter.
| use_rising_edge | if true the classification can start on a rising edge |
| use_falling_edge | if true the classification can start on a falling edge |
Definition at line 98 of file gradient.cpp.
Referenced by GradientClassifier().
|
virtual |
Set source buffer.
| yuv422_planar | a YUV422 planar buffer with the source image to classify. The classifier may NOT modify the image in any way. If that is required the classifier shall make a copy of the image. |
| width | width of buffer in pixels |
| height | height of buffer in pixels |
Reimplemented from firevision::Classifier.
Definition at line 112 of file gradient.cpp.
References firevision::Qualifier::set_buffer().
|
virtual |
Threshold setter.
| threshold | minimum rise required for classification |
| max_size | of an object to be detected (if 0 value will not be set) |
Definition at line 83 of file gradient.cpp.
Referenced by GradientClassifier().