Basic Image AlgorithmS Library
2.8.0
|
Implementing FreenectDevice Interface, this class is used internally by VideoSource_Kinect - do not use directly. More...
#include <VideoSource/VideoSource_Kinect.hh>
Public Member Functions | |
void | CreateLookupTable (double px, double py, double fx, double fy) |
virtual void | DepthCallback (void *depth, uint32_t timestamp) |
libfreenect thread calls this when new depth data is available More... | |
virtual int | GetLatestColor (Camera< unsigned char > &image) |
Callbacks store image data in double buffer, get latest. More... | |
virtual int | GetLatestDepth (Camera< float > &image) |
Callbacks store image data in double buffer, get latest Note that the depth image is shifted by 3 pixels in order to fit the IR image. More... | |
virtual void | SetDepthMode (int mode) |
virtual int | SetSwitchVideoModeAfterGrab (bool switchMode) |
virtual int | SetVideoMode (freenect_video_format format) |
virtual void | VideoCallback (void *video, uint32_t timestamp) |
libfreenect thread calls this when new color data is available More... | |
VideoSource_Kinect_Callback (freenect_context *_ctx, int _index) | |
libfreenect constructor used by VideoSource_Kinect, do not use directly More... | |
Protected Attributes | |
int | capMode_ |
pthread_mutex_t * | color_mutex |
pthread_mutex_t * | coloravail_mutex |
std::vector< Camera< unsigned char > > | colorbuffer_ |
pthread_mutex_t * | depth_mutex |
pthread_mutex_t * | depthavail_mutex |
std::vector< Camera< float > > | depthbuffer_ |
Image< float > | depthLookupTable_ |
freenect_video_format | format_ |
float | lookup_ [2048] |
pthread_cond_t * | newColorAvail_ |
pthread_cond_t * | newDepthAvail_ |
bool | switch_ |
int | writingToC_ |
int | writingToD_ |
Implementing FreenectDevice Interface, this class is used internally by VideoSource_Kinect - do not use directly.
Definition at line 154 of file VideoSource_Kinect.hh.
BIAS::VideoSource_Kinect_Callback::VideoSource_Kinect_Callback | ( | freenect_context * | _ctx, |
int | _index | ||
) |
libfreenect constructor used by VideoSource_Kinect, do not use directly
_ctx | libfreenect context, i.e. opened usb bus |
_index | index of camera on context/bus |
Definition at line 274 of file VideoSource_Kinect.cpp.
References capMode_, BIAS::ImageBase::CM_Bayer_GRBG, color_mutex, coloravail_mutex, colorbuffer_, depth_mutex, depthavail_mutex, depthbuffer_, BIAS::VideoSource_Kinect_Base::DepthRay, lookup_, newColorAvail_, newDepthAvail_, switch_, writingToC_, and writingToD_.
void BIAS::VideoSource_Kinect_Callback::CreateLookupTable | ( | double | px, |
double | py, | ||
double | fx, | ||
double | fy | ||
) |
Definition at line 440 of file VideoSource_Kinect.cpp.
References depthLookupTable_, BIAS::Image< StorageType >::GetImageDataArray(), BIAS::Image< StorageType >::Init(), and BIAS::ImageBase::IsEmpty().
|
virtual |
libfreenect thread calls this when new depth data is available
video | pointer to depth bytes (2 per pixel) |
timestamp | frame timestamp, todo: interpret, put as metadata |
Definition at line 325 of file VideoSource_Kinect.cpp.
References capMode_, depth_mutex, depthbuffer_, BIAS::VideoSource_Kinect_Base::DepthEuclidean, depthLookupTable_, BIAS::VideoSource_Kinect_Base::DepthRaw, BIAS::VideoSource_Kinect_Base::DepthRay, BIAS::Image< StorageType >::GetImageData(), lookup_, newDepthAvail_, and writingToD_.
|
virtual |
Callbacks store image data in double buffer, get latest.
image | color image |
Definition at line 369 of file VideoSource_Kinect.cpp.
References color_mutex, coloravail_mutex, colorbuffer_, BIAS::ImageBase::CopyIn_NoInit(), format_, newColorAvail_, SetVideoMode(), switch_, and writingToC_.
|
virtual |
Callbacks store image data in double buffer, get latest Note that the depth image is shifted by 3 pixels in order to fit the IR image.
image | depth image |
Definition at line 388 of file VideoSource_Kinect.cpp.
References depth_mutex, depthavail_mutex, depthbuffer_, BIAS::Image< StorageType >::GetImageData(), newDepthAvail_, and writingToD_.
|
virtual |
Definition at line 433 of file VideoSource_Kinect.cpp.
References capMode_.
|
virtual |
Definition at line 426 of file VideoSource_Kinect.cpp.
References switch_.
|
virtual |
Definition at line 406 of file VideoSource_Kinect.cpp.
References format_.
Referenced by GetLatestColor().
|
virtual |
libfreenect thread calls this when new color data is available
video | pointer to color bytes (3 per pixel), todo: convince libfreenect to deliver raw rggb data |
timestamp | frame timestamp, todo: interpret, put as metadata |
Definition at line 312 of file VideoSource_Kinect.cpp.
References color_mutex, colorbuffer_, newColorAvail_, and writingToC_.
|
protected |
Definition at line 229 of file VideoSource_Kinect.hh.
Referenced by DepthCallback(), SetDepthMode(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 211 of file VideoSource_Kinect.hh.
Referenced by GetLatestColor(), VideoCallback(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 215 of file VideoSource_Kinect.hh.
Referenced by GetLatestColor(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 204 of file VideoSource_Kinect.hh.
Referenced by GetLatestColor(), VideoCallback(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 212 of file VideoSource_Kinect.hh.
Referenced by DepthCallback(), GetLatestDepth(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 216 of file VideoSource_Kinect.hh.
Referenced by GetLatestDepth(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 205 of file VideoSource_Kinect.hh.
Referenced by DepthCallback(), GetLatestDepth(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 223 of file VideoSource_Kinect.hh.
Referenced by CreateLookupTable(), and DepthCallback().
|
protected |
Definition at line 226 of file VideoSource_Kinect.hh.
Referenced by GetLatestColor(), and SetVideoMode().
|
protected |
Definition at line 220 of file VideoSource_Kinect.hh.
Referenced by DepthCallback(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 213 of file VideoSource_Kinect.hh.
Referenced by GetLatestColor(), VideoCallback(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 214 of file VideoSource_Kinect.hh.
Referenced by DepthCallback(), GetLatestDepth(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 228 of file VideoSource_Kinect.hh.
Referenced by GetLatestColor(), SetSwitchVideoModeAfterGrab(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 207 of file VideoSource_Kinect.hh.
Referenced by GetLatestColor(), VideoCallback(), and VideoSource_Kinect_Callback().
|
protected |
Definition at line 208 of file VideoSource_Kinect.hh.
Referenced by DepthCallback(), GetLatestDepth(), and VideoSource_Kinect_Callback().