The Fib multimedia system
Fib is a system for storing multimedia data (like images or films).
|
Classes | |
class | cColorDistance |
Functions | |
cFibElement * | convert (const fipImage &multimediaObject) |
cFibElement * | convertOptimized (const fipImage &multimediaObject, bool bCreatebackground=true, const bool bCorrectPoints=false) |
cFibElement * | 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) |
map< vector< unsigned int > , unsigned long > | countColors (const fipImage &multimediaObject) |
void | mapColors (fipImage &multimediaObject, const map< vector< unsigned int >, vector< unsigned int > > &mapColorMapping) |
cFibElement* nConvertToFib::convert | ( | const fipImage & | multimediaObject | ) |
This function converts the given multimediaobject into a fib -object.
multimediaObject | the multimedaobject to convert into fib; the inputformat is in the FreeImagePlus fipImage 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:
multimediaObject | the multimedaobject to convert into fib; the inputformat is in the FreeImagePlus fipImage object |
bCreatebackground | if true, this function will set a background color, if non is given |
bCorrectPoints | if wrong points should be corrected, in the last compressing step |
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:
multimediaObject | the multimedaobject to convert into fib; the inputformat is in the FreeImagePlus fipImage object |
bCreatebackground | if true, this function will set a background color, if non is given |
ulMaxAreaDiff | the maximal difference of color values in an area (as the sum of the color vector element distances) |
ulMinPoints | if 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 |
uiMinPointsNeighbourAreas | all neighbour areas with less than this number of points, will be subsumed by the area |
bCorrectPoints | if wrong points should be corrected, in the last compressing step |
bCorrectMissingPoints | correct points, wich are missing in the created area fib-objects |
bAddNeighbours | add to the areas ther neigbours and remove not needed areas |
bReduceFunctionDomains | reduce the bits to store the function (values) |
bReplaceAreasWithPoints | rreplace areas, which need more bits to store than ther points, with ther points |
uiInMinPointsForArea | the minimal number of points an area should have, to create an area object for it; if 0 the standad value will be taken |
maxError | the 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 |
map< vector< unsigned int >, unsigned long > nConvertToFib::countColors | ( | const fipImage & | multimediaObject | ) |
This function conts how oftern the different colors occure in the given pictur.
multimediaObject | the multimedaobject wher to count the colors |
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.
multimediaObject | the multimedaobject wher to change the colors |
mapColorMapping | the 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.) |