Artiste Developement Heirarchy Structure

Directory Structure

The following diagram shows the new code directory structure for the Artiste developement code.

-|- ./Classes
 |     |- ./Classes/BorderFinderNeuralTester
 |     |- ./Classes/BorderFinderNeuralTester/RGBVisual
 |     |- ./Classes/BorderFinderNeuralTester/XDisplay
 |     |- ./Classes/meanshift
 |- ./fvx
 |- ./fvg
 |     |- ./fvg/code
 |     |- ./fvg/include
 |- ./lib
 |- ./Multiscale
Classes
Contains all the image processing and feature vector classes that form the basis of the Artiste system. A copy of this is what IT Innovations will effectively have on their system. Some features, such as the border classifier, have their own directories.
fvx
Contains the code for the fvx program.
fvg
Contains the code for the fvg program.
lib
Contains the library file(s) necessary for the Artiste system. The file libips.a is the library file containing the code for all the image processors. This is linked in with applications that use the system.
Multiscale
Contains the code and necessary files for the Multiscale program - the test harness we use to test our Artiste features.

Code Structure

The above diagram (sorry about the quality) shows an example of the FeatureVector class and the ImageProcessor class being publicly inherited from by the HistogramRGB and MHistogramRGB classes.

Feature Vector Classes

Functions which are necessary for the feature vectors to comply with the Artiste API are:

int    InitialiseIF();
int    GetIFID();
char * GetName();
int    GetOriginalImageDimensions( int *, int * );
int    SetOriginalImageDimensions( int , int  );
int    LoadIF( char * );
int    SaveIF( char * );
int    LoadIFFromMemory( char * );
char * SaveIFToMemory( unsigned int * );
int    GetNumberOfAttributes();
char * Attribute( unsigned int );
char * AttributeValue( unsigned int );

The functions are declared as abstract in the class FeatureVector from which you need to publicly inherit. A short description of each function follows:

int InitialiseIF();
This function initialises the feature vector to its start-up state.
int GetIFID();
This function returns the unique ID of the feature vector (as described on the IDs page).
char * GetName();
This function returns the name of the feature vector (without spaces). It is used in the filename of the feature vector files (e.g. the feature vector returns "featureVector" and the filename is Picture.jpg.featureVector.ifo).
int GetOriginalImageDimensions( int *, int * );
This function returns the size of the image from which the feature was derived.
int SetOriginalImageDimensions( int , int );
This function sets the size of the image which is represented by this feature.
int LoadIF( char * );
This function loads a feature vector from a filename.
int SaveIF( char * );
This function saves a feature vector to the given filename
int LoadIFFromMemory( char * );
Given a memory blob, the feature is loaded from memory.
char * SaveIFToMemory( unsigned int * );
The feature is saved to a memory blob.
int GetNumberOfAttributes();
Returns the number of meta-data attributes that this feature has to offer.
char * Attribute( unsigned int );
Returns the attribute at the index given.
char * AttributeValue( unsigned int );
Returns the attribute value at the index given.

Provided by the FeatureVector class are a number of variables which help to facilitate the above functions:

int          OriginalImageWidth;
int	     OriginalImageHeight;
int          NumberOfAttributes;
char*        MemoryBlob;
int OriginalImageWidth;
A variable to store the original image width.
int OriginalImageHeight;
A variable to store the original image height.
int NumberOfAttributes;
A variable to store the number of attributes.
char* MemoryBlob;
A pointer to a block of memory that is the memory blob.
You must also override the function InitialiseIFFreeMemory, which will clear up any memory you used before a feature module dies. Also the protected variable, MemoryBlobIndex, is used for reading and writing to and from memory using the MemoryBlobWriter. You should pass the address of this through when reading and writing.

Image Processor Classes

Functions which are necessary for the image processors to comply with the Artiste API are:

int     InitialiseIP();
int     GetIPID();
char*   GetIPName();
char*   GetIPDescription();
char*   GetIPAuthors();
char*   GetIPVersion();
char*   GetIPDateOfCreation();
int     GenerateIF( VImage , FeatureVector* );
int     CompareIF( FeatureVector *, FeatureVector * );

The functions are declared as abstract in the class ImageProcessor from which you need to publicly inherit. A short description of each function follows:

int InitialiseIP();
Initialisation code goes in here. Setup the IP into it's start-up state.
int GetIPID();
Returns the IP identifier as given here.
char* GetIPName();
Returns a string representing the name of the image processor.
char* GetIPDescription();
Returns a textual description of the image processor's function.
char* GetIPAuthors();
Returns a string giving the author's name.
char* GetIPVersion();
Returns a version of the image processor as a string.
char* GetIPDateOfCreation();
Returns the date of creation of the image processor as a string.
int GenerateIF( VImage , FeatureVector * );
GenerateIF is called when an image requires a feature vector to be created. The function is passed the image, in the form of a VImage, and a feature vector class into which the output will be stored. The function is usually followed by a call to FeatureVector.SaveIFO().
int CompareIF( FeatureVector *, FeatureVector * );
CompareIF is called when an application requests a match to be performed between two feature vectors. The features are passed in (query, then reference) and a match is performed. The similarities and any associated polygonal areas, are stored in the similarity store inside this image processor, and are retrieved using the GetNumberOfSimilarities, and GetSimilarityValue functions.
Note: Of course the better way of doing this would be to have the call: FeatureVector.CompareIF( FeatureVector* ); however, the API was designed that the image processor does the matching being passed two FeatureVectors. You could internally program it the other way should you wish. It seems more sensible to me.. but who am I?

Provided by the ImageProcessor class are a number of variables which help to facilitate the above functions:

int     LayerIndexOfQueryToProcess;
int     LayerIndexOfReferenceToProcess;
int     LengthOfACCVVector;
int     IndexOfLargestValueInTheStore;
FeatureVector   *QueryIFO;
FeatureVector   *ReferenceIFO;
int LayerIndexOfQueryToProcess;
int LayerIndexOfReferenceToProcess;
int LengthOfACCVVector;
int IndexOfLargestValueInTheStore;
Index of the best similarity in the simlilarity store.
FeatureVector *QueryIFO;
Variables used during the CompareIF. This is the query IF.
See note for CompareIF above.
FeatureVector *ReferenceIFO;
Variables used during the CompareIF. This is the reference IF.

General Notes

Functions return error values, where 0 is an error, and 1 is success.

Current site and code maintainer: David Dupplaw - dpd98r@ecs.soton.ac.uk
All code, data, files and information on this site is copyrighted by the respective owners, and may not be downloaded by unauthorised persons.