- Notifications
You must be signed in to change notification settings - Fork0
ychalier/transflow
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Set of tools for transferring optical flow from one media to another.
This tool extractsoptical flow as a dense velocity field from a video input (file or stream) and applies it to an image, a video file or stream, for creative purposes. Multiple techniques can be used, various parameters can be tuned to precisely craft visual effects directly from raw raster data. Here is how it looks (click to view in full resolution):
Flow Source | Bitmap Source | Result |
---|---|---|
![]() | ![]() | ![]() |
Have a look at:
You'll need a working installation ofPython 3. You'll also needFFmpeg binaries, available inPATH
, theffmpeg -version
command should work.
The process should be straightforward.
- Download thelatest release
- Install it with
pip
:pip install ~/Downloads/transflow-1.7.1.tar.gz
- Test installation:
python -m transflow --help
If you want to access the code.
- Clone ordownload this repository:
git clone https://github.com/ychalier/transflow.gitcd transflow
- Install requirements:
pip install -r requirements.txt
- Test installation:
python transflow.py --help
The simplest process consists in taking the motion from a video file and applying it to an image:
transflow flow.mp4 -b image.jpg -o output.mp4
The aliastransflow
represents eitherpython -m transflow
orpython transflow.py
, depending on the chosen installation method. For more details, seeUSAGE.md.
This repository also contains two other versions of this program:
- in thecpp folder, a C++ version using OpenCV to transfer the flow from one webcam to another,
- in thewww folder, a WebGL version that emulates the effect in a web browser; a version is hosted onchalier.fr/transflow.
There are also other modules:
- viewflow, for visualizing and inspecting optical flow in a video player setting,
- control, for generating alteration images (seeBitmap Alteration).
Contributions are welcomed. Do not hesitate to submit a pull request with your changes! Submit bug reports and feature suggestions in theissue tracker.
This project is licensed under the GPL-3.0 license.
About
Optical Flow Transfer