firevision::GradientClassifier Class Reference

Gradient classifier. More...

#include <classifiers/gradient.h>

Inheritance diagram for firevision::GradientClassifier:
Inheritance graph
[legend]

List of all members.

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.

Detailed Description

Gradient classifier.

Uses the difference of the current and the last value.

Definition at line 36 of file gradient.h.


Constructor & Destructor Documentation

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.

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 51 of file gradient.cpp.

References set_edges(), and set_threshold().

firevision::GradientClassifier::~GradientClassifier (  )  [virtual]

Destructor.

Definition at line 72 of file gradient.cpp.


Member Function Documentation

std::list< ROI > * firevision::GradientClassifier::classify (  )  [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.

Returns:
disjunct list of extracted regions of interest

Implements firevision::Classifier.

Definition at line 121 of file gradient.cpp.

References firevision::ScanlineGrid::finished(), firevision::Qualifier::get(), firevision::Qualifier::get_buffer(), firevision::ROI::pixel_step, firevision::ScanlineGrid::reset(), 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.

void firevision::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 98 of file gradient.cpp.

Referenced by GradientClassifier().

void firevision::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 firevision::Classifier.

Definition at line 112 of file gradient.cpp.

References firevision::Qualifier::set_buffer().

void firevision::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 83 of file gradient.cpp.

Referenced by GradientClassifier().


The documentation for this class was generated from the following files:

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1