|
DocumentationInstallationImgFusion uses the Developer's Image Library to handle image operations and therefore the library must be installed prior to compiling ImgFusion. The library can be downloaded from: http://sourceforge.net/projects/openil/The installation follows the usual pattern of the GNU Build System. Unpack the archive and go to the root directory of the package (where the README file is located for example). The type ./configure make make installThe package is by default instaled in /usr/local/lib (the library) and
/usr/local/bin (the fuse executable). The instalation path
can be changed by calling configure with --prefix=PATH parameter.
For more info see Basic usageThe library is very simple to use. At first include appropriate header files into your source - the DevIL headers and ImgFusion headers: #include <IL/il.h> #include <IL/ilu.h> #include "fusion.h" #include "fusionlaplace.h" // laplacean operator fusion #include "fusiondwt.h" // real wavelet fusion #include "dusioncdwt.h" // complex wavelet fusion For convenience one may use the ImgFusion namepsace: using namespace imgfusion; Initialize the DevIL image library by calling: ilInit(); iluInit(); Create and initialize the fusion object and start the fusion: CFusion* fusion = new CFusionLaplace(); fusion->Init(); fusion->StartFusion();
Alternatively use ILuint image; ilGenImages(1, &image); ilBindImage(image); for (all filenames) { ilLoadImage(filename); int r = fusion->FuseImage(image); if (r != CFusion::FUSION_OK) { ... fusion failed, do some error handling ... } } Retrieve the fused image: int r = F->GetImage(image); if (r != CFusion::FUSION_OK) { ... retrieving failed, so some error handling ... } else { // one may want to save to file ilBindImage(image); ilSaveImage("fused.jpg"); } Finally delete the fusion object: delete fusion; ManualClass reference. Doxygen generated class reference guide. |