infuanfu / study-0

Study on possible palette to genre correlations in anime trailers
1 stars 0 forks source link

Color patch image generator #9

Open hdznrrd opened 10 years ago

hdznrrd commented 10 years ago

Create color patch images from histogram data to easily and visually evaluate intermediate data results

hdznrrd commented 10 years ago

Histogram data to color patch image. Currently only works with fixed size images. Uses convert itself to do on the fly color quantization (-colors)

histbin_to_magickdraw.pl converts imagemagick histogram output to width-relative color patch draw commands which can be fed into convert again.

sh -c "convert -size 1280x50 xc:black $(convert  frames/01616.png -colors 16 -define histogram:unique-colors=true -format %c histogram:info:-|sort -rn|../histbin_to_magickdraw.pl) patch.png" && eog patch.png
hdznrrd commented 10 years ago

Currently it produces results like this (original in background, color patch image in overlay, compositing done manually): sneakpeek

video: http://www.youtube.com/watch?v=qig4KOK2R2g frame: 1616 color bins: 16