Adjust ROI usage and add voice control docs

This commit is contained in:
cristhian aguilera
2026-02-02 12:49:40 -03:00
parent 695d309816
commit 048de058a3
5 changed files with 170 additions and 25 deletions

View File

@@ -324,24 +324,25 @@ def _draw_detections(
"""Draw bounding boxes and labels on frame."""
annotated = frame.copy()
# Draw ROI rectangle (always visible)
cv2.rectangle(
annotated,
cfg.roi_top_left,
cfg.roi_bottom_right,
(0, 255, 0) if cfg.use_roi else (128, 128, 128),
2,
)
# Label the ROI
cv2.putText(
annotated,
"ROI",
(cfg.roi_top_left[0] + 5, cfg.roi_top_left[1] + 20),
cv2.FONT_HERSHEY_SIMPLEX,
0.6,
(0, 255, 0) if cfg.use_roi else (128, 128, 128),
2,
)
if cfg.use_roi:
# Draw ROI rectangle
cv2.rectangle(
annotated,
cfg.roi_top_left,
cfg.roi_bottom_right,
(0, 255, 0),
2,
)
# Label the ROI
cv2.putText(
annotated,
"ROI",
(cfg.roi_top_left[0] + 5, cfg.roi_top_left[1] + 20),
cv2.FONT_HERSHEY_SIMPLEX,
0.6,
(0, 255, 0),
2,
)
# Color mapping for visualization
color_map = {