Home

Awesome

Shot Threading and Scene Detection

This is an implementation of some basic video processing tools. Currently, it assumes that shot detection has been performed. It also assumes that you have a suitable means of "reading" through video in Matlab, probably best with a frame burst.

The shot threading is further used for scene detection, as proposed in:


StoryGraphs: Visualizing Character Interactions as a Timeline
Makarand Tapaswi, Martin Bäuml, and Rainer Stiefelhagen
IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2014
Project page | Paper download | StoryGraphs code


Tested on

Ubuntu 12.04, Ubuntu 14.04, with Matlab versions: R2013a onwards.

First initialization

The <code>first_init.m</code> script will be called on running <code>startup.m</code> the first time. This will ask you to download sample shot frames for one video of The Big Bang Theory. The images have been downscaled by 2. Please follow the other instructions.


Example usage

Initialize the video data. <code>VideoStruct = BBT(1, 1); initParams;</code>

Compute similarity between every shot and N subsequent shots <code>ssim = shot_similarity(VideoStruct, params);</code>

Convert similarity to threads (by finding maximal cliques) <code>[Threads, shot_assigned] = similarity_to_threads(ssim);</code>

Visualize threading using python template engine <code>visualize_threads_via_htmlrender(VideoStruct, Threads, shot_assigned);</code>

Compute scene change locations <code>scene_breaks = dp_scenes(VideoStruct, params);</code>

Visualize scene detection using python template engine <code>visualize_scenes_via_htmlrender(VideoStruct, scene_breaks, params);</code>

Create support for a TV episode by providing the correct interface to VideoStruct (see initializers), and a way to load frames of the video. As an example, the repository includes a few frames of shots of one episode Big Bang Theory.


External toolboxes

Main functions


Visualization

Python Jinja can be used to automatically generate HTML pages to visualize and/or debug both the shot threading and scene detection results. See this blog post for a sneak peak

Changelog