Hello Tello Pilot!
Join our DJI Tello community & remove this banner.
Sign up

Assertion error with image capture

Inderjit

New member
Joined
Jun 29, 2021
Messages
1
Reaction score
0
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.
 

New Threads

Members online

No members online now.

Forum statistics

Threads
5,176
Messages
37,477
Members
14,045
Latest member
Leoben