Source Code

Copyright Info

Copyright (C) 2006 Vincent Cheung

These programs are free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

These programs are distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

Epitome

The Matlab epitome code provided here is able to learn the epitome from array data with dimensions no greater than 3, eg. videos, images, audio, etc.  Code is also provided to reconstruct array data from an epitome.  Sample code and data is provided to aid in the use of this code.

  • LearnEpitome.m  [v0.9  Sept. 30, 2005]
    Learns the epitome of array data with dimensions no greater than 3, eg. videos, images, audio, etc.

  • EpitomeReconstruct.m  [v0.9  Sept. 30, 2005]
    Reconstructs array data from an epitome.

  • VideoEpitomeExample.m  [v0.1  Sept. 30, 2005]

    VideoEpitomeExampleData.mat (2 MB zipped)  [v0.2 Nov. 28, 2005]
    Demonstrates how to use the epitome code to learn the epitome of a video and reconstruct the video.

  • ImageEpitomeExample.m  [v0.1  Sept. 30, 2005]

    128 Dog.png
    Demonstrates how to use the epitome code to learn the epitome of an image and reconstruct the image.

Utility functions

These utility functions and classes serve to make common tasks easier.  Data interoperability between Matlab, Java, and C# is achieved through functions and classes that read and write multidimensional arrays to and from binary data files.  Working with images is simplified in Java and C# through helper classes to read and write images to and from files.  A simplified interface for using property files in Java (good for supplying parameters to a program) is also provided.

Matlab

  • ReadArray.m  [v1.0  March 10, 2004]

    WriteArray.m  [v1.1  Sept. 17, 2004]
    Functions for reading binary data from files to multidimensional arrays and writing binary data to files from multidimensional arrays.  Compatible with the Java and C# class ArrayReaderWriter.

Java

The Javadoc documentation for the following Java utility classes can be found here.

  • ArrayReaderWriter.java  [v1.3  Nov. 23, 2005, javadoc]

    ArrayReaderWriterExample.java  [v1.0  Nov. 23, 2005]
    Class for reading binary data from files into multidimensional arrays and writing multidimensional arrays to binary data files.  Compatible with the Matlab functions ReadArray and WriteArray and the C# class ArrayReaderWriter.  See ArrayReaderWriterExample.java for an example in how to use this class.

  • ImageReaderWriter.java  [v1.5  Nov. 23, 2005, javadoc]

    ImageReaderWriterExample.java, plant0.png, plant1.png, plant2.png  [v1.0  Nov. 23, 2005]
    Class for reading images from files to multidimensional arrays and writing images to files from multidimensional arrays.  The supported image formats are those natively supported by Java, i.e. JPEG, GIF, PNG.  See ImageReaderWriterExample.java, plant0.png, plant1.png, and plant3.png for an example in how to use this class.

  • EasyProperties.java  [v1.3  Dec. 2, 2005, javadoc]

    EasyPropertiesExample.java, SampleProperties.txt  [v1.2  Dec. 2, 2005]
    Wrapper for the Properties class to make reading data from and writing data to a properties file easier, especially numbers and multi-dimensional arrays. This class lets you write and read boolean, int, double, string, int arrays (int[], int[][], int[][][]), double arrays (double[], double[][], double[][][]), and String arrays (String[]) to and from a file.  See EasyPropertiesExample.java and SampleProperties.txt for an example in how to use this class.

C#

  • ArrayReaderWriter.cs  [v1.1  Aug. 5, 2004]
    Class for reading binary data from files to multidimensional arrays and writing binary data to files from multidimensional arrays.  Compatible with the Matlab functions ReadArray and WriteArray and the Java class ArrayReaderWriter.

  • ImageReaderWriter.cs  [v1.0  Aug. 3, 2004]
    Class for reading images from files to multidimensional arrays and writing images to files from multidimensional arrays.  The supported image formats are those natively supported by C#, i.e. BMP, JPEG, GIF, PNG.