diff --git a/src/mynteye/api/synthetic.cc b/src/mynteye/api/synthetic.cc index ca695fa..e1329d0 100644 --- a/src/mynteye/api/synthetic.cc +++ b/src/mynteye/api/synthetic.cc @@ -534,13 +534,28 @@ void Synthetic::DisableStreamData(const Stream &stream, std::uint32_t depth) { } } break; case Stream::DISPARITY: { - if (IsStreamEnabledSynthetic(Stream::DISPARITY_NORMALIZED)) { - DisableStreamData(Stream::DISPARITY_NORMALIZED, depth + 1); + if (calib_model_ == CalibrationModel::PINHOLE) { + if (IsStreamEnabledSynthetic(Stream::DISPARITY_NORMALIZED)) { + DisableStreamData(Stream::DISPARITY_NORMALIZED, depth + 1); + } + if (IsStreamEnabledSynthetic(Stream::POINTS)) { + DisableStreamData(Stream::POINTS, depth + 1); + } + DeactivateProcessor(); +#ifdef WITH_CAM_MODELS + } else if (calib_model_ == CalibrationModel::KANNALA_BRANDT) { + if (IsStreamEnabledSynthetic(Stream::DISPARITY_NORMALIZED)) { + DisableStreamData(Stream::DISPARITY_NORMALIZED, depth + 1); + } + if (IsStreamEnabledSynthetic(Stream::DEPTH)) { + DisableStreamData(Stream::DEPTH, depth + 1); + } + DeactivateProcessor(); +#endif + } else { + LOG(ERROR) << "Unknow calib model type in device: " + << calib_model_; } - if (IsStreamEnabledSynthetic(Stream::POINTS)) { - DisableStreamData(Stream::POINTS, depth + 1); - } - DeactivateProcessor(); } break; case Stream::DISPARITY_NORMALIZED: { DeactivateProcessor(); @@ -565,7 +580,7 @@ void Synthetic::DisableStreamData(const Stream &stream, std::uint32_t depth) { DeactivateProcessor(); #ifdef WITH_CAM_MODELS } else if (calib_model_ == CalibrationModel::KANNALA_BRANDT) { - if (IsStreamEnabledSynthetic(Stream::DEPTH)) { + if (IsStreamEnabledSynthetic(Stream::POINTS)) { DisableStreamData(Stream::POINTS, depth + 1); } DeactivateProcessor();