Added OpenNI2 camera

git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1363 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
matlabbe
2014-06-13 23:44:38 +00:00
parent b85263c377
commit a943083e0b
12 changed files with 986 additions and 623 deletions

View File

@@ -31,6 +31,12 @@
class UDirectory;
class UTimer;
namespace openni
{
class Device;
class VideoStream;
}
namespace rtabmap
{
@@ -165,6 +171,9 @@ class RTABMAP_EXP CameraRGBD :
public Camera
{
public:
static bool available();
public:
CameraRGBD(float imageRate = 0,
bool asus = false);
@@ -178,6 +187,33 @@ protected:
private:
bool _asus;
cv::VideoCapture _capture;
float _depthFocal;
};
/////////////////////////
// CameraOpenNI2
/////////////////////////
class RTABMAP_EXP CameraOpenNI2 :
public Camera
{
public:
static bool available();
public:
CameraOpenNI2(float imageRate = 0);
virtual ~CameraOpenNI2();
virtual bool init();
protected:
virtual void captureImage(cv::Mat & rgb, cv::Mat & depth, float & depthConstant);
private:
openni::Device * _device;
openni::VideoStream * _color;
openni::VideoStream * _depth;
float _depthFocal;
};