Skip to main content
File added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

What is it

camocomp is a Python package that can stabilize videos, i.e. generate a video copy in which the camera motion is compensated. This results in a video where the fixed background (e.g. buildings, roads) appears to be static.

What can it be used for

Camera motion compensation is useful for a variety of tasks, including

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

Where to get it

The source code is currently hosted on GitHub at: http://github.com/daien/camocomp

Binary installers for the latest released version are available at the Python Package Index:

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

And via easy_install or pip:

easy_install camocomp
pip install camocomp

Dependencies

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

Note: this package relies on Hugin’s python scripting interface (HSI): http://wiki.panotools.org/Hugin_Scripting_Interface

Installation from sources

In the camocomp directory (same one where you found this file), execute:

python setup.py install

Note: this only works on Unix-like platforms.

License

New BSD License

How to use it

We provide a utility script called camocomp_video that can generate a stabilized copy of a video.

The video example_mocomp.avi in the example directory contains a stabilized video obtained with the command:

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

Depending on your input videos, you might need to play around with the input field of view parameter (-f option) and/or the variables to optimize (‘v’iewpoint, ‘p’itch, ‘y’aw, and ‘r’oll).

How does it work

It relies on image stitching techniques similar to the ones used to create panoramas from multiple photos. This allows to compensate for a vast array of time-varying camera motions (e.g. camera shake, pan, zoom, tilt).

Limitations

The stitching approach faces the following limitations:

  • it assumes that a large part of each frame is the background;

  • it also assumes that the background is textured (in order to detect control points 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.

Release files for camocomp 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for camocomp 0.1
File Size Uploaded
camocomp-0.1.tar.gz 1.2 MB Details

Release files / camocomp-0.1.tar.gz

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL camocomp-0.1.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
a06c5efc6c559d5db270b870763f5326babfa729dd448815277157b75e433708
BLAKE2b-256 checksum
How to use checksums
b16d7621521012fdfbf9bd31b9f1cf505e7e9d41108e81c351cd8865e23b6dc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page