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

feeding video into opencv

HerAnt

New member
Joined
Dec 16, 2018
Messages
1
Reaction score
0
Hey guys,

I just bought tello and like it very well so far. I'm a little familiar with Python and would love to try playing a little bit with computer vision library opencv and the drone.
For now, I have only used DJITelloPy and wonder if anyone have experience about how to feed the video from the drone into opencv inside the code?
 

SteenN

Member
Joined
Nov 22, 2018
Messages
9
Reaction score
3
Yes - no problem. I use cv2 for Mac and opencv-python for Windows
 

0bscur3

New member
Joined
Jul 10, 2019
Messages
4
Reaction score
0
I also try the cod ein damiafuentes/DJITelloPy, but it does not seem to work for me on my Mac and Python 3.6. I get the following errors:

Code:
[h264 @ 0x7fa2cb886400] non-existing PPS 0 referenced
[h264 @ 0x7fa2cb886400] non-existing PPS 0 referenced
[h264 @ 0x7fa2cb886400] decode_slice_header error
[h264 @ 0x7fa2cb886400] no frame!
[h264 @ 0x7fa2cb886400] non-existing PPS 0 referenced
[h264 @ 0x7fa2cb886400] non-existing PPS 0 referenced
[h264 @ 0x7fa2cb886400] decode_slice_header error
[h264 @ 0x7fa2cb886400] no frame!
True
[h264 @ 0x7fa2c80d4000] error while decoding MB 0 42, bytestream -15
[h264 @ 0x7fa2c80d1a00] error while decoding MB 43 40, bytestream -13
[h264 @ 0x7fa2c80cf400] left block unavailable for requested intra mode
[h264 @ 0x7fa2c80cf400] error while decoding MB 0 41, bytestream 204
[h264 @ 0x7fa2c80d1a00] left block unavailable for requested intra mode
[h264 @ 0x7fa2c80d1a00] error while decoding MB 0 33, bytestream 1015
[h264 @ 0x7fa2c80cee00] error while decoding MB 20 26, bytestream -5
[h264 @ 0x7fa2c80d4000] error while decoding MB 42 40, bytestream -5
[h264 @ 0x7fa2c80cee00] left block unavailable for requested intra mode
[h264 @ 0x7fa2c80cee00] error while decoding MB 0 11, bytestream 2881
Would you be so kind and share a working example?

Is there a difference between cv2 and opencv-python? I thought cv2 is only the namespace from the opencv-python package.
 

SteenN

Member
Joined
Nov 22, 2018
Messages
9
Reaction score
3
I also try the cod ein damiafuentes/DJITelloPy, but it does not seem to work for me on my Mac and Python 3.6. I get the following errors:

Code:
[h264 @ 0x7fa2cb886400] non-existing PPS 0 referenced
[h264 @ 0x7fa2cb886400] non-existing PPS 0 referenced
[h264 @ 0x7fa2cb886400] decode_slice_header error
[h264 @ 0x7fa2cb886400] no frame!
[h264 @ 0x7fa2cb886400] non-existing PPS 0 referenced
[h264 @ 0x7fa2cb886400] non-existing PPS 0 referenced
[h264 @ 0x7fa2cb886400] decode_slice_header error
[h264 @ 0x7fa2cb886400] no frame!
True
[h264 @ 0x7fa2c80d4000] error while decoding MB 0 42, bytestream -15
[h264 @ 0x7fa2c80d1a00] error while decoding MB 43 40, bytestream -13
[h264 @ 0x7fa2c80cf400] left block unavailable for requested intra mode
[h264 @ 0x7fa2c80cf400] error while decoding MB 0 41, bytestream 204
[h264 @ 0x7fa2c80d1a00] left block unavailable for requested intra mode
[h264 @ 0x7fa2c80d1a00] error while decoding MB 0 33, bytestream 1015
[h264 @ 0x7fa2c80cee00] error while decoding MB 20 26, bytestream -5
[h264 @ 0x7fa2c80d4000] error while decoding MB 42 40, bytestream -5
[h264 @ 0x7fa2c80cee00] left block unavailable for requested intra mode
[h264 @ 0x7fa2c80cee00] error while decoding MB 0 11, bytestream 2881
Would you be so kind and share a working example?

Is there a difference between cv2 and opencv-python? I thought cv2 is only the namespace from the opencv-python package.
The attached files are essentially the same as from damiafuentes - maybe with small modifications. In the same folder as tellofpv.py you can make a new python-file and write these 3 lines of code:

from tellofpv import TelloFPV
telloFPV = TelloFPV()
telloFPV.run()

I used pip to install nympy, cv2 and pygame on my Mac - on a Windows computer I couldn't install cv2 with pip. Instead I installed OpenCV-python
 

Attachments

  • Like
Reactions: Maersk65

r9kawai

Member
Joined
Feb 27, 2019
Messages
10
Reaction score
11
Hi Mr.HerAnt

I made below software ago.
(It use opencv, but on Linux)

Actually, I tried develop it on VisualStudio of windows before.
but, any method was dosen't work...
so I switched to Ubuntu 18.10.
(I think can work VM OS)

It is difficult to move around "H.264 decoder".
I struggled it...

I hope you can solve the problem.

P.S.
below web page is try some use case on Mac.
but, in Japanese. You can try this code?
 
  • Like
Reactions: Maersk65

New Threads

Members online

Forum statistics

Threads
3,353
Messages
26,111
Members
8,666
Latest member
afrestrepo