From: <st...@us...> - 2009-07-07 11:54:59
|
Revision: 4004 http://hugin.svn.sourceforge.net/hugin/?rev=4004&view=rev Author: stativ Date: 2009-07-07 11:54:57 +0000 (Tue, 07 Jul 2009) Log Message: ----------- Move preprocessing of images to the separate function Modified Paths: -------------- hugin/branches/gsoc2009_deghosting/src/deghosting/khan.cpp hugin/branches/gsoc2009_deghosting/src/deghosting/khan.h Modified: hugin/branches/gsoc2009_deghosting/src/deghosting/khan.cpp =================================================================== --- hugin/branches/gsoc2009_deghosting/src/deghosting/khan.cpp 2009-07-07 11:32:37 UTC (rev 4003) +++ hugin/branches/gsoc2009_deghosting/src/deghosting/khan.cpp 2009-07-07 11:54:57 UTC (rev 4004) @@ -114,10 +114,7 @@ } } - std::vector<FImagePtr> Khan::createWeightMasks() { - // load images - // convert them to L*a*b - // and create initial weights + void Khan::preprocessImages() { for (unsigned int i = 0; i < inputFiles.size(); i++) { cout << "Loading image number " << i << endl; // I should reimplement it without using VIGRA @@ -168,6 +165,10 @@ delete pInputImg; pInputImg = 0; } + } + + std::vector<FImagePtr> Khan::createWeightMasks() { + preprocessImages(); cout << endl << "Running khan algorithm" << endl; // and we can run khan algorithm Modified: hugin/branches/gsoc2009_deghosting/src/deghosting/khan.h =================================================================== --- hugin/branches/gsoc2009_deghosting/src/deghosting/khan.h 2009-07-07 11:32:37 UTC (rev 4003) +++ hugin/branches/gsoc2009_deghosting/src/deghosting/khan.h 2009-07-07 11:54:57 UTC (rev 4004) @@ -82,6 +82,12 @@ * Standard probability density function */ inline double Kh(deghosting::AlgTinyVector< float, 3 > x); + /** function to preprocess input images + * This function loads images, linearizes them using EMoR, + * tranform them using logarithm or gamm if input images are HDR + * fills vector<FImagePtr> weights and vector<FLabImagePtr> LabImages + */ + void preprocessImages(); }; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |