Update to socket based solution

This commit is contained in:
Andrew Johnson
2025-11-09 13:22:41 +01:00
parent 73454a03c8
commit fb44f33bea
4 changed files with 70 additions and 12 deletions

View File

@@ -20,12 +20,16 @@ tello.streamoff()
# Prepare directory to save
script_dir = os.path.dirname(__file__)
artifact_folder_path = os.path.join(script_dir, "../../artifacts/images")
artifact_folder_path = os.path.join(script_dir, "../artifacts/images")
os.makedirs(artifact_folder_path, exist_ok=True)
print("[Example] Saving captured picture to:", artifact_folder_path)
# Save the frame
save_path = os.path.join(artifact_folder_path, "picture.png")
cv2.imwrite(save_path, np.array(frame_read.frame))
# Land
tello.land()