Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
imageprocessor.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2011 LpzRobots development team *
3  * Georg Martius <georg dot martius at web dot de> *
4  * Frank Guettler <guettler at informatik dot uni-leipzig dot de *
5  * Frank Hesse <frank at nld dot ds dot mpg dot de> *
6  * Ralf Der <ralfder at mis dot mpg dot de> *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22  * *
23  ***************************************************************************/
24 #ifndef __IMAGEPROCESSOR
25 #define __IMAGEPROCESSOR
26 
27 #include <osg/Image>
28 #include "camera.h"
29 
30 namespace lpzrobots {
31 
32  /**
33  Base class for image processing units.
34  The result of a processing is an image (returned by init)
35  The source for processing can be any image from previous
36  units. An implemenation must store the pointers to the source(s)
37  and must also hold a destination image.
38  */
39  struct ImageProcessor {
41  virtual ~ImageProcessor() {};
42 
43  /**
44  initialization with all images so far. The last image in the list
45  is probably the one to use for processing. (output from last processor)
46  @return result image structure of this processor
47  */
48  virtual Camera::CameraImage init(const Camera::CameraImages& imgs) = 0;
49 
50  /// perform the image calculation here
51  virtual void process() = 0;
52 
53  };
54 
55 }
56 
57 #endif
std::vector< CameraImage > CameraImages
Definition: camera.h:91
structure to store the image data and information for display
Definition: camera.h:80
ImageProcessor()
Definition: imageprocessor.h:40
virtual Camera::CameraImage init(const Camera::CameraImages &imgs)=0
initialization with all images so far.
Base class for image processing units.
Definition: imageprocessor.h:39
virtual ~ImageProcessor()
Definition: imageprocessor.h:41
virtual void process()=0
perform the image calculation here