Skip to content

Latest commit

 

History

History
57 lines (36 loc) · 1.88 KB

README.md

File metadata and controls

57 lines (36 loc) · 1.88 KB

Movies' Color Fingerprint

These routines take a movie, and export it's color fingerprint by calculating the dominant colors present in uniformly-spaced frames across the video. They do so by splitting a movie into frames, clustering the colors in each of the frames, and plotting the most prevalent ones in a heatmap (x-axis shows time, while the y-axis shows the different clusters of colors).

Princess Mononoke Spirited Away Nausicaä of the Valley of the Wind The Wind Rises Castle in the Sky

Instructions

After installing the dependencies, run the bash script as follows:

./fingerprint.sh VIDEO_FOLDER OUTPUT_FOLDER VIDEO_NAME MOVIE_TITLE_STRING

For example, the following call looks for the Totoro.mp4 file in the ./Movies path and generates the output in the ./Art folder with the supplied title:

./fingerprint.sh './Movies' './Art' 'Nausicaa.mp4' 'Nausica0xC3\nof the\nValley\nof the\nWind'

Which exports this fingerprint:

Requirements and Dependencies

These routines need ffmpeg to re-scale the movie and export frames to disk. Additionally, the following python libraries are needed: ffmpeg-python, scikit-learn, matplotlib, numpy.

These libraries can be installed manually, or to anaconda environments with:

conda env create -f REQUIREMENTS.yml

or

conda create -n new fingerprint --file REQUIREMENTS.txt

Author


Héctor M. Sánchez C.