Update to socket based solution
This commit is contained in:
@@ -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()
|
||||
Reference in New Issue
Block a user