基于图像粘贴技术的摄像机运动补偿

camocomp的Python项目详细描述


它是什么

camocomp是一个可以稳定视频的python包,即生成 补偿摄像机运动的视频拷贝。这将生成一个视频 固定背景(如建筑物、道路)看起来是静态的。

它能用于什么

相机运动补偿可用于各种任务,包括

  • stabilizing camera shake
  • recovering the camera motion for video and scene analysis
  • differentiating between the foreground motion (e.g. of actors) and the motion caused by the moving camera (for motion analysis)

从何处获取

源代码当前托管在github上,位于:http://github.com/daien/camocomp

python上提供了最新版本的二进制安装程序 包索引:

http://pypi.python.org/pypi/camocomp/

通过easy_installpip

easy_install camocomp
pip install camocomp

依赖关系

  • Numpy: 1.6.1 or higher
  • Hugin: a recent version (around 2012)
  • FFmpeg: a recent version (around 2012)
  • OpenCV: version 2.4.1 or higher (fixes a bug of the ffmpeg wrapper)

注意:这个包依赖于hugin的python脚本接口(hsi): http://wiki.panotools.org/Hugin_Scripting_Interface

从源安装

camocomp目录中(与找到此文件的目录相同),执行:

python setup.py install

注意:这只适用于类unix平台。

许可证

新的BSD许可证

如何使用

我们提供了一个名为camocomp_video的实用程序脚本,它可以生成 视频的稳定拷贝。

example目录中的视频example_mocomp.avi包含 使用以下命令获得稳定视频:

camocomp_video -o example_mocomp.avi -c  -v p_y -f 40 example.avi

根据您的输入视频,您可能需要播放输入 视野参数(-f选项)和/或要优化的变量 ('v'iewpoint,'p'itch,'y'aw和'r'oll)。

它是如何工作的

它依赖于与创建 多张照片的全景图。这样可以补偿大量 时变相机运动(如相机抖动、平移、缩放、倾斜)。

限制

缝合方法面临以下限制:

  • it assumes that a large part of each frame is the background;
  • it also assumes that the background is textured (in order to detect ^{tt7}$ on the background);
  • the spatial extent of the camera motion must be rather limited (i.e. restricted panning or translation, such that the background covered is limited) in order to avoid an extravagantly large output resolution;
  • some camera motions are problematic (e.g. rotation around the subject);
  • finding the correct input field of view parameter might require some trial and error;
  • the stitching optimization step (using hugin’s autooptimizer) is VERY slow.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java为什么程序显示空结果?   java应用程序在测试设备上调试时工作正常,但在发布版apk中没有,它没有获得post。来自firebase的类变量   java Android:从主活动按钮确定在listview中选中哪个复选框   在Spring中添加@OneToOne注释时启动ApplicationContext时发生java错误   用JAVA Android实现矩阵计算的最快方法   SpringJava语义有没有更好的编写方法?   java从hashmap中减去两个值后返回最小差值的键?   Java中的静态初始化顺序:Netty 4.0.7的例外   java如何检查用户输入是否为字符串   循环Java计数单词索引   java如何使用以下代码将视频流传输到Android异步Http服务器?   java如何在jtable的所有行中循环   java如何使用maven将unicode插入mysql   java使用安卓加速远程数据检索   java试图模拟麦克风(javax.sound.sampled)   swing SwingWorker从不归还任何东西?(爪哇)   首次在Android Studio上未加载java LibGDX文件   java如何在多个Mysql服务器上设置限制和偏移?   如何防止从java连接到mongodb时登录控制台?