ViSP
2.9.0
|
#include <vpKinect.h>
Public Types | |
enum | vpDMResolution { DMAP_LOW_RES, DMAP_MEDIUM_RES } |
Public Member Functions | |
vpKinect (freenect_context *ctx, int index) | |
virtual | ~vpKinect () |
void | start (vpKinect::vpDMResolution res=DMAP_LOW_RES) |
void | stop () |
bool | getDepthMap (vpImage< float > &map) |
bool | getDepthMap (vpImage< float > &map, vpImage< unsigned char > &Imap) |
bool | getRGB (vpImage< vpRGBa > &IRGB) |
void | getIRCamParameters (vpCameraParameters &cam) const |
void | getRGBCamParameters (vpCameraParameters &cam) const |
void | setIRCamParameters (const vpCameraParameters &cam) |
void | setRGBCamParameters (const vpCameraParameters &cam) |
void | warpRGBFrame (const vpImage< vpRGBa > &Irgb, const vpImage< float > &Idepth, vpImage< vpRGBa > &IrgbWarped) |
Driver for the Kinect device.
The following example shows how to use this class to acquire data (depth map and color image) from a Kinect.
Definition at line 112 of file vpKinect.h.
Depth map resolution.
Enumerator | |
---|---|
DMAP_LOW_RES |
Depth map has a resolution of 320 by 240. |
DMAP_MEDIUM_RES |
Depth map has a resolution of 640 by 480. |
Definition at line 118 of file vpKinect.h.
vpKinect::vpKinect | ( | freenect_context * | ctx, |
int | index | ||
) |
Default constructor.
Those are the parameters found for our Kinect device. Note that they can differ from one device to another.
Definition at line 57 of file vpKinect.cpp.
References vpHomogeneousMatrix::buildFrom(), vpHomogeneousMatrix::inverse(), and vpImage< Type >::resize().
|
virtual |
Destructor.
Definition at line 75 of file vpKinect.cpp.
bool vpKinect::getDepthMap | ( | vpImage< float > & | map | ) |
Get metric depth map (float).
Definition at line 180 of file vpKinect.cpp.
Get metric depth map (float) and corresponding image.
Definition at line 194 of file vpKinect.cpp.
References DMAP_LOW_RES, vpImage< Type >::getHeight(), vpMutex::lock(), vpMutex::unlock(), and vpERROR_TRACE.
|
inline |
Definition at line 141 of file vpKinect.h.
Get RGB image
Definition at line 243 of file vpKinect.cpp.
|
inline |
Definition at line 144 of file vpKinect.h.
|
inline |
Definition at line 147 of file vpKinect.h.
|
inline |
Definition at line 150 of file vpKinect.h.
void vpKinect::start | ( | vpKinect::vpDMResolution | res = DMAP_LOW_RES | ) |
Calibration parameters are the parameters found for our Kinect device. Note that they can differ from one device to another.
Definition at line 80 of file vpKinect.cpp.
References DMAP_LOW_RES, vpCameraParameters::initPersProjWithDistortion(), vpXmlParserCamera::parse(), and vpCameraParameters::perspectiveProjWithDistortion.
void vpKinect::stop | ( | ) |
Definition at line 121 of file vpKinect.cpp.
void vpKinect::warpRGBFrame | ( | const vpImage< vpRGBa > & | Irgb, |
const vpImage< float > & | Idepth, | ||
vpImage< vpRGBa > & | IrgbWarped | ||
) |
Warp the RGB frame to the depth camera frame. The size of the resulting IrgbWarped frame is the same as the size of the depth map Idepth
Compute metric coordinates in the ir camera Frame :
Change frame :
compute pixel coordinates of the corresponding point in the depth image
Fill warped image value
Definition at line 256 of file vpKinect.cpp.
References vpPixelMeterConversion::convertPoint(), vpMeterPixelConversion::convertPoint(), vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpImage< Type >::resize(), and vpERROR_TRACE.