|
@@ -5,12 +5,6 @@
|
|
|
* @date 03/19/2009
|
|
|
|
|
|
*/
|
|
|
-#ifdef NOVISUAL
|
|
|
-#include <objrec/nice_nonvis.h>
|
|
|
-#else
|
|
|
-#include <objrec/nice.h>
|
|
|
-#endif
|
|
|
-
|
|
|
#include <iostream>
|
|
|
#include <limits>
|
|
|
|
|
@@ -23,14 +17,8 @@
|
|
|
using namespace OBJREC;
|
|
|
|
|
|
using namespace std;
|
|
|
-// refactor-nice.pl: check this substitution
|
|
|
-// old: using namespace ice;
|
|
|
using namespace NICE;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-// refactor-nice.pl: check this substitution
|
|
|
-// old: PSSLocalizationPrior::PSSLocalizationPrior( const string & detectiondir,
|
|
|
PSSLocalizationPrior::PSSLocalizationPrior( const std::string & detectiondir,
|
|
|
const ClassNames *classNames,
|
|
|
double alphaDetectionPrior,
|
|
@@ -46,8 +34,6 @@ PSSLocalizationPrior::~PSSLocalizationPrior()
|
|
|
{
|
|
|
}
|
|
|
|
|
|
-// refactor-nice.pl: check this substitution
|
|
|
-// old: void PSSLocalizationPrior::loadDetectionResults ( const string & dir,
|
|
|
void PSSLocalizationPrior::loadDetectionResults ( const std::string & dir,
|
|
|
map<string, LocalizationResult *> & results,
|
|
|
const ClassNames *classNames )
|
|
@@ -59,11 +45,9 @@ void PSSLocalizationPrior::loadDetectionResults ( const std::string & dir,
|
|
|
for ( vector<string>::const_iterator i = files.begin();
|
|
|
i != files.end(); i++ )
|
|
|
{
|
|
|
- // refactor-nice.pl: check this substitution
|
|
|
- // old: string file = *i;
|
|
|
+
|
|
|
std::string file = *i;
|
|
|
- // refactor-nice.pl: check this substitution
|
|
|
- // old: string classtext = StringTools::baseName ( file, false );
|
|
|
+
|
|
|
std::string classtext = StringTools::baseName ( file, false );
|
|
|
int classno = classNames->classno(classtext);
|
|
|
if ( classno < 0 ) {
|
|
@@ -75,16 +59,9 @@ void PSSLocalizationPrior::loadDetectionResults ( const std::string & dir,
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-// refactor-nice.pl: check this substitution
|
|
|
-// old: void PSSLocalizationPrior::postprocess ( Image & result, GenericImage<double> & probabilities )
|
|
|
-void PSSLocalizationPrior::postprocess ( NICE::Image & result, GenericImage<double> & probabilities )
|
|
|
+void PSSLocalizationPrior::postprocess ( NICE::Image & result, NICE::MultiChannelImageT<double> & probabilities )
|
|
|
{
|
|
|
- // refactor-nice.pl: check this substitution
|
|
|
- // old: string currentFilename = Globals::getCurrentImgFN();
|
|
|
std::string currentFilename = Globals::getCurrentImgFN();
|
|
|
- // refactor-nice.pl: check this substitution
|
|
|
- // old: string base = StringTools::baseName ( currentFilename, false );
|
|
|
std::string base = StringTools::baseName ( currentFilename, false );
|
|
|
map<string, LocalizationResult *>::const_iterator i = detresults.find ( base );
|
|
|
|