# Keyframe-Based Video Summarization Designer

Designer is a Java application for creating a one-picture video summary from keyframes by drag and drop arrangement in tiles. Tile layout templates are defined via XML-Files.

## Build

### Requirements

Designer requires the following software to be installed:

* Ant (Version >= 1.9.0)
* Java Development Kit (Version >= 8)

### Binaries

The repository already contains all needed libraries for Windows and Linux 32-bit and 64-bit aswell as Mac OSX.

```sh
git clone https://github.com/adotw/designer.git
cd designer
ant win32/win64/lin32/lin64/osx
```

## Templates

Templates are defined via XML-Files. Each template has an overall width and consists of multiple rows with tiles and possible sub-tiles which can contain rows aswell.

Let's look at an example:

```xml
<template width="1000">
	<row height="300">
		<tile width="700" />
		<tile width="300">
			<row height="150">
				<tile width="150" />
				<tile width="150" />
			</row>
			<row height="150">
				<tile width="300" />
			</row>
		</tile>
	</row>
	<row height="200">
		<tile width="200" />
		<tile width="200" />
		<tile width="600" />
	</row>
</template>
```

The first line defines the overall width of the template (something around 1000px is generally a good idea).

After that the main rows follow, there has to be at least 1 row in a template up to as many as you want (each row has a defined height which has to be at least 50px) - so this example gives us a Template which is 1000px wide and 500px high.

Every row has to contain at least 1 Tile up to as many as you want (each tile has a defined width which has to be at least 150px) - this gives us a Template with 2 rows, whereas in the first row there are 2 Tiles and 3 Tiles in the second row (the sum of the tile widths has to match the overall width of the Template).

Also every Tile in the Template can be a new Template as well so to speak - so every Tile can contain rows which contain Tiles - this recursion works infinitely and is constrained only by the minimal width of the tiles.

## Bugs and Workarounds

Tiles offer the functionality to zoom and flip the image which is presented in the tile - both of these functions manipulate the images offset and position in the tile itself so it sometimes happened that the image was not aligned correctly anymore within the tile.

The workaround to this problem was to reset the offset and positioning of the image to the default value to remove the risk of possible misalignment.

## Library

This application makes heavy use of [JavaCV](https://github.com/bytedeco/javacv) for keyframe extraction.

## Author

[Andreas Waltenberger](mailto:andreas.waltenberger@student.tuwien.ac.at)

Vienna University of Technology
