Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Optical Flow Transfer

License

NotificationsYou must be signed in to change notification settings

ychalier/transflow

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 SourceBitmap SourceResult
River.mp4Deer.jpgOutput.mp4

Have a look at:

Getting Started

Prerequisites

You'll need a working installation ofPython 3. You'll also needFFmpeg binaries, available inPATH, theffmpeg -version command should work.

Basic Installation

The process should be straightforward.

  1. Download thelatest release
  2. Install it withpip:
    pip install ~/Downloads/transflow-1.7.1.tar.gz
  3. Test installation:
    python -m transflow --help

Alternative Installation

If you want to access the code.

  1. Clone ordownload this repository:
    git clone https://github.com/ychalier/transflow.gitcd transflow
  2. Install requirements:
    pip install -r requirements.txt
  3. Test installation:
    python transflow.py --help

Usage

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.

Additional Resources

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:

Contributing

Contributions are welcomed. Do not hesitate to submit a pull request with your changes! Submit bug reports and feature suggestions in theissue tracker.

License

This project is licensed under the GPL-3.0 license.


[8]ページ先頭

©2009-2025 Movatter.jp