问题
I'm working on an image processing project for the Parrot AR.drone, using opencv4Android, i'm so new to the whole thing! , does anyone have an idea about how to read in video streams from the ARDrone using OpenCV, the samples shows how to get video input from a webcam only
the video is encoded in H.264 format,and the drone adds a proprietary header (called PaVE) to every video frame, apparently that's why Android fails to load the video stream..
thanks
回答1:
You need a PaVE parser that will strip the PaVE headers off the H.264 frames before you can decode them and feed them to OpenCV.
There are some PaVE parsers around. Maybe you can use one as-is, or adapt it for your use.
- The official AR.Drone SDK (downloadable here: https://projects.ardrone.org/) includes C code for decoding PaVE; see the
video_com_stage.c
,video_stage_tcp.c
,video_stage_decoder.c
andvideo_stage_ffmpeg_decoder.c
files in itsARDroneLib/Soft/lib/ardrone_tool/Video
folder - Javascript (part of the node-ar-drone project): https://github.com/felixge/node-ar-drone/blob/master/lib/video/PaVEParser.js
- C gstreamer module: https://projects.ardrone.org/boards/1/topics/show/4282
- ROS drivers (by Willow Garage, who also created OpenCV): https://github.com/AutonomyLab/ardrone_autonomy
来源:https://stackoverflow.com/questions/16507134/ardrone-video-stream-decoding-in-android