Feature Extraction from Images

The utility extracts various groups of features from input images ("-i"). It can output the resulting image descriptions either in XML form ("-oxml") or in a binary format ("-obin"). In both cases the output also includes a description of the representation used.

One or more input file parameters can be specified. Each can have the following form:

The input files should be in BMP format, with 24 bits per pixel.

All image representations currently supported by the program are based on a quantization of the color space into a limited set of colors. The "-gran:Qr,Qg,Qb" parameter should be used to specify the granularity of the quantization. Each axis of the color space is divided into Q* sections. Thus, if a pixel originally had the RGB color

(rgb), with 0 <= rgb <1,
it will be represented by the color index
floor(r Qr) * Qg Qb + floor(g Qg) * Qb + floor(b Qb).
The resulting quantization has n := Qr * Qg * Qb colors. This directly affects the number of features in the resulting image representations, all of which are based on providing one or more numerical values for each color of the quantized color space.

As an alternative to the RGB color space in which the input images are originally stored, the "-ycc" parameter can be used to transform the images to the YCC color space before further processing. In this case the quantization will also be applied in the YCC rather than in the RGB space; the three values listed with the "-gran" parameter refer to the quantization granularity for the Y (luminance), C1 (chromaticity 1) and C2 (chromaticity 2) axes, respectively. Using the YCC colorspace instead of RGB may be desirable because of YCC's greater perceptual uniformity (i.e. how well the distance between 3-D vectors representing colors corresponds to the human perception of the difference between the colors).

Three types of image representations are supported at the moment:

Two types of output are supported. At least one of the corresponding parameters must be present on the command line.

Usage: ImgFeatures.exe
-i:Input-FileMask (containing * and/or ? characters)
-ycc (optional, to convert image to YCC colorspace)
-hist -acg -bacg
-ds:Comma-Separated-List-Of-Distances (only for -acg/-bacg)
-recurse (optional, to search subdirectories for files matching the Input-FileMask(s))

Example 1:
ImgFeatures.exe -i:foo.bmp -i:bar.bmp -oxml:baz.xml -hist -gran:8,8,4

This reads the files foo.bmp and bar.bmp and computes for each a histogram based on a quantization of the RGB color space into 8 * 8 * 4 = 256 colors (the red and green axes are divided into eight intervals each, and the blue axis into four). The two histograms are written in XML form into baz.xml.

Example 2:
ImgFeatures.exe -i:c:\data\foo*.bmp -obin:foo.bin -acg -gran:6,6,6 -ds:1,3,5,7

This searches the c:\data directory for all files whose name matches foo*.bmp. An autocorrelogram is computed for each of these images, based on four distances (1, 3, 5, 7) and a quantization of the RGB color space into 6 * 6 * 6 = 216 colors (each axis divided into six segments). Thus the autocorrelogram of each image consists of 864 components.. The autocorrelograms are stored in binary form into foo.bin.

Example 3:
ImgFeatures.exe -i:@bar.txt -i:c:\data\foo*.bmp -recurse -oxml:d:\foo.xml -obin:c:\foo2.bin -bacg -gran:6,6,6 -ds:1,3,5,7

This processes all files whose names are listed in bar.txt (one per line). It also searches the c:\data directory and subdirectories recursively for all files whose name matches foo*.bmp. Banded autocorrelograms are computed for all these images and stored in d:\foo.xml and in c:\foo2.bin.