// ********************************************************************
// warthogNPWc
//
// Test framework for Chapter 5 in thesis, for earlier ICPR paper:
// NP-windowing and Mutual Information. This tests 6 different MI
// functions: STD, NP-windowed, Resolution Aware NP-windowed, PPZ,
// IPZ, and PVE.  By default (1-6), lattice-offset templates are used,
// but if parameter values of 7-12) are, lattice-aligned templates are
// used for testing.
//
//
// 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-12 are acceptable,
//                corresponding to SSD,NC,STD,PPZ,IPZ,PVE. Variable 
//                gfParams below defines these using the convention 
//                of warthog.mexglx. Default is 1-12.
//
// -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:
// npwResults/#X.bin : Optimised warp parameters.
// npwResults/#F     : Function values at optimised warp parameters.
// npwResults/#gt    : Ground truth warp parameters for function minimum.
// npwResults/#bgt   : Biased Ground truth warp params for function minimum.
// npwResults/#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 tstLoadNpw.m for an example. The order of
// dimensionality in ascending importance (from inner to outer loop):
// N vector components, 100 tests, 6 distances, 6 similarity measures,
// 5 intensity bin sizes, 5 template sizes, 8 images.
//
//
//  Author: N Dowson
//    Date: 9 Aug 2006
// ********************************************************************
