GradientClassifier Class Reference
Gradient classifier. More...
#include <classifiers/gradient.h>

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 () |
| Performs the classification. | |
| 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. | |
Detailed Description
Gradient classifier.Uses the difference of the current and the last value.
Definition at line 32 of file gradient.h.
Constructor & Destructor Documentation
| 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.
- Parameters:
-
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 46 of file gradient.cpp.
References set_edges(), and set_threshold().
| GradientClassifier::~GradientClassifier | ( | ) | [virtual] |
Member Function Documentation
| std::list< ROI > * GradientClassifier::classify | ( | ) | [virtual] |
Performs the classification.
Implements Classifier.
Definition at line 118 of file gradient.cpp.
References ScanlineGrid::finished(), Qualifier::get(), Qualifier::get_buffer(), ROI::pixel_step, ScanlineGrid::reset(), ROI::set_height(), ROI::set_pixel_step(), ROI::set_start(), ROI::set_width(), ROI::start, fawkes::point_t::x, and fawkes::point_t::y.
| void GradientClassifier::set_edges | ( | bool | use_rising_edge, | |
| bool | use_falling_edge | |||
| ) | [virtual] |
Edge setter.
- Parameters:
-
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 93 of file gradient.cpp.
Referenced by GradientClassifier().
| void GradientClassifier::set_src_buffer | ( | unsigned char * | yuv422_planar, | |
| unsigned int | width, | |||
| unsigned int | height | |||
| ) | [virtual] |
Set source buffer.
- Parameters:
-
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 Classifier.
Definition at line 107 of file gradient.cpp.
References Qualifier::set_buffer().
| void GradientClassifier::set_threshold | ( | unsigned int | threshold, | |
| unsigned int | max_size = 0 | |||
| ) | [virtual] |
Threshold setter.
- Parameters:
-
threshold minimum rise required for classification max_size of an object to be detected (if 0 value will not be set)
Definition at line 78 of file gradient.cpp.
Referenced by GradientClassifier().
The documentation for this class was generated from the following files:
- src/firevision/classifiers/gradient.h
- src/firevision/classifiers/gradient.cpp

