Skip to content

Commit a8e3792

Browse files
committed
Fixing Ci/CD
1 parent 91031c1 commit a8e3792

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

dynamic-calibration/utils/dynamic_calibration_interactive.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import numpy as np
22
import cv2
3+
import time
34

45
import depthai as dai
56
from helper_functions import update_master_frame, overlay_coverage_on_gray, draw_recalibration_message, draw_health_bar, display_text, draw_key_commands, print_final_calibration_results
@@ -52,7 +53,6 @@ def on_mouse_disparity(event, x, y, flags, param):
5253
device.setCalibration(calibOld)
5354
# ---------- Device and runtime loop ----------
5455
pipeline.start()
55-
import time
5656
start = time.time()
5757
leftFrame = None
5858
rightFrame = None
@@ -184,8 +184,10 @@ def on_mouse_disparity(event, x, y, flags, param):
184184
cx = int(round(local_x * 2))
185185

186186
half = 10 # 9x9 window → radius 4
187-
y0 = max(0, cy - half); y1 = min(depth_frame.shape[0], cy + half + 1)
188-
x0 = max(0, cx - half); x1 = min(depth_frame.shape[1], cx + half + 1)
187+
y0 = max(0, cy - half)
188+
y1 = min(depth_frame.shape[0], cy + half + 1)
189+
x0 = max(0, cx - half)
190+
x1 = min(depth_frame.shape[1], cx + half + 1)
189191

190192
roi = depth_frame[y0:y1, x0:x1].astype(np.float32)
191193

dynamic-calibration/utils/dynamic_controler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,8 @@ def _push_status_overlay(self, img_annots: dai.ImgAnnotations, frame: dai.ImgFra
389389
y, dy, x = 0.05, 0.04, 0.05
390390

391391
if self.old_calibration:
392-
hud.texts.append(self._create_text_annot("PREVIOUS calibration: available", (x, y))); y += dy
392+
hud.texts.append(self._create_text_annot("PREVIOUS calibration: available", (x, y)))
393+
y += dy
393394

394395
if self.last_quality and getattr(self.last_quality, "qualityData", None):
395396
q = self.last_quality.qualityData

0 commit comments

Comments
 (0)