Skip to content

Repository files navigation

comet-stack 🌠

uvCI

Extract moving objects from a video and composite them into a single image to create an artistic trajectory visualization like below:

inputoutput

This script has been used in multiple projects, including D4orm, LF, and db-LaCAM.

Quickstart

uv sync
uv run comet-stack --video-path ./assets/demo.mp4

Outputs are written to ./assets/demo_runs/ and a visual index is saved as ./assets/demo_runs/index.jpg.

How it works

  • Reads a video frame by frame.
  • Computes frame differences to detect moving regions.
  • Applies morphology operations to clean the mask.
  • Composites the extracted moving objects onto the last frame.

Options

comet-stack \
--video-path ./assets/sample.mp4 \
--output-dir ./runs \
--frame-skips 1,2,4,8 \
--kernel-sizes 1,3,5 \
--thresholds 10,20,30,40,50 \
--workers -1 \
--index \
--index-cols 5 \
--thumb-width 320

License

MIT

About

Generate comet stacking images from movies

Topics

Resources

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages