Fixed registration bug: It was ALWAYS OFF - even after changing the property

This commit is contained in:
Ana Huaman Quispe 2014-12-16 19:45:50 -05:00
parent 009aec5164
commit 1ad1b737c2

View File

@ -566,7 +566,7 @@ bool CvCapture_OpenNI2::setDepthGeneratorProperty( int propIdx, double propValue
// then the property isn't avaliable // then the property isn't avaliable
if ( color.isValid() ) 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.getImageRegistrationMode() == mode )
{ {
if (device.isImageRegistrationModeSupported(mode)) if (device.isImageRegistrationModeSupported(mode))