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.
 
You can check out this tutorial, where I explain how to save video recordings from the Tello Drone.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 

New Posts

Members online

No members online now.

Forum statistics

Threads
5,737
Messages
40,167
Members
17,294
Latest member
pwyates

New Posts