mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-01 17:10:26 +08:00
ImageView: Fixed feature's depth value when depth image is not the same size as the RGB image
This commit is contained in:
@@ -1972,6 +1972,7 @@ CameraRealSense::CameraRealSense(int device, int presetRGB, int presetDepth, flo
|
||||
presetRGB_(presetRGB),
|
||||
presetDepth_(presetDepth)
|
||||
{
|
||||
UDEBUG("");
|
||||
}
|
||||
|
||||
CameraRealSense::~CameraRealSense()
|
||||
@@ -1986,17 +1987,21 @@ CameraRealSense::~CameraRealSense()
|
||||
|
||||
bool CameraRealSense::init(const std::string & calibrationFolder, const std::string & cameraName)
|
||||
{
|
||||
UDEBUG("");
|
||||
#ifdef RTABMAP_REALSENSE
|
||||
if (ctx_ == 0)
|
||||
{
|
||||
ctx_ = new rs::context();
|
||||
}
|
||||
|
||||
UDEBUG("");
|
||||
if (ctx_->get_device_count() == 0)
|
||||
{
|
||||
UERROR("No RealSense device detected!");
|
||||
return false;
|
||||
}
|
||||
|
||||
UDEBUG("");
|
||||
dev_ = ctx_->get_device(deviceId_);
|
||||
if (dev_ == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user