I am trying to run the following code so the drone video feed appears on my laptop.
from djitellopy import tello
import cv2
me = tello.Tello()
me.connect()
print(me.get_battery())
me.streamon()
while True:
img = me.get_frame_read().frame
img = cv2.resize(img, (360, 240))
cv2.imshow("Image", img)
cv2.waitKey(1)
This is the error I am getting when I run the code:
Traceback (most recent call last):
File "C:/Users/inder/PycharmProjects/Tello_Course/ImageCapture.py", line 34, in <module>
img = cv2.resize(img, (360, 240))
cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\imgproc\src\resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
Let me know if you know why I am getting this error and thank you in advance.
from djitellopy import tello
import cv2
me = tello.Tello()
me.connect()
print(me.get_battery())
me.streamon()
while True:
img = me.get_frame_read().frame
img = cv2.resize(img, (360, 240))
cv2.imshow("Image", img)
cv2.waitKey(1)
This is the error I am getting when I run the code:
Traceback (most recent call last):
File "C:/Users/inder/PycharmProjects/Tello_Course/ImageCapture.py", line 34, in <module>
img = cv2.resize(img, (360, 240))
cv2.error: OpenCV(4.4.0) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-6sxsq0tp\opencv\modules\imgproc\src\resize.cpp:3929: error: (-215:Assertion failed) !ssize.empty() in function 'cv::resize'
Let me know if you know why I am getting this error and thank you in advance.