You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you're having trouble getting video, try this: #98
if you want to use YOLOv8, here is a sample:
(It's a bit simplified and not practical.)
fromultralyticsimportYOLOimportcv2cap=cv2.VideoCapture(0) # use webcam model=YOLO("yolov8n.pt") # you can also use yolov8s.pt, yolov8s-seg.pt, yolov8s-pose.pt, etc...whileTrue:
frame=cap.read()[1]
results=model(frame)
foriinrange(len(results[0].boxes.xyxy)):
xyxy=results[0].boxes.xyxy[i].tolist()
cv2.rectangle(frame,( int(xyxy[0]),int(xyxy[1]) ),( int(xyxy[2]),int(xyxy[3]) ),(0,0,255),2)
cv2.imshow("window",frame)
cv2.waitKey(1)
视频传输的问题如何解决,并且我已经安装了ffmpeg了,另外有人知道如何将yolo与tello结合么
The text was updated successfully, but these errors were encountered: