Skip to content

Commit 5e037c0

Browse files
Add missing bindings
1 parent 0ed96eb commit 5e037c0

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

examples/StereoDepth/stereo_depth_from_host.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def destroyWindow(self):
157157
trDecimationFactor = list()
158158
trDisparityShift = list()
159159
trCenterAlignmentShift = list()
160+
trInvalidateEdgePixels = list()
160161

161162
def trackbarSigma(value):
162163
StereoConfigHandler.config.postProcessing.bilateralSigmaValue = value
@@ -289,6 +290,13 @@ def trackbarCenterAlignmentShift(value):
289290
StereoConfigHandler.newConfig = True
290291
for tr in StereoConfigHandler.trCenterAlignmentShift:
291292
tr.set(value)
293+
294+
def trackbarInvalidateEdgePixels(value):
295+
StereoConfigHandler.config.algorithmControl.numInvalidateEdgePixels = value
296+
print(f"numInvalidateEdgePixels: {StereoConfigHandler.config.algorithmControl.numInvalidateEdgePixels:.2f}")
297+
StereoConfigHandler.newConfig = True
298+
for tr in StereoConfigHandler.trInvalidateEdgePixels:
299+
tr.set(value)
292300

293301
def handleKeypress(key, stereoDepthConfigInQueue):
294302
if key == ord('m'):
@@ -428,6 +436,7 @@ def registerWindow(stream):
428436
StereoConfigHandler.trFractionalBits.append(StereoConfigHandler.Trackbar('Subpixel fractional bits', stream, 3, 5, StereoConfigHandler.config.algorithmControl.subpixelFractionalBits, StereoConfigHandler.trackbarFractionalBits))
429437
StereoConfigHandler.trDisparityShift.append(StereoConfigHandler.Trackbar('Disparity shift', stream, 0, 100, StereoConfigHandler.config.algorithmControl.disparityShift, StereoConfigHandler.trackbarDisparityShift))
430438
StereoConfigHandler.trCenterAlignmentShift.append(StereoConfigHandler.Trackbar('Center alignment shift factor', stream, 0, 100, StereoConfigHandler.config.algorithmControl.centerAlignmentShiftFactor, StereoConfigHandler.trackbarCenterAlignmentShift))
439+
StereoConfigHandler.trInvalidateEdgePixels.append(StereoConfigHandler.Trackbar('Invalidate edge pixels', stream, 0, 100, StereoConfigHandler.config.algorithmControl.numInvalidateEdgePixels, StereoConfigHandler.trackbarInvalidateEdgePixels))
431440
StereoConfigHandler.trLineqAlpha.append(StereoConfigHandler.Trackbar('Linear equation alpha', stream, 0, 15, StereoConfigHandler.config.costMatching.linearEquationParameters.alpha, StereoConfigHandler.trackbarLineqAlpha))
432441
StereoConfigHandler.trLineqBeta.append(StereoConfigHandler.Trackbar('Linear equation beta', stream, 0, 15, StereoConfigHandler.config.costMatching.linearEquationParameters.beta, StereoConfigHandler.trackbarLineqBeta))
433442
StereoConfigHandler.trLineqThreshold.append(StereoConfigHandler.Trackbar('Linear equation threshold', stream, 0, 255, StereoConfigHandler.config.costMatching.linearEquationParameters.threshold, StereoConfigHandler.trackbarLineqThreshold))

src/pipeline/datatype/StereoDepthConfigBindings.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ void bind_stereodepthconfig(pybind11::module& m, void* pCallstack){
8989
.def_readwrite("subpixelFractionalBits", &RawStereoDepthConfig::AlgorithmControl::subpixelFractionalBits, DOC(dai, RawStereoDepthConfig, AlgorithmControl, subpixelFractionalBits))
9090
.def_readwrite("disparityShift", &RawStereoDepthConfig::AlgorithmControl::disparityShift, DOC(dai, RawStereoDepthConfig, AlgorithmControl, disparityShift))
9191
.def_readwrite("centerAlignmentShiftFactor", &RawStereoDepthConfig::AlgorithmControl::centerAlignmentShiftFactor, DOC(dai, RawStereoDepthConfig, AlgorithmControl, centerAlignmentShiftFactor))
92+
.def_readwrite("numInvalidateEdgePixels", &RawStereoDepthConfig::AlgorithmControl::numInvalidateEdgePixels, DOC(dai, RawStereoDepthConfig, AlgorithmControl, numInvalidateEdgePixels))
9293
;
9394

9495
spatialFilter

0 commit comments

Comments
 (0)