Robot Devastation
ProcessorImageEventListener.hpp
1 // Authors: see AUTHORS.md at project root.
2 // CopyPolicy: released under the terms of the LGPLv2.1, see LICENSE at project root.
3 // URL: https://github.com/asrob-uc3m/robotDevastation
4 
5 #ifndef __RD_PROCESSOR_IMAGE_EVENT_LISTENER_HPP__
6 #define __RD_PROCESSOR_IMAGE_EVENT_LISTENER_HPP__
7 
8 #include <string>
9 
10 #include <zbar.h>
11 
12 #include "ImageManager.hpp"
13 #include "ImageEventListener.hpp"
14 #include "MentalMap.hpp"
15 
16 namespace rd
17 {
18 
29 {
30  public:
32  virtual ~ProcessorImageEventListener();
33 
34  virtual bool onImageArrived( ImageManager * manager );
35 
36 
37  private:
38  bool isInteger(const std::string & s) const;
39  Image received_image;
40 
41  int cameraWidth;
42  int cameraHeight;
43  bool cameraInitialized;
44  unsigned char* rimage;
45 
46  zbar::ImageScanner scanner;
47 
48  MentalMap* mentalMap;
49 };
50 
51 } // namespace rd
52 
53 #endif // __RD_PROCESSOR_IMAGE_EVENT_LISTENER_HPP__
rd::MentalMap
Mental map is a repository for information about the players, targets and weapons.
Definition: MentalMap.hpp:38
rd::ImageEventListener
Interface for objects that can be notified of events related to images.
Definition: ImageEventListener.hpp:21
rd
The main, catch-all namespace for Robot Devastation.
Definition: groups.dox:4
rd::ProcessorImageEventListener
ProcessorImageEventListener used for processing.
Definition: ProcessorImageEventListener.hpp:28
rd::ProcessorImageEventListener::onImageArrived
virtual bool onImageArrived(ImageManager *manager)
This function will be called whenever a image arrives to the ImageManager.
Definition: ProcessorImageEventListener.cpp:41
rd::ImageManager
Generic image input manager.
Definition: ImageManager.hpp:39