diff --git a/aruco_realtime.py b/aruco_realtime.py index 7eaaab7..e7940c5 100644 --- a/aruco_realtime.py +++ b/aruco_realtime.py @@ -4,14 +4,14 @@ import cv2 from cv2 import aruco # Define the ArUco dictionary -aruco_dict = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_6X6_250) +aruco_dict = cv2.aruco.getPredefinedDictionary(cv2.aruco.DICT_4X4_50) aruco_params = cv2.aruco.DetectorParameters() # Specify the RTSP URL -rtsp_url = sys.argv[1] +# rtsp_url = sys.argv[1] -# Capture the video stream from the RTSP URL -cap = cv2.VideoCapture(rtsp_url) +# webcam: +cap = cv2.VideoCapture(0) while True: ret, frame = cap.read() @@ -32,7 +32,7 @@ while True: frame = cv2.aruco.drawDetectedMarkers(frame, corners, ids) # Scale frame in half - frame = cv2.resize(frame, (0, 0), fx=0.5, fy=0.5) + # frame = cv2.resize(frame, (0, 0), fx=0.5, fy=0.5) # Display the frame cv2.imshow("Frame", frame) @@ -44,3 +44,7 @@ while True: # Release the capture object and close all OpenCV windows cap.release() cv2.destroyAllWindows() + + +if __name__ == '__main__': + pass diff --git a/bot.py b/bot.py index b699f1f..46367fc 100644 --- a/bot.py +++ b/bot.py @@ -95,7 +95,7 @@ class Bot: # Iterate until we find all 4 aruco markers or timeout aruco_corners = {} annotated_image = None - aruco_dict = aruco.getPredefinedDictionary(aruco.DICT_6X6_250) + aruco_dict = aruco.getPredefinedDictionary(aruco.DICT_4X4_50) aruco_params = aruco.DetectorParameters() t0 = time.time()