Image Component Library (ICL)
DCGrabber.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/DCGrabber.h **
10 ** Module : ICLIO **
11 ** Authors: Christof Elbrechter, Michael Goetting, Viktor Richter **
12 ** **
13 ** **
14 ** GNU LESSER GENERAL PUBLIC LICENSE **
15 ** This file may be used under the terms of the GNU Lesser General **
16 ** Public License version 3.0 as published by the **
17 ** **
18 ** Free Software Foundation and appearing in the file LICENSE.LGPL **
19 ** included in the packaging of this file. Please review the **
20 ** following information to ensure the license requirements will **
21 ** be met: http://www.gnu.org/licenses/lgpl-3.0.txt **
22 ** **
23 ** The development of this software was supported by the **
24 ** Excellence Cluster EXC 277 Cognitive Interaction Technology. **
25 ** The Excellence Cluster EXC 277 is a grant of the Deutsche **
26 ** Forschungsgemeinschaft (DFG) in the context of the German **
27 ** Excellence Initiative. **
28 ** **
29 ********************************************************************/
30 
31 #pragma once
32 
33 
34 #include <ICLIO/DC.h>
35 #include <ICLIO/DCDevice.h>
36 #include <ICLIO/DCDeviceFeatures.h>
37 #include <ICLIO/DCDeviceOptions.h>
38 #include <ICLIO/Grabber.h>
39 #include <ICLCore/Converter.h>
40 
41 namespace icl{
42  namespace io{
44  namespace dc{
45  class DCGrabberThread;
46  }
50 
87  class DCGrabber : public Grabber{
88  public:
89 
91 
104  ICLIO_API DCGrabber(const DCDevice &dev=DCDevice::null, int isoMBits=0);
105 
108 
110 
111  ICLIO_API virtual const core::ImgBase *acquireImage();
112 
114  ICLIO_API static std::vector<DCDevice> getDCDeviceList(bool resetBusFirst=false);
115 
117  static void dc1394_reset_bus(bool verbose=false){
119  }
120 
122  ICLIO_API virtual std::vector<std::string> get_io_property_list();
123 
124  private:
126 
129  void restartGrabberThread();
131  void addProperties();
134 
137 
140 
143 
146 
149 
151 
154 
157 
160  };
161 
162  } // namespace io
163 }
164 
undocument this line if you encounter any issues!
Definition: Any.h:37
static const DCDevice null
static null device (m_poCam is null)
Definition: DCDevice.h:63
core::Converter m_oConverter
Internally used image converter.
Definition: DCGrabber.h:153
utils::Mutex m_GrabberThreadMutex
Mutex for clean restarting of GrabberThread.
Definition: DCGrabber.h:145
ICLIO_API DCGrabber(const DCDevice &dev=DCDevice::null, int isoMBits=0)
Constructor creates a new DCGrabber instance from a given DCDevice.
void addProperties()
adds DCGrabbers properties to Configurable.
static void dc1394_reset_bus(bool verbose=false)
calls dc1394_reset_bus functions (see DCDevice)
Definition: DCGrabber.h:117
Utility struct for DC Camera device options.
Definition: DCDeviceOptions.h:39
Grabber implementation for handling DC-Devices using libdc1394 (Version >= 2.0.rc9) .
Definition: DCGrabber.h:87
core::ImgBase * m_poImage
Internally used buffer images.
Definition: DCGrabber.h:148
virtual ICLIO_API const core::ImgBase * acquireImage()
grab function grabs an image (destination image is adapted on demand)
dc::DCGrabberThread * m_poGT
Wrapped DCGrabberThread struct.
Definition: DCGrabber.h:142
std::string m_sUserDefinedBayerPattern
only for unknown device types
Definition: DCGrabber.h:159
void restartGrabberThread()
internally used function to restart the DCGrabberThread
#define ICLIO_API
Definition: CompatMacros.h:176
Common interface class for all grabbers.
Definition: Grabber.h:153
virtual ICLIO_API std::vector< std::string > get_io_property_list()
filters out the size property, as it is set by the core::format property
Internally spawned thread class to provide continuous grabbing without drop frames.
Definition: DCGrabberThread.h:90
DCDeviceOptions m_oOptions
Internal DCDeviceOptions struct.
Definition: DCGrabber.h:156
Device struct, used by the DCGrabber class to identify devices.
Definition: DCDevice.h:49
ICLIO_API ~DCGrabber()
Destructor.
DCDeviceFeatures m_oDeviceFeatures
Features corrsponding to m_oDev.
Definition: DCGrabber.h:139
General Image Converter.
Definition: Converter.h:49
DCDevice m_oDev
Wrapped DCDevice struct.
Definition: DCGrabber.h:136
void processPropertyChange(const utils::Configurable::Property &p)
callback function for property changes.
Represents a single property.
Definition: Configurable.h:200
core::ImgBase * m_poImageTmp
Definition: DCGrabber.h:148
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
Utility class for handling DC-Device features.
Definition: DCDeviceFeatures.h:94
static ICLIO_API std::vector< DCDevice > getDCDeviceList(bool resetBusFirst=false)
Returns a list of all connected DCDevices.
static void dc1394_reset_bus(bool verbose=false)
save version to call dc1394_reset_bus (after call all other cams become useless)