Image Component Library (ICL)
OpenCVCamGrabber.h
Go to the documentation of this file.
1 /********************************************************************
2 ** Image Component Library (ICL) **
3 ** **
4 ** Copyright (C) 2006-2013 CITEC, University of Bielefeld **
5 ** Neuroinformatics Group **
6 ** Website: www.iclcv.org and **
7 ** http://opensource.cit-ec.de/projects/icl **
8 ** **
9 ** File : ICLIO/src/ICLIO/OpenCVCamGrabber.h **
10 ** Module : ICLIO **
11 ** Authors: Christian Groszewski, Christof Elbrechter, Viktor **
12 ** Richter **
13 ** **
14 ** **
15 ** GNU LESSER GENERAL PUBLIC LICENSE **
16 ** This file may be used under the terms of the GNU Lesser General **
17 ** Public License version 3.0 as published by the **
18 ** **
19 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
20 ** included in the packaging of this file. Please review the **
21 ** following information to ensure the license requirements will **
22 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
23 ** **
24 ** The development of this software was supported by the **
25 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
26 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
27 ** Forschungsgemeinschaft (DFG) in the context of the German **
28 ** Excellence Initiative. **
29 ** **
30 ********************************************************************/
31 
32 #pragma once
33 #include <ICLUtils/CompatMacros.h>
34 #include <ICLCore/OpenCV.h>
35 #include <ICLIO/Grabber.h>
36 #include <ICLUtils/Exception.h>
37 #include <ICLUtils/Mutex.h>
38 
39 #ifdef ICL_HAVE_OPENCV
40 #ifdef ICL_HAVE_OPENCV_OLD_STYLE
41 #include <opencv/highgui.h>
42 #include <opencv/cxcore.h>
43 #else
44 #include <opencv2/highgui/highgui_c.h>
45 #include <opencv/cxcore.h>
46 #endif
47 #endif
48 namespace icl{
49  namespace io{
50 
53  private:
55  CvCapture *cvc;
57  int device;
62  public:
63 
65 
66  virtual const core::ImgBase *acquireImage();
67 
69  void processPropertyChange(const utils::Configurable::Property &prop);
70 
72 
85  OpenCVCamGrabber(int dev=0) ;
86 
89 
90  // returns a list of all valid device IDs
97  static const std::vector<GrabberDeviceDescription> &getDeviceList(std::string hint, bool rescan);
99  };
100 
101  } // namespace io
102 }
103 
undocument this line if you encounter any issues!
Definition: Any.h:37
core::ImgBase * m_buffer
Buffer for imagescaling.
Definition: OpenCVCamGrabber.h:61
CvCapture * cvc
Wrapped Device struct.
Definition: OpenCVCamGrabber.h:55
utils::Mutex m_mutex
Definition: OpenCVCamGrabber.h:59
int device
number of device
Definition: OpenCVCamGrabber.h:57
#define ICLIO_API
Definition: CompatMacros.h:176
Common interface class for all grabbers.
Definition: Grabber.h:153
Grabber class that uses OpenCV's grabbing function to grab camera images.
Definition: OpenCVCamGrabber.h:52
Represents a single property.
Definition: Configurable.h:200
Mutex class of the ICL.
Definition: Mutex.h:54
ImgBase is the Image-Interface class that provides save access to underlying Img-template .
Definition: ImgBase.h:131