From 1ad1b737c2a3f37571282f93cb9983d5ad284e59 Mon Sep 17 00:00:00 2001 From: Ana Huaman Quispe Date: Tue, 16 Dec 2014 19:45:50 -0500 Subject: [PATCH] Fixed registration bug: It was ALWAYS OFF - even after changing the property --- modules/videoio/src/cap_openni2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/videoio/src/cap_openni2.cpp b/modules/videoio/src/cap_openni2.cpp index 8fea1bdb26..cf847fce92 100644 --- a/modules/videoio/src/cap_openni2.cpp +++ b/modules/videoio/src/cap_openni2.cpp @@ -566,7 +566,7 @@ bool CvCapture_OpenNI2::setDepthGeneratorProperty( int propIdx, double propValue // then the property isn't avaliable if ( color.isValid() ) { - openni::ImageRegistrationMode mode = propValue < 1.0 ? openni::IMAGE_REGISTRATION_OFF : openni::IMAGE_REGISTRATION_DEPTH_TO_COLOR; + openni::ImageRegistrationMode mode = propValue < 1.0 ? openni::IMAGE_REGISTRATION_DEPTH_TO_COLOR : openni::IMAGE_REGISTRATION_OFF; if( !device.getImageRegistrationMode() == mode ) { if (device.isImageRegistrationModeSupported(mode))