Fawkes API  Fawkes Development Version
classifier.h
1 
2 /***************************************************************************
3  * classifier.h - Abstract class defining a (color) classifier
4  *
5  * Created: Tue May 03 19:50:02 2005
6  * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef _FIREVISION_CLASSIFIERS_CLASSIFIER_H_
25 #define _FIREVISION_CLASSIFIERS_CLASSIFIER_H_
26 
27 #include <fvutils/base/roi.h>
28 
29 #include <list>
30 
31 namespace firevision {
32 
33 typedef std::list<ROI> ROIList;
34 
36 {
37 public:
38  Classifier(const char *name);
39  virtual ~Classifier();
40 
41  virtual void
42  set_src_buffer(unsigned char *yuv422_planar, unsigned int width, unsigned int height);
43  virtual const char *name() const;
44 
45  virtual ROIList *classify() = 0;
46 
47 protected:
48  /** Source buffer, encoded as YUV422_PLANAR */
49  unsigned char *_src;
50  /** Width in pixels of _src buffer */
51  unsigned int _width;
52  /** Height in pixels of _src buffer */
53  unsigned int _height;
54 
55 private:
56  char *name_;
57 };
58 
59 } // end namespace firevision
60 
61 #endif
firevision::Classifier
Classifier to extract regions of interest.
Definition: classifier.h:36
firevision::Classifier::~Classifier
virtual ~Classifier()
Destructor.
Definition: classifier.cpp:60
firevision::Classifier::_height
unsigned int _height
Height in pixels of _src buffer.
Definition: classifier.h:53
firevision::Classifier::_width
unsigned int _width
Width in pixels of _src buffer.
Definition: classifier.h:51
firevision::Classifier::Classifier
Classifier(const char *name)
Constructor.
Definition: classifier.cpp:51
firevision::Classifier::classify
virtual ROIList * classify()=0
Classify image.
firevision::Classifier::_src
unsigned char * _src
Source buffer, encoded as YUV422_PLANAR.
Definition: classifier.h:49
firevision::Classifier::set_src_buffer
virtual void set_src_buffer(unsigned char *yuv422_planar, unsigned int width, unsigned int height)
Set source buffer.
Definition: classifier.cpp:73
firevision::Classifier::name
virtual const char * name() const
Get name of classifier.
Definition: classifier.cpp:84