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?
 
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.
 
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

  • tellofpv.zip
    13.7 KB · Views: 79
  • Like
Reactions: Maersk65
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 Posts

Members online

Forum statistics

Threads
5,690
Messages
39,934
Members
17,023
Latest member
Repiv

New Posts