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. More... | |
virtual | ~GradientClassifier () |
Destructor. More... | |
virtual std::list< ROI > * | classify () |
Classify image. More... | |
virtual void | set_src_buffer (unsigned char *yuv422_planar, unsigned int width, unsigned int height) |
Set source buffer. More... | |
virtual void | set_threshold (unsigned int threshold, unsigned int max_size=0) |
Threshold setter. More... | |
virtual void | set_edges (bool use_rising_edge, bool use_falling_edge) |
Edge setter. More... | |
![]() | |
Classifier (const char *name) | |
Constructor. More... | |
virtual | ~Classifier () |
Destructor. More... | |
virtual const char * | name () const |
Get name of classifier. More... | |
Additional Inherited Members | |
![]() | |
unsigned char * | _src |
Source buffer, encoded as YUV422_PLANAR. More... | |
unsigned int | _width |
Width in pixels of _src buffer. More... | |
unsigned int | _height |
Height in pixels of _src buffer. More... | |
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::upoint_t::x, and fawkes::upoint_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(), and firevision::Classifier::set_src_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().