mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
Added OpenNI2 camera
git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1363 f169173b-cf89-36c8-b27e-44dbe73f0c83
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user