Compare commits
No commits in common. "c6ccdb7b590ea67dc952b36214b51b6c7ca78efa" and "319c2eebbd82506544bc295c5a01f722dc225a64" have entirely different histories.
c6ccdb7b59
...
319c2eebbd
|
@ -194,5 +194,4 @@ pyrightconfig.json
|
||||||
|
|
||||||
data/
|
data/
|
||||||
|
|
||||||
test.py
|
|
||||||
# End of https://www.toptal.com/developers/gitignore/api/python,visualstudiocode
|
# End of https://www.toptal.com/developers/gitignore/api/python,visualstudiocode
|
|
@ -28,8 +28,6 @@ python agent.py
|
||||||
|
|
||||||
在无人机底部摄像头检测到无人船上的 Apriltag 后,无人机将开始降落。在降落过程中,无人机将尝试保持在无人船正上方,并在降落过程中调整自身位置,以确保安全降落。
|
在无人机底部摄像头检测到无人船上的 Apriltag 后,无人机将开始降落。在降落过程中,无人机将尝试保持在无人船正上方,并在降落过程中调整自身位置,以确保安全降落。
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
USVLander 根据 MIT 许可证发布。这意味着您可以自由地使用、修改和分发该软件,但您必须包含原始作者的版权声明和许可声明。
|
USVLander 根据 MIT 许可证发布。这意味着您可以自由地使用、修改和分发该软件,但您必须包含原始作者的版权声明和许可声明。
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
|
@ -0,0 +1,21 @@
|
||||||
|
from djitellopy import Tello
|
||||||
|
import cv2
|
||||||
|
|
||||||
|
my_drone = Tello()
|
||||||
|
my_drone.connect()
|
||||||
|
print(my_drone.get_battery())
|
||||||
|
my_drone.streamon()
|
||||||
|
my_drone.set_video_direction(Tello.CAMERA_FORWARD)
|
||||||
|
while True:
|
||||||
|
# Read a frame from the video stream
|
||||||
|
img = my_drone.get_frame_read().frame
|
||||||
|
img = cv2.resize(img, (360, 240))
|
||||||
|
# Display the frame
|
||||||
|
cv2.imshow("Image", img)
|
||||||
|
# Check for key press to exit
|
||||||
|
if cv2.waitKey(1) & 0xFF == ord('q'):
|
||||||
|
break
|
||||||
|
|
||||||
|
cv2.destroyAllWindows()
|
||||||
|
my_drone.streamoff()
|
||||||
|
# my_drone.land()
|
|
@ -0,0 +1,14 @@
|
||||||
|
import pupil_apriltags as apriltag
|
||||||
|
import cv2
|
||||||
|
|
||||||
|
tag_detector = apriltag.Detector(families='tag36h11')
|
||||||
|
|
||||||
|
img = cv2.imread('Snipaste_2024-06-22_21-30-43.png')
|
||||||
|
# cv2.imshow('aaa', img)
|
||||||
|
# print(img.shape)
|
||||||
|
tag = tag_detector.detect(img[:,:,0], estimate_tag_pose=True, camera_params=([353.836278849487, 353.077028029136, 163.745870517989, 115.130883974855]), tag_size=0.018)
|
||||||
|
|
||||||
|
for t in tag:
|
||||||
|
if t.tag_id == 0:
|
||||||
|
print(t.pose_t)
|
||||||
|
print(t.tag_id)
|
Loading…
Reference in New Issue