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
libips.a
is the
library file containing the code for all the image processors. This is linked in with applications that
use the system.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.
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();
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 );
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;
int OriginalImageHeight;
int NumberOfAttributes;
char* MemoryBlob;
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.
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();
int GetIPID();
char* GetIPName();
char* GetIPDescription();
char* GetIPAuthors();
char* GetIPVersion();
char* GetIPDateOfCreation();
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.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;
FeatureVector *QueryIFO;
CompareIF
. This is the query IF.CompareIF
above.
FeatureVector *ReferenceIFO;
CompareIF
. This is the reference IF.
Functions return error values, where 0
is an error, and 1
is success.