Adjust ROI usage and add voice control docs
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user