简体   繁体   中英

How to change PTAM's video source to an IP camera?

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

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()

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM