Fawkes API Fawkes Development Version
shapemodel.h
1
2/***************************************************************************
3 * shapemodel.h - Abstract class defining a shape model
4 *
5 * Created: Tue May 03 19:50:02 2005
6 * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7 * 2005 Martin Heracles <Martin.Heracles@rwth-aachen.de>
8 * 2005 Hu Yuxiao <Yuxiao.Hu@rwth-aachen.de>
9 *
10 ****************************************************************************/
11
12/* This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version. A runtime exception applies to
16 * this software (see LICENSE.GPL_WRE file mentioned below for details).
17 *
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Library General Public License for more details.
22 *
23 * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
24 */
25
26#ifndef _FIREVISION_MODELS_SHAPE_SHAPEMODEL_H_
27#define _FIREVISION_MODELS_SHAPE_SHAPEMODEL_H_
28
29#include <string>
30#include <vector>
31
32namespace firevision {
33
34class ROI;
35
36class Shape
37{
38public:
39 virtual ~Shape();
40
41 virtual void setMargin(unsigned int margin) = 0;
42 virtual bool isClose(unsigned int in_roi_x, unsigned int in_roi_y) = 0;
43};
44
46{
47public:
48 virtual ~ShapeModel();
49 virtual std::string getName(void) const = 0;
50 virtual int parseImage(unsigned char *buffer, ROI *roi) = 0;
51 virtual int getShapeCount(void) const = 0;
52 virtual Shape * getShape(int id) const = 0;
53 virtual Shape * getMostLikelyShape(void) const = 0;
54};
55
56} // end namespace firevision
57
58#endif
Region of interest.
Definition: roi.h:55
Shape model interface.
Definition: shapemodel.h:46
virtual ~ShapeModel()
Virtual empty destructor.
Definition: shapemodel.cpp:79
virtual std::string getName(void) const =0
Get name of shape model.
virtual int parseImage(unsigned char *buffer, ROI *roi)=0
Parse image for given ROI.
virtual int getShapeCount(void) const =0
Get number of shapes.
virtual Shape * getMostLikelyShape(void) const =0
Get best candidate.
virtual Shape * getShape(int id) const =0
Get specific shape.
Shape interface.
Definition: shapemodel.h:37
virtual void setMargin(unsigned int margin)=0
Set margin around shape.
virtual bool isClose(unsigned int in_roi_x, unsigned int in_roi_y)=0
Check if the given point is close to the shape.
virtual ~Shape()
Virtual empty destructor.
Definition: shapemodel.cpp:46