frei0r icon indicating copy to clipboard operation
frei0r copied to clipboard

Add pixel-sorting filter

Open sjbarag opened this issue 5 years ago • 1 comments

Not sure if new filters are welcome, but I figured I'd submit something I've been hacking on lately!

s0rter is a filter that sorts each frame's pixels by hue, saturation, and lightness (in order of decreasing priority), producing a rainbow-like effect that's especially interesting for frames of animated content with a limited color palette. While it's not configurable in this iteration, it can easily be extended to support arbitray hue/saturation/lightness ordering.

For a given input (here an SMPTE test pattern generated by ffmpeg -f lavfi -i smptebars -t '0.0333' smpte.mp4): smpte001

the s0rter filter produces this output (via FREI0R_PATH=./src/filter/s0rter/ ffmpeg -i smpte.mp4 -vf "frei0r=filter_name=s0rter" smpte.s0rted.mp4): smpte001 sorted

sjbarag avatar May 01 '20 05:05 sjbarag

Just bumping this PR since it's been a while :smiley:

sjbarag avatar Sep 07 '20 14:09 sjbarag

closing for lack if activity, please re-open whenever you are back in this @sjbarag

jaromil avatar Feb 26 '23 19:02 jaromil