// ********************************************************************
// warthogSRMIc
//
// Test framework for Chapter 4 in thesis and the PAMI SRMI paper:
// Super-Resolution and Mutual Information. This tests 22 different MI
// functions: 
//
// 1-13 use Lattice-Offset templates:, STD(SR*=1), STD(SR=1/2), STD(SR=1/4),
// STD(SR=1/8), PPZ(o*=3), PPZ(o=5), IPZ(o=1), IPZ(o=2), IPZ(o=3),
// PVE(o=1), PVE(o=2), PVE(o=3), PVE(o=1)+scaled & offset (lattice
// desynch'd) template.
//
// 22 uses a lattice-offset template for STD(SR=1/16).
//
// 15-17 use Lattice-aligned templates: STD(SR=1), PPZ(o=3), IPZ(o=2),
// PVE(o=2).
//
// 18-21 use smoothed templates: STD(SR=1), PPZ(o=3), IPZ(o=2),
// PVE(o=2).
//
//
// * SR = sample rate.
// * o = function order
//
//
// Input parameters:
//
// -i#-# or -i# : for range of images numbers. 1-8 are acceptable.
//                Default is 1.
//
// -t#-# or -t# : for range of template sizes. 1-5 are acceptable,
//                corresponding to sizes of 9^2,11^2,...17^2.
//                Default is 1-5.
//
// -p#-# or -p# : for range of parameters to test. 1-22 are acceptable,
//                corresponding to SSD,NC,STD,PPZ,IPZ,PVE. Variable 
//                gfParams below defines these using the convention 
//                of warthog.mexglx. Default is 1-22.
//
// -d#-# or -d# : for a range of the histogram bin-sizes. 1-5 are
//                acceptable, corresponding to 16,8,4,2,1 intensities. 
//                Default is 1 or 16 intensities.
//
// -w#-# or -w# : for a subset of the warps. 0-599 are acceptable.
//                Default is 0-599.
//
// -f########   : A base filename to be used for the  outputs.
//
//
// Prerequisities:
// data/... 182 files: Containing the 16 test images (8 smoothed, 8
//                     normal), 3 ground truth files for lattice-aligned 
//                     / lattice-offset / rotated + scaled templates, 
//                     160 templates: 8 images * 5 sizes * 4 
//                     (lattice-aligned / lattice-offset / smoothed / 
//                     rotated+scaled); 3 parzen windows.
//
// warpUni.bin       : File with the 600 random initial offsets.
//
//
// Outputs:
// srmiResults/#X.bin : Optimised warp parameters.
// srmiResults/#F     : Function values at optimised warp parameters.
// srmiResults/#gt    : Ground truth warp parameters for function minimum.
// srmiResults/#bgt   : Biased Ground truth warp params for function minimum.
// srmiResults/#time  : Time taken for each optimisation.
//
//
// Notes: 
//
// 1. All the binary files my be read in matlab by calling "readMat.m"
// and written by calling "writeMat.m". Use the help for these
// functions for more details.
//
// 2. Some of the data matrices need 6 dimensions to describe
// them. The image library used here can describe 4D images, and only
// 2D images are used here. Hence the .bin files must be reshaped
// before use. See tstLoadSrmi.m for an example. The order of
// dimensionality in ascending importance (from inner to outer loop):
// N vector components, 100 tests, 6 distances, 22 similarity measures,
// 5 intensity bin sizes, 5 template sizes, 8 images.
//
//
//  Author: N Dowson
//    Date: 9 Aug 2006
// ********************************************************************
