Exemplo n.º 1
0
 OniStatus setImageRegistrationMode(OniImageRegistrationMode mode)
 {
   if (!isImageRegistrationModeSupported(mode))
     return ONI_STATUS_NOT_SUPPORTED;
   image_registration_mode = mode;
   return setVideoMode(video_mode);
 }
Exemplo n.º 2
0
void OpenNI2Device::setImageRegistrationMode(bool enabled) throw (OpenNI2Exception)
{
  if (isImageRegistrationModeSupported())
  {
    image_registration_activated_ = enabled;
    if (enabled)
    {
      openni::Status rc = openni_device_->setImageRegistrationMode(openni::IMAGE_REGISTRATION_DEPTH_TO_COLOR);
      if (rc != openni::STATUS_OK)
        THROW_OPENNI_EXCEPTION("Enabling image registration mode failed: \n%s\n", openni::OpenNI::getExtendedError());
    }
    else
    {
      openni::Status rc = openni_device_->setImageRegistrationMode(openni::IMAGE_REGISTRATION_OFF);
      if (rc != openni::STATUS_OK)
        THROW_OPENNI_EXCEPTION("Enabling image registration mode failed: \n%s\n", openni::OpenNI::getExtendedError());
    }
  }
}