From 8f451029e2140e2e94912d8e95e85080232c46d8 Mon Sep 17 00:00:00 2001 From: matlabbe Date: Thu, 16 Oct 2014 00:07:25 +0000 Subject: [PATCH] Added setDepthColorSyncEnabled(true) for OpenNI2 devices to synchronize RGB and depth images git-svn-id: http://rtabmap.googlecode.com/svn/trunk/rtabmap@1860 f169173b-cf89-36c8-b27e-44dbe73f0c83 --- corelib/src/CameraRGBD.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/corelib/src/CameraRGBD.cpp b/corelib/src/CameraRGBD.cpp index ccbab3fb..c5780b5b 100644 --- a/corelib/src/CameraRGBD.cpp +++ b/corelib/src/CameraRGBD.cpp @@ -420,6 +420,11 @@ bool CameraOpenNI2::init() UERROR("CameraOpenNI2: Failed to set depth/color registration."); } + if (_device->setDepthColorSyncEnabled(true) != openni::STATUS_OK) + { + UERROR("CameraOpenNI2: Failed to set depth color sync"); + } + _depth->setMirroringEnabled(false); _color->setMirroringEnabled(false);