Camera Aruco Tags Dectection
This commit is contained in:
@@ -142,6 +142,21 @@ def main():
|
||||
|
||||
proc = CameraProcessor(topics=topics, show_gui=show_gui)
|
||||
|
||||
try:
|
||||
from vision.object_detector import ObjectDetector
|
||||
detector = ObjectDetector(aruco_dict_name="DICT_4X4_50")
|
||||
|
||||
def detection_overlay(camera_name, frame):
|
||||
detections = detector.detect(frame)
|
||||
if detections:
|
||||
annotated = detector.annotate_frame(frame, detections)
|
||||
proc.frames[camera_name] = annotated
|
||||
|
||||
for cam_name in topics:
|
||||
proc.register_callback(cam_name, detection_overlay)
|
||||
except Exception as e:
|
||||
print(f"[CAM] ArUco detection unavailable: {e}")
|
||||
|
||||
if show_gui:
|
||||
proc.spin()
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user