damiafuentes / DJITelloPy

DJI Tello drone python interface using the official Tello SDK. Feel free to contribute!
MIT License
1.24k stars 490 forks source link

Downvision camera issue #140

Open wdliu356 opened 2 years ago

wdliu356 commented 2 years ago

In Tello EDU, we can get a video stream from the downward camera. However, when I'm using the same get-frame function as the front camera, the frame sometimes works inappropriately as in the figure below. The top part is the correct figure, however, there are useless green parts at the bottom of the figure. Anyone shares the same issue as I have? Really need some advice here unnamed

kev278 commented 2 years ago

how were you able to access the bottom camera?

JaPeterson1 commented 1 year ago

how were you able to access the bottom camera?

drone.set_video_direction(drone.CAMERA_DOWNWARD) This only works on Tello Edu and Talent series drones.

I had the same issue shown in the screenshot; perhaps using opencv to find the first green pixel vertically and then cropping the image with array slicing would work as a temporary fix?

Liang-mt commented 7 months ago

Hello, may I ask which part of the code you use to call the camera? Currently, I encounter errors when I call the camera using the code.

amntheap commented 4 months ago

You can simply just crop the additional parts with opencv. basically the downward camera has 640 by 480 image output. img = cv2.resize(img, [640, 480])

also you can rotate it with this line of code: img = cv2.rotate(img, cv2.ROTATE_90_CLOCKWISE)