From 39d4b6ad82c4cd2fc48143d078a8c14883c3ac78 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Fri, 20 Oct 2023 14:55:02 +0300 Subject: [PATCH 1/3] Add optional vertical stereo and stereo rectification interpolation type --- include/depthai-shared/common/Interpolation.hpp | 3 ++- .../properties/StereoDepthProperties.hpp | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/include/depthai-shared/common/Interpolation.hpp b/include/depthai-shared/common/Interpolation.hpp index 8a06b83c..da049dd7 100644 --- a/include/depthai-shared/common/Interpolation.hpp +++ b/include/depthai-shared/common/Interpolation.hpp @@ -15,7 +15,8 @@ enum class Interpolation : std::int32_t { NEAREST_NEIGHBOR = 2, BYPASS = NEAREST_NEIGHBOR, DEFAULT = BICUBIC, - DEFAULT_DISPARITY_DEPTH = NEAREST_NEIGHBOR + DEFAULT_DISPARITY_DEPTH = NEAREST_NEIGHBOR, + DEFAULT_STEREO_RECTIFICATION = BICUBIC, }; diff --git a/include/depthai-shared/properties/StereoDepthProperties.hpp b/include/depthai-shared/properties/StereoDepthProperties.hpp index fb3ed12f..98646940 100644 --- a/include/depthai-shared/properties/StereoDepthProperties.hpp +++ b/include/depthai-shared/properties/StereoDepthProperties.hpp @@ -2,6 +2,7 @@ #include "depthai-shared/common/CameraBoardSocket.hpp" #include "depthai-shared/common/EepromData.hpp" +#include "depthai-shared/common/Interpolation.hpp" #include "depthai-shared/common/optional.hpp" #include "depthai-shared/datatype/RawStereoDepthConfig.hpp" #include "depthai-shared/properties/Properties.hpp" @@ -182,6 +183,18 @@ struct StereoDepthProperties : PropertiesSerializable alphaScaling; + + /** + * Whether to use vertical stereo mode or not. + * Default value: auto, extrinsic calibration data will determine whether it's vertical or horizontal stereo. + */ + tl::optional verticalStereo; + + /** + * Interpolation type used for stereo rectification. + * Default value: DEFAULT_STEREO_RECTIFICATION. + */ + Interpolation interpolation = Interpolation::DEFAULT_STEREO_RECTIFICATION; }; DEPTHAI_SERIALIZE_EXT(StereoDepthProperties, @@ -206,6 +219,8 @@ DEPTHAI_SERIALIZE_EXT(StereoDepthProperties, disparityToDepthUseSpecTranslation, rectificationUseSpecTranslation, depthAlignmentUseSpecTranslation, - alphaScaling); + alphaScaling, + verticalStereo, + interpolation); } // namespace dai From 9d6c046a944265df239794a7cae338e6a1c11ff4 Mon Sep 17 00:00:00 2001 From: SzabolcsGergely Date: Fri, 20 Oct 2023 15:32:00 +0300 Subject: [PATCH 2/3] Rename to rectificationInterpolation --- include/depthai-shared/properties/StereoDepthProperties.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/depthai-shared/properties/StereoDepthProperties.hpp b/include/depthai-shared/properties/StereoDepthProperties.hpp index 98646940..5c8d4439 100644 --- a/include/depthai-shared/properties/StereoDepthProperties.hpp +++ b/include/depthai-shared/properties/StereoDepthProperties.hpp @@ -194,7 +194,7 @@ struct StereoDepthProperties : PropertiesSerializable Date: Thu, 7 Dec 2023 02:11:47 +0100 Subject: [PATCH 3/3] Fix windows build --- include/depthai-shared/datatype/RawIMUData.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/depthai-shared/datatype/RawIMUData.hpp b/include/depthai-shared/datatype/RawIMUData.hpp index f3f26c70..1f021032 100644 --- a/include/depthai-shared/datatype/RawIMUData.hpp +++ b/include/depthai-shared/datatype/RawIMUData.hpp @@ -220,8 +220,7 @@ struct RawIMUData : public RawBuffer { return DatatypeEnum::IMUData; } - - DEPTHAI_SERIALIZE(RawIMUData, packets, sequenceNum, ts, tsDevice); + DEPTHAI_SERIALIZE(RawIMUData, packets, RawBuffer::sequenceNum, RawBuffer::ts, RawBuffer::tsDevice); }; } // namespace dai