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
31namespace firevision {
32
33typedef std::list<ROI> ROIList;
34
36{
37public:
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
47protected:
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
55private:
56 char *name_;
57};
58
59} // end namespace firevision
60
61#endif
Classifier to extract regions of interest.
Definition: classifier.h:36
unsigned int _height
Height in pixels of _src buffer.
Definition: classifier.h:53
virtual ROIList * classify()=0
Classify image.
virtual void set_src_buffer(unsigned char *yuv422_planar, unsigned int width, unsigned int height)
Set source buffer.
Definition: classifier.cpp:73
unsigned char * _src
Source buffer, encoded as YUV422_PLANAR.
Definition: classifier.h:49
Classifier(const char *name)
Constructor.
Definition: classifier.cpp:51
unsigned int _width
Width in pixels of _src buffer.
Definition: classifier.h:51
virtual const char * name() const
Get name of classifier.
Definition: classifier.cpp:84
virtual ~Classifier()
Destructor.
Definition: classifier.cpp:60