@@ -14,14 +14,13 @@ def create_pipeline():
1414 pipeline = dai .Pipeline ()
1515
1616 tof = pipeline .create (dai .node .ToF )
17- tof .setNumShaves (3 )
1817
1918 # Configure the ToF node
2019 tofConfig = tof .initialConfig .get ()
2120 # Disable for debugging:
2221 tofConfig .enableFPPNCorrection = True
2322 tofConfig .enableWiggleCorrection = True
24- tofConfig .enableTemperatureCorrection = True
23+ # tofConfig.enableTemperatureCorrection = True
2524 # Optional:
2625 tofConfig .enableOpticalCorrection = True
2726 tofConfig .phaseUnwrappingLevel = 4
@@ -33,9 +32,7 @@ def create_pipeline():
3332 tof .initialConfig .set (tofConfig )
3433
3534 cam_tof = pipeline .create (dai .node .Camera )
36- cam_tof .properties .numFramesPoolRaw = 5
3735 cam_tof .setFps (60 ) # ToF node will produce depth frames at /2 of this rate
38- cam_tof .setImageOrientation (dai .CameraImageOrientation .ROTATE_180_DEG )
3936 cam_tof .setBoardSocket (dai .CameraBoardSocket .CAM_A )
4037 cam_tof .raw .link (tof .input )
4138
@@ -107,15 +104,10 @@ def create_pipeline():
107104 print (f"Changing median to { nextMedian .name } from { currentMedian .name } " )
108105 tofConfig .median = nextMedian
109106 tofConfigInQueue .send (tofConfig )
110- elif key == ord ('l' ):
111- treshold = input ("Enter treshold: " )
112- treshold = int (treshold )
113- tofConfig .phaseUnwrapErrorThreshold = treshold
114- tofConfigInQueue .send (tofConfig )
115107
116108 imgFrame = qDepth .get () # blocking call, will wait until a new data has arrived
117109 depth_map = imgFrame .getFrame ()
118- max_depth = (tofConfig .phaseUnwrappingLevel - 1 ) * 1874 # 80MHz modulation freq.
110+ max_depth = (tofConfig .phaseUnwrappingLevel + 1 ) * 1874 # 80MHz modulation freq.
119111 depth_colorized = np .interp (depth_map , (0 , max_depth ), (0 , 255 )).astype (np .uint8 )
120112 depth_colorized = cv2 .applyColorMap (depth_colorized , cvColorMap )
121113
0 commit comments