These are ongoing notes - not definitive!
Images uploaded to the database are then processed by all the IFV generators with output stored back in the database. A function like:
db_get_image_region(id, x, y, w, h)
is used by the otherwise portable C/C++ image processing routine.
For comparisons later, score generators are needed.... format to be
decided, one per IFV.
The image processing functions should be platform independant - ie not know if they are feeding off database images or not. So they might look like (pseudocode!):
alg1( VImage in, void *Ivf)
for y = 0 to in.Height
buf = in.getregion(0, y, in.Width, 1)
Ivf = converthostogram(....)
So under TOR, VImage would be implemented with database methods and properties unseen by algorithms. Under VIPS/MAVIS there would be non-database calls.
The algorithms invoked by Tor (e.g. alg1) receives a 'Virtual Image' containing image properties (no image data), and outputs a list of features that can be type casted to structs, arrays etc..
The algorithms use a 'Real Image' class, RImage, to retrieve pixel data using VImage information.
An RImage contains methods to process retrieved pixel data.
Each image processing method in RImage has an Image Feature Vector converter
- Need a way of specifying the typecasting to Tor for each function.
alg1( VImage *In, void *Ifv)
for( y = 0; y < In->Height; y++ )
buf.Copy( in->getregion(0, y, In->Width, 1) );
buf.HistogramAccumulateToIFV( Ifv );