Skip to content

creampuffle/silhouette-vectorizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Silhouette Vectorizer

Small command-line vectorizer I made for turning grayscale animation frames into compact filled silhouettes.

It traces the white parts of each frame into closed contours, removes unnecessary points, and writes my simple SILHVEC1 animation format. Repeated frames share the same encoded data instead of being stored twice.

Build

dotnet build -c Release

Use

dotnet run -c Release -- INPUT.gray OUTPUT.svf WIDTH HEIGHT FPS TOLERANCE

INPUT.gray is a raw stream of 8-bit grayscale frames with no header. Every frame must be exactly WIDTH x HEIGHT bytes. Pixels at 128 or above are treated as part of the silhouette.

Example:

dotnet run -c Release -- frames.gray animation.svf 160 120 30 1.5

Run python tests/smoke_test.py to test a small three-frame conversion.

Released under the BSD 3-Clause License. Please keep the copyright and license notices.

About

Converts raw grayscale frame streams into compact deduplicated even-odd contour animations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors