Skip to content

lassethorlepik/pixel-changes-glow-visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Motion Ghosting Heatmap (Frame-to-Frame)

This tool takes a folder of sequential PNG frames (e.g. extracted from a video), detects per-pixel movement between consecutive frames, and renders a “motion ghosting” visualization as output frames you can stitch back into a video.

  • Movement pixels reset their “age” to 0.
  • Non-moving pixels accumulate age each frame.
  • Output color is based on age (a heatmap-like HSV mapping), producing a ghosting trail effect over time.
output_005188

Requirements

  • Python 3.9+ recommended
  • Dependencies:
    • numpy
    • Pillow (PIL)

Optional (recommended for video workflows):

  • ffmpeg available on your PATH

Install Python deps:

python -m pip install numpy pillow

Useful commands for the average workflow

Create a folder

mkdir frames

Split your input video into frames

ffmpeg -i input.mp4 -vsync 0 frames/frame_%06d.png

Process the frames

python motion_ghosting.py --input frames --output output --fps 60 --fade-seconds 1 --pad-digits 6

Merge processed frames back into a video

ffmpeg -framerate 60 -i output/output_%06d.png -c:v libx264 -pix_fmt yuv420p output.mp4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages