Image sets: Convert templates to jpg
ImageSet: Class to read image sets

The ImageSet class simply reads an imageset directory, loading the
template and all images, to provide easy access.
hw4.m: Load image sets

Use the ImageSet class to load all sets into memory.
extractTemplate: Plot the matches for debugging
Implemented voting for keypoints

The 'keypointVotes' function decides which of the keypoints are actually
on the object, by having each keypoint vote for the object's center and
taking the keypoints that voted with the majority.
keypointVotes: Added 'replicates' option to kmeans

This option runs kmeans more than once and returns the best solution.
findTemplate: Find template in test image

The extractTemplate function was re-written into findTemplate, which
does not extract, but only returns points of the object which were found
in the test image.

Also:
    * Added input parameters for configuration
    * Revised the debug-plots
    * Wrote documentation
ImageSet: Added size property

This returns the set size, or number of images in the set.
keypointVotes: Validate input matrices

Also init kmeans differently according to inputs to prevent an error.
findTemplate: Better inputs and outputs

findTemplate can now accept as input and return as output the
descriptors and keypoints of the template image, to avoid
re-computation.

The function now only shows a plot if the number of outputs is zero.
ImageSet: Add L*a*b

Images are now also converted to L*a*b format.

Also imroved speed, as the images are no longer read twice from disk.
hw4.m: Prevent loading image-sets more than once
Added GraphCut MATLAB library
ImageSet: getLabels() initial implemenation

This function applies template finding and labling on the image set.
It just loops over all images in the set and uses the other scripts to
do the actual work.

Added a stub for the lableling function, 'labelTemplate.m'.
ImageSet: getLabels() approximate labels computation

The approxmateLabels is a mask defining the region of the image
which is considered background, and the region which might contain the
desired object.
ImageSet.geLabels(): Compute seed matrix for labelTemplate

The 'labelTemplate' function now accepts a seed matrix, which has '0'
in background pixels, '1' in the object region (area containing the
object, but also contains other pixels), and '2' in the keypoints which
are known to be on the object in the test image.

get getLabels() function now creates this seed matrix and passes it to
labelTemplates() which is currently still a stub.
ImageSet.getLabels(): Accept image numbers

The getLabels function now accepts an input parameter which allows to
specify the exact images the calculation should be done for.
Initial impl. of GraphCut segmentation

The labelTemplate function attemps to extract the object using graph cut
segmentation.
labelTemplate: Better unary potential function

The unary potentials are now calculated by comparing the warped version
of the template image to the region in the test image that should
contain the object.

It seems to yield better results but the implementation is still buggy.
labelTemplate improvements

Improved the comparison between the warped template and the image.
The image region's indices are now calculated correctly to prevent
out-of-bounds bugs.
The warped template is now cropped to make sure it's the same size as
the respective image region.
Comparison is done with gradient magnitude and direction.

Morphological operations are now applied to the final label image in
order to remove small holes from it.