02/25/2010
pHash windows v0.9.0 

contact: eklinger@phash.org
            dstarkweather@phash.org 

dendencies:
	CImg 1.3.2 image processing library (all code is int cimg.h header file)
            ffmpeg libraries  (must reside on your PATH env variable)
		libavformat 52.39.2
                        libavcodec  52.41.0
                        libavutil 50.40.0
                        libswscale 0.7.1
             libjpeg static lib (for image hash jpeg support) -  (must define #define cimg_use_libjpeg)
             libpng  static lib(for image hash png support) -  ( must #define cimg_use_png)

*libjpeg and libpng only required if compiling the pHash.dll.

installation:
            unzip the installation file into a suitably chosen directory.  Create program in visual studio by linking to the bin 	subdirectory.  Add the directory in which cimg resides to the list of directories included.   Also, be sure the ffmpeg 	librarry directory location resides on the path.

            If compiling the phash.dll,  you must include the libjpeg and libpng static libraries in the project settings.

hash functions:

 Examples exist in the examples directory detailing how to use the different hash functions.

test_mhimagehash.cpp  - marr wavlet (based on edge/corner information)
 
test_audiophash.cpp    (based on bark scale frequency information)
test_audiophash_main.cpp

test_videohash.cpp - video hash based on low frequencies of the  dct transform 

texthash.cpp  - cyclic polynomial hashing of textual data
texthash2.cpp

mvp indexing file:

Examples exist in the examples directory detailing how to use the mvp tree indexing structure.  The basic sequence consists of building the tree from a core set of files, adding additional files to the db and then the ability to query for files.  The initial parameters for the tree structure are set in the build stage (in the MVPFile structure.  The key point of concern is to be sure that the page size is suitably large enough for the leaf capacity of each node.  (One page corresponds to one node of the tree structure.) Page size must be a power of 2 and at least as large as the system host page size (usually 4kb).   If the page size is insufficient, a suitable error code is returned.  Error codes are defined in phash.h header file.  The audio examples are set to read in the first 45 seconds of each file, so any subsequent queries must include at least part of that first 45 second clip.  You can change this time duration to include the whole file by setting to 0.  However, doing so will use up significantly more file space, as the audio hashes are variable in length.  So just be prepared to either increase the page size or reduce the leaf capacity.  

build_mvptree_audio.cpp
add_mvptree_audio.cpp
query_mvptree_audio.cpp

image hash using marr wavelet:

build_mvptree.cpp
add_mvptree.cpp
query_mvptree.cpp

imagehash using dct transform:

build_mvptree2.cpp
add_mvptree2.cpp
query_mvptree2.cpp