The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
nConvertToFib Namespace Reference

Classes

class  cColorDistance

Functions

cFibElementconvert (const fipImage &multimediaObject)
cFibElementconvertOptimized (const fipImage &multimediaObject, bool bCreatebackground=true, const bool bCorrectPoints=false)
cFibElementconvertReduced (const fipImage &multimediaObject, bool bCreatebackground=true, const unsigned long ulMaxAreaDiff=3, const unsigned long ulMinPoints=4, const unsigned long ulMaxDiff=16, const unsigned int uiMinPointsNeighbourAreas=0, const bool bCorrectPoints=false, const bool bCorrectMissingPoints=false, const bool bAddNeighbours=false, const bool bReduceFunctionDomains=false, const bool bReplaceAreasWithPoints=false, const unsigned int uiInMinPointsForArea=0, const double maxError=0)
map< vector< unsigned int >
, unsigned long > 
countColors (const fipImage &multimediaObject)
void mapColors (fipImage &multimediaObject, const map< vector< unsigned int >, vector< unsigned int > > &mapColorMapping)

Function Documentation

cFibElement* nConvertToFib::convert ( const fipImage multimediaObject)

This function converts the given multimediaobject into a fib -object.

Parameters:
multimediaObjectthe multimedaobject to convert into fib; the inputformat is in the FreeImagePlus fipImage object
Returns:
the created fib -object
cFibElement* nConvertToFib::convertOptimized ( const fipImage multimediaObject,
bool  bCreatebackground = true,
const bool  bCorrectPoints = false 
)

This function converts the given multimediaobject into a fib -object. It creats a fib -object with one master root -element which contains a listelement as main -fib -object. the function will try to compress the pictur data. It will:

  • sperate the points in respect of ther colors (properties)
  • will create area fib-objects, for areas with the same color if bCreatebackground is true;
  • will set a background color, if non is given
See also:
convert()
Parameters:
multimediaObjectthe multimedaobject to convert into fib; the inputformat is in the FreeImagePlus fipImage object
bCreatebackgroundif true, this function will set a background color, if non is given
bCorrectPointsif wrong points should be corrected, in the last compressing step
Returns:
the created fib -object
cFibElement* nConvertToFib::convertReduced ( const fipImage multimediaObject,
bool  bCreatebackground = true,
const unsigned long  ulMaxAreaDiff = 3,
const unsigned long  ulMinPoints = 4,
const unsigned long  ulMaxDiff = 16,
const unsigned int  uiMinPointsNeighbourAreas = 0,
const bool  bCorrectPoints = false,
const bool  bCorrectMissingPoints = false,
const bool  bAddNeighbours = false,
const bool  bReduceFunctionDomains = false,
const bool  bReplaceAreasWithPoints = false,
const unsigned int  uiInMinPointsForArea = 0,
const double  maxError = 0 
)

This function converts the given multimediaobject into a fib -object. It will reduce the data to compress, so not all points in the created fib-object will have the correct color. It creats a fib -object with one master root -element which contains a listelement as main -fib -object. the function will try to compress the pictur data. It will:

  • sperate the points in respect of ther colors (properties)
  • will create area fib-objects, for areas with the similar color if bCreatebackground is true;
  • will set a background color, if non is given
See also:
convert()
Parameters:
multimediaObjectthe multimedaobject to convert into fib; the inputformat is in the FreeImagePlus fipImage object
bCreatebackgroundif true, this function will set a background color, if non is given
ulMaxAreaDiffthe maximal difference of color values in an area (as the sum of the color vector element distances)
ulMinPointsif an area with less than ulMinPoints points exists and it layes beside an area with a color, wich has a less difference as ulMaxDiff to the color of the first area, both areas will be combinde with the color of the second area (if the first area has more than one area as a neibour, which fulfill ulMaxDiff, the one with the minimum color distance is taken)
ulMaxDiff
See also:
ulMinPoints
Parameters:
uiMinPointsNeighbourAreasall neighbour areas with less than this number of points, will be subsumed by the area
bCorrectPointsif wrong points should be corrected, in the last compressing step
bCorrectMissingPointscorrect points, wich are missing in the created area fib-objects
bAddNeighboursadd to the areas ther neigbours and remove not needed areas
bReduceFunctionDomainsreduce the bits to store the function (values)
bReplaceAreasWithPointsrreplace areas, which need more bits to store than ther points, with ther points
uiInMinPointsForAreathe minimal number of points an area should have, to create an area object for it; if 0 the standad value will be taken
maxErrorthe maximal error for the area border polynoms to find; the error on the interpolated polynoms for the borders of the areas will beequal or less than maxError
Returns:
the created fib -object
map< vector< unsigned int >, unsigned long > nConvertToFib::countColors ( const fipImage multimediaObject)

This function conts how oftern the different colors occure in the given pictur.

Parameters:
multimediaObjectthe multimedaobject wher to count the colors
Returns:
a map with the color values and ther counts
void nConvertToFib::mapColors ( fipImage multimediaObject,
const map< vector< unsigned int >, vector< unsigned int > > &  mapColorMapping 
)

This function maps the colors of the given pictur accordingly to the given mapping. Colors not in the map won't be changed.

Parameters:
multimediaObjectthe multimedaobject wher to change the colors
mapColorMappingthe mapping for the colors: key: the source color value: to which color the color should be mapped (BEWARE: all color vectors of the map should have the correct size.)