Matlab functions

The following functions have been tested on Matlab R14 sp 3 + Windows XP Home Edition 32bit sp 3

Feature extraction
Name
Description
Link
FullHistogram.m
Computes the 3D colour histogram
FullHistogram.m
MarginalHistograms.m
Computes and concatenates the marginal histogram of each channel
MarginalHistograms.m
Mean_.m
Computes the average value of each channel
Mean_.m
Mean_Hom.m
Computes the average value and homogeneity of each channel Mean_Hom.m
Mean_Std.m
Computes the average value and standard deviation of each channel Mean_Std.m
Mean_Std_Moments.m
Computes the average value, standard deviation and 3th to 5th moment of each channel
Mean_Std_Moments.m
Quartiles.m
Computes and concatenates the quartiles of each channel
Quartiles.m
Quintiles.m
Computes and concatenates the quintiles of each channel
Quintiles.m

General routines
Name
Description
Link
DoClassification
Performs supervised classification
DoClassification.m
ExtractImageFeatures.m Extracts colour features from the input image ExtractImageFeatures.m
EvaluateAccuracy.m
Evaluates classification accuracy
EvaluateAccuracy.m
GenerateTrainAndTestNumbers.m
Generates random subdivisions into train and test set
GenerateTrainAndTestNumbers.m
GetFileNames.m Returns the names of the files contained in a directory
GetFileNames.m
SCRIPT.m
Sample script
SCRIPT.m

Dependencies

The following additional Matlab toolboxes need to be downloaded and installed:



Instructions

  1. Create a new directory (e.g.: ./mydir);
  2. Create a directory for Matlab code (./mydir/code);
  3. Save the Matlab functions listed above in ./mydir/code;
  4. Create a directory to store the required toolboxes (./mydir/code/dependencies). Note that the additional toolboxes can also be installed elsewhere, provided they are accessible to Matlab. In this case the first four lines of SCRIPT.m can be removed;
  5. Create a directory to store the images (./mydir/data);
  6. Download and unzip the images from here. In doing so, maintain the following structure:
    • /mydir/data/RGB/IRK_01/(here go the unzipped images)
    • /mydir/data/HSV/IRK_01/...
    • /mydir/data/Lab/IRK_01/...
    • /mydir/data/RGB/OAK_01/...
    • /mydir/data/HSV/OAK_01/...
    • ...
    • /mydir/data/Lab/TEK_02/...
  7. Launch SCRIPT.m;
  8. Retrieve the results in /mydir/data/out. The script also generates the four graphs that appear in the manuscript.


DISCLAIMER
The information and content on this Web site are provided with no warranty whatsoever. Any use for scientific or any other purpose is conducted at your own risk and under your own responsibility. The authors are not liable for any damages, including any consequential damages, of any kind that may result to the user from the use of the materials on this Web site or of any of the products or services described hereon.