0

I am currently working on PTAM(Parrallel tracking and mapping), successfully compiled it on windows with visual studio 2008, also had managed to change the video source to normal usb webcam with EWC libarary from default CMU1394 camera driver.

However I am trying to find a way to access the video source to the ip camera from Parrot ARDrone 2.0 (even though I am able to access the ardrone camera with both opencv and FFmpeg individually, don't how to link them all together), through search on the web I couldn't find much resources. If there is someone who working on PTAM, can possibly share some ideas of changing the PTAM video source to an ip camera or ardrone camera.

Many thanks

  • Eventually found an appropriate solution to this, but not the best yet, it is using the openCV to open the webcam sources, this includes the ip camera, now the problem is temporally solved. If there are any better idea, please help me out. Thanks. – user3395949 Mar 16 '14 at 20:44

1 Answers1

0

You don't need openCV to gather the PaVE packets and decode them. You can do that with FFMPEG alone (I recommend two threads, one is a client, the other the h264 decoder). However, converting the image data to a cv::Mat from openCV is extremely useful and gives you access to all of openCV's powers.

You convert to a cv::Mat as follows:

cv::Mat img(height,width,CV_8UC3,pictureBGR->data[0]);

where pictureBGR is the AVFrame pointer you received back from FFMPEG's avcodec_decode_video2() and sws_scale()

dainsleif
  • 81
  • 1
  • 8