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 
32 namespace firevision {
33 
34 class ROI;
35 
36 class Shape
37 {
38 public:
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 {
47 public:
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
firevision::Shape::setMargin
virtual void setMargin(unsigned int margin)=0
Set margin around shape.
firevision::ShapeModel::getShape
virtual Shape * getShape(int id) const =0
Get specific shape.
firevision::ROI
Region of interest.
Definition: roi.h:55
firevision::ShapeModel::getMostLikelyShape
virtual Shape * getMostLikelyShape(void) const =0
Get best candidate.
firevision::ShapeModel
Shape model interface.
Definition: shapemodel.h:46
firevision::ShapeModel::~ShapeModel
virtual ~ShapeModel()
Virtual empty destructor.
Definition: shapemodel.cpp:79
firevision::Shape::isClose
virtual bool isClose(unsigned int in_roi_x, unsigned int in_roi_y)=0
Check if the given point is close to the shape.
firevision::Shape
Shape interface.
Definition: shapemodel.h:37
firevision::ShapeModel::parseImage
virtual int parseImage(unsigned char *buffer, ROI *roi)=0
Parse image for given ROI.
firevision::Shape::~Shape
virtual ~Shape()
Virtual empty destructor.
Definition: shapemodel.cpp:46
firevision::ShapeModel::getName
virtual std::string getName(void) const =0
Get name of shape model.
firevision::ShapeModel::getShapeCount
virtual int getShapeCount(void) const =0
Get number of shapes.