KinectGrabber.hpp
Go to the documentation of this file.
1 
28 /*
29  * KinecGrabber.h
30  *
31  * Created on: 20.03.2012
32  * Author: Thomas Wiemann
33  */
34 
35 #ifndef KINECGRABBER_H_
36 #define KINECGRABBER_H_
37 
38 #include "lvr2/io/PointBuffer.hpp"
39 #include "libfreenect.hpp"
40 
41 #include <boost/thread.hpp"
42 #include <vector>
43 
44 namespace lvr2
45 {
46 
47 class KinectGrabber : public Freenect::FreenectDevice
48 {
49 public:
50  KinectGrabber(freenect_context *_ctx, int _index);
51  virtual ~KinectGrabber();
52 
54  void getDepthImage(std::vector<short> &img);
55  void getColorImage(std::vector<uint8_t> &img);
56 
57 protected:
58  virtual void VideoCallback(void* data, uint32_t timestamp);
59  virtual void DepthCallback(void* data, uint32_t timestamp);
60 
63 
65  boost::mutex m_depthMutex;
66 
68  boost::mutex m_colorMutex;
69 
71  std::vector<short> m_depthImage;
72 
74  std::vector<uint8_t> m_colorImage;
75 
76  bool m_haveData;
77 
78 };
79 
80 } // namespace lvr2
81 
82 #endif /* KINECGRABBER_H_ */
lvr2::KinectGrabber::m_haveData
bool m_haveData
Definition: KinectGrabber.hpp:76
lvr2::KinectGrabber::m_colorImage
std::vector< uint8_t > m_colorImage
The raw color image.
Definition: KinectGrabber.hpp:74
lvr2::PointBufferPtr
std::shared_ptr< PointBuffer > PointBufferPtr
Definition: PointBuffer.hpp:130
lvr2::KinectGrabber::~KinectGrabber
virtual ~KinectGrabber()
Definition: KinectGrabber.cpp:99
lvr2::KinectGrabber::DepthCallback
virtual void DepthCallback(void *data, uint32_t timestamp)
Definition: KinectGrabber.cpp:87
PointBuffer.hpp
lvr2::KinectGrabber::m_buffer
PointBufferPtr m_buffer
PointBufferPtr with current data.
Definition: KinectGrabber.hpp:62
lvr2::KinectGrabber
Definition: KinectGrabber.hpp:47
lvr2::KinectGrabber::VideoCallback
virtual void VideoCallback(void *data, uint32_t timestamp)
Definition: KinectGrabber.cpp:54
lvr2::timestamp
static Timestamp timestamp
A global time stamp object for program runtime measurement.
Definition: Timestamp.hpp:116
lvr2::KinectGrabber::getDepthImage
void getDepthImage(std::vector< short > &img)
Returns the currently present point cloud data.
Definition: KinectGrabber.cpp:63
lvr2::KinectGrabber::m_colorMutex
boost::mutex m_colorMutex
Mutex for save color buffer access.
Definition: KinectGrabber.hpp:68
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::KinectGrabber::m_depthMutex
boost::mutex m_depthMutex
Mutex for save depth buffer access.
Definition: KinectGrabber.hpp:65
lvr2::KinectGrabber::KinectGrabber
KinectGrabber(freenect_context *_ctx, int _index)
Definition: KinectGrabber.cpp:45
lvr2::KinectGrabber::getColorImage
void getColorImage(std::vector< uint8_t > &img)
Definition: KinectGrabber.cpp:79
lvr2::KinectGrabber::m_depthImage
std::vector< short > m_depthImage
The raw depth image.
Definition: KinectGrabber.hpp:71


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23