MeasTex Binaries and Scripts
The MeasTex framework is modular and simple to use. To improve the
effectiveness and maintain consistency, a number of programs have been
supplied. These programs (binaries and scripts) provide useful
utilities and control.
Scripts
- cleanalg algorithm
- "clean-up" algs/algorithm.alg directory, removing .out
and .score* files. This script must be invoked in the root directory
of the distribution unless the MEASTEX_ROOT environment variable has
been set.
- collateResults
algorithm [options]
- collate the .score or .score_wta
files for algorithm, generating a .res or .res_wta file,
respectively (depending on the wta option) for each
test suite. This script must be invoked in the root directory of the
distribution unless the MEASTEX_ROOT environment variable has been
set. Valid options are
- wta - winner-take-all outputs. The default is
probabilistic outputs.
See also runscore.
- genAlgHTML
algorithm
- generate HTML file summarising results for
algorithm. This script must be invoked in the root directory
of the distribution unless the MEASTEX_ROOT environment variable has
been set. This script requires that collateResults has been run with argument
algorithm first. See also genResHTML.
- genResHTML
- generate
HTML file in the root/algs directory with links to all
individual algorithm result HTML files (creating them if necessary by
calling genAlgHTML). This script must be
invoked in the root directory of the distribution unless the
MEASTEX_ROOT environment variable has been set.
- processAllScores
[options]
- calls processScores
for all valid algorithms in algs directory. This script must be
invoked in the root directory of the distribution unless the
MEASTEX_ROOT environment variable has been set. Valid
options are
- wta - winner-take-all outputs. The default is probabilistic outputs.
- pn - normalize by probabalistic normalization of priors
- bn - normalize by binary normalization of priors
- nn - do not normalize by priors [Default]
Using the wta option with the nn option will give percentage correct results.
WARNING:
Separate result files are not generated for different normalization options.
Be Careful.
- processScores
algorithm [options]
- calls runscore
then collateResults with
algorithm as argument. This script must be invoked in the
root directory of the distribution unless the MEASTEX_ROOT environment
variable has been set. Valid options are
- wta - winner-take-all outputs. The default is probabilistic outputs.
- pn - normalize by probabalistic normalization of priors
- bn - normalize by binary normalization of priors
- nn - do not normalize by priors [Default]
Using the wta option with the nn option will give percentage correct results.
WARNING:
Separate result files are not generated for different normalization options.
Be Careful.
- runalg algorithm
[command]
- calls runtype for each test
suite in the imgs directory. If command is not given, the
command is assumed to be algorithm. This script must be
invoked in the root directory of the distribution unless the
MEASTEX_ROOT environment variable has been set. The directory
algs/algorithm.alg is created if it does not already
exist.
- runtest algorithm suite
test [command]
- runs command passing the test file
as an argument and storing the results in the file
algs/algorithm.alg/suite.ts/test.out. This
script must be invoked by runtype unless the
MEASTEX_ROOT environment variable has been set.
- runtype algorithm suite
[command]
- calls runtest for each test
in the imgs/suite.ts directory. This script must be invoked
by runalg unless the MEASTEX_ROOT environment
variable has been set.
- runscore algorithm
[options]
- scores all .out files for algorithm,
generating a .score or .score_wta file (depending on
wta option) for the individual tests in each test
suite by calling scoretest with the appropriate
arguments. This script must be invoked in the root directory of the
distribution unless the MEASTEX_ROOT environment variable has been
set. Valid options are
- wta - winner-take-all outputs. The default is probabilistic outputs.
- pn - normalize by probabalistic normalization of priors
- bn - normalize by binary normalization of priors
- nn - do not normalize by priors [Default]
Using the wta option with the nn option will give percentage correct results.
WARNING:
Separate result files are not generated for different normalization options.
Be Careful.
See also collateResults.
Utilities
- makeBrick
[options]
- generate artificial brick texture files.
Valid options are
- -elong f - elongation factor [1]
- -theta f - background rotation angle (degrees) [0]
- -intense i - "blob" intensity [64]
- -density f - "blob" density [4]
- -mgrey i - mortar grey level [255]
- -bgrey i - max. brick grey level [191]
- -nomortar - use no mortar [OFF]
- -lattice - overlay mortar [OFF]
- -bx i0 [i1] - X dimension of alternate bricks (pixels) [10; i1 = i0]
- -by i - Y dimension of bricks (pixels) [10]
- -X i - X dimension of output image (pixels) [512]
- -Y i - Y dimension of output image (pixels) [512]
- -out file - output image filename [zz.pgm.gz]
- -src - output source image also [OFF]
- makeTestFile
[options] class1_ListFile class2_ListFile [ class3_ListFile
... ]
- generate .Test and .Valid files for a test by
selecting component images from each of the classes. The list files
are usually generated by pgmshatter. Valid
options (can occur anywhere in argument list) are
- -s seln - selection scheme (one of sequential, alternate, random) [sequential]
- -o outBase - base filename for test/valid files
- -p f - prior for the following class
- -w f - weight for the following class
- pgmshatter [options]
origImage
- "shatter" an image into smaller images. A .list
file is written containing the filenames of the resulting images.
Valid options are
- -x i - X dimension of output images [32]
- -y i - Y dimension of output images [32]
- -i i - starting index for output files
- -r i - select a random starting corner within an i x i grid [0]
- -90 - rotate each subimage by 90 degrees [OFF]
- -o base - base filename for output images ["img"]
- scoretest [options]
outFile validFile
- scores an output (.out) file using the
corresponding validation (.Valid) file. The scores are printed to
standard out. Valid options are
- -wta - winner-take-all outputs. The default is probabilistic outputs.
- -pn - normalize by probabalistic normalization of priors
- -bn - normalize by binary normalization of priors
- -nn - do not normalize by priors [Default]
Using the -wta option with the -nn option will give percentage correct results.
WARNING:
Separate result files are not generated for different normalization options.
Be Careful.
See also runscore.
Algorithms
NOTE: When using the multivariate Gaussian classifier in these
algorithms, ensure that the total number of features is less than the
number of example images for each class.
- gaborClass [options]
testFile
- Apply Gabor convolution-based classifier to test testFile.
Classification results are written to standard output. Valid
options are
- -sd f - Std Dev. of Gaussian
- -w i - side of 2d convolution mask (pixels) [17]
- -texton - texton interpretation; SD = wavelength/2 [ON]
- -fourier - fourier interpretation; SD = window/4 [OFF]
- -lambda i0,i1,... - calculate for each wavelength in list (pixels) [2,4,8]
- -theta f0,f1,... - calculate for each angle in list (degrees) [0,45,90,135]
- -mvg - Multivariate Gaussian Bayes Classifier [DEF]
- -knn i - K-Nearest Neighbor Classifier with i neighbors
- glcmClass [options]
testFile
- Apply GLCM-based classifier to test
testFile. Classification results are written to standard
output. Valid options are
- -q i - requantize to i grey levels [0 - All]
- -ag - average GLCM over angles [OFF]
- -af - average features over angles [ON]
- -d i0,i1,... - calculate features for each distance in list (pixels) [1]
- -theta f0,f1,... - calculate features for each angle in list (degrees) [0,45,90,135]
- -mvg - Multivariate Gaussian Bayes Classifier [DEF]
- -knn i - K-Nearest Neighbor Classifier with i neighbors
- -impl impln - Use feature set implementation of
- CH80 - Conners and Harlow 1980 - energy, entropy, inverse difference moment, inertia, correlation
- CTH84 - Conners, Trivedi and Harlow 1984 - energy, entropy, inverse difference moment, inertia, cluster shade, cluster prominence
- WDR76 - Weszka, Dyer and Rosenfeld 1976 - inertia, energy entropy, Haralick's correlation
- MT - MeasTex [CTH84 + correlation] - energy, entropy, inverse difference moment, inertia, correlation, cluster shade, cluster prominence
NOTE: The glcmClass program in the
beta version of the MeasTex framework (released October 1996)
contained a bug in the code for creating a symmetric GLCM. This bug
is fixed in the v1.0 release but results obtained with the beta
version of glcmClass are invalid.
- markovClass
testFile
- Apply Gaussian Markov Random Fields-based
classifier to test testFile. Classification results are
written to standard output. Valid options are
- -mask mask - symmetric GMRF mask (stdNs [N=1,7], cross5s) [std4s]
- -mvg - Multivariate Gaussian Bayes Classifier [DEF]
- -knn i - K-Nearest Neighbor Classifier with i neighbors
- fractalClass
testFile
- Apply Fractal Dimension-based
classifier to test testFile. Classification results are
written to standard output. Valid options are
- -s i - Maximum scale (pixels) [10]
- -p i - block overlap (%) [50]
- -mvg - Multivariate Gaussian Bayes Classifier [DEF]
- -knn i - K-Nearest Neighbor Classifier with i neighbors