Skip to content

Commit 430b2ed

Browse files
committed
Formatting
1 parent 5f4b5f1 commit 430b2ed

File tree

1 file changed

+31
-31
lines changed

1 file changed

+31
-31
lines changed

examples/30_stereo_depth_from_host.py

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,22 @@
1919

2020

2121
# StereoDepth config options.
22-
out_depth = False # Disparity by default
22+
out_depth = False # Disparity by default
2323
out_rectified = True # Output and display rectified streams
24-
lrcheck = True # Better handling for occlusions
25-
extended = False # Closer-in minimum depth, disparity range is doubled
26-
subpixel = True # Better accuracy for longer distance, fractional disparity 32-levels
27-
median = dai.StereoDepthProperties.MedianFilter.KERNEL_7x7
24+
lrcheck = True # Better handling for occlusions
25+
extended = False # Closer-in minimum depth, disparity range is doubled
26+
subpixel = True # Better accuracy for longer distance, fractional disparity 32-levels
27+
median = dai.StereoDepthProperties.MedianFilter.KERNEL_7x7
2828

2929
# Sanitize some incompatible options
3030
if lrcheck or extended or subpixel:
3131
median = dai.StereoDepthProperties.MedianFilter.MEDIAN_OFF
3232

33-
print("StereoDepth config options:")
34-
print(" Left-Right check: ", lrcheck)
35-
print(" Extended disparity:", extended)
36-
print(" Subpixel: ", subpixel)
37-
print(" Median filtering: ", median)
33+
print("StereoDepth config options: ")
34+
print("Left-Right check: ", lrcheck)
35+
print("Extended disparity: ", extended)
36+
print("Subpixel: ", subpixel)
37+
print("Median filtering: ", median)
3838

3939
right_intrinsic = [[860.0, 0.0, 640.0], [0.0, 860.0, 360.0], [0.0, 0.0, 1.0]]
4040

@@ -45,17 +45,17 @@ def create_stereo_depth_pipeline():
4545
print("XLINK IN -> STEREO -> XLINK OUT")
4646
pipeline = dai.Pipeline()
4747

48-
camLeft = pipeline.createXLinkIn()
49-
camRight = pipeline.createXLinkIn()
50-
stereo = pipeline.createStereoDepth()
51-
xoutLeft = pipeline.createXLinkOut()
52-
xoutRight = pipeline.createXLinkOut()
53-
xoutDepth = pipeline.createXLinkOut()
54-
xoutDisparity = pipeline.createXLinkOut()
55-
xoutRectifLeft = pipeline.createXLinkOut()
48+
camLeft = pipeline.createXLinkIn()
49+
camRight = pipeline.createXLinkIn()
50+
stereo = pipeline.createStereoDepth()
51+
xoutLeft = pipeline.createXLinkOut()
52+
xoutRight = pipeline.createXLinkOut()
53+
xoutDepth = pipeline.createXLinkOut()
54+
xoutDisparity = pipeline.createXLinkOut()
55+
xoutRectifLeft = pipeline.createXLinkOut()
5656
xoutRectifRight = pipeline.createXLinkOut()
5757

58-
camLeft .setStreamName('in_left')
58+
camLeft.setStreamName('in_left')
5959
camRight.setStreamName('in_right')
6060

6161
stereo.setOutputDepth(out_depth)
@@ -70,20 +70,20 @@ def create_stereo_depth_pipeline():
7070
stereo.setEmptyCalibration() # Set if the input frames are already rectified
7171
stereo.setInputResolution(1280, 720)
7272

73-
xoutLeft .setStreamName('left')
74-
xoutRight .setStreamName('right')
75-
xoutDepth .setStreamName('depth')
76-
xoutDisparity .setStreamName('disparity')
77-
xoutRectifLeft .setStreamName('rectified_left')
73+
xoutLeft.setStreamName('left')
74+
xoutRight.setStreamName('right')
75+
xoutDepth.setStreamName('depth')
76+
xoutDisparity.setStreamName('disparity')
77+
xoutRectifLeft.setStreamName('rectified_left')
7878
xoutRectifRight.setStreamName('rectified_right')
7979

80-
camLeft.out .link(stereo.left)
81-
camRight.out .link(stereo.right)
82-
stereo.syncedLeft .link(xoutLeft.input)
83-
stereo.syncedRight .link(xoutRight.input)
84-
stereo.depth .link(xoutDepth.input)
85-
stereo.disparity .link(xoutDisparity.input)
86-
stereo.rectifiedLeft .link(xoutRectifLeft.input)
80+
camLeft.out.link(stereo.left)
81+
camRight.out.link(stereo.right)
82+
stereo.syncedLeft.link(xoutLeft.input)
83+
stereo.syncedRight.link(xoutRight.input)
84+
stereo.depth.link(xoutDepth.input)
85+
stereo.disparity.link(xoutDisparity.input)
86+
stereo.rectifiedLeft.link(xoutRectifLeft.input)
8787
stereo.rectifiedRight.link(xoutRectifRight.input)
8888

8989
streams = ['left', 'right']

0 commit comments

Comments
 (0)