/******************************************************************* * Function Name: GetSavePath * Return Type : const string * Created On : Nov 18, 2013 * Created By : hrushi * Comments : Get the save path for the given algo type * Arguments : const Args& args, const string AlgoType *******************************************************************/ const string GroundTruth::GetSavePath( const Args& args ) const { string ScoreSavePath = args.GetSearchFolderPath(); const string AlgoTypeOpt = boost::to_lower_copy( args.GetDetectMode() ); if( AlgoTypeOpt == "pose" ) { ScoreSavePath += POSE_PROB_SCORE_FILE; } else if( AlgoTypeOpt == "location" ) { ScoreSavePath += LOC_PROB_SCORE_FILE; } else if( AlgoTypeOpt == "shape") { ScoreSavePath += SHAPE_PROB_SCORE_FILE; } else if( AlgoTypeOpt == "appearance") { ScoreSavePath += APPR_PROB_SCORE_FILE; } return ScoreSavePath; }
/******************************************************************* * Function Name: PrintAllVals * Return Type : int * Created On : Nov 6, 2013 * Created By : hrushi * Comments : Prints all the values and the LogNormal Distribution * Arguments : const vector<double>& AllScores *******************************************************************/ int GroundTruth::PrintAllVals( const Args& args, cv::FileStorage& fScore, const string Tag, const vector<double>& AllScores) const { vector<double> ProbScores; ProbScores.resize(AllScores.size()); const string AlgoTypeOpt = boost::to_lower_copy( args.GetDetectMode() ); if(AlgoTypeOpt.compare("location") == 0 ) { ProbScores = AllScores; } else { cout << "Performing Raised to Power 2 operation" << endl; std::transform( AllScores.begin(), AllScores.end(), ProbScores.begin(), GroundTruth::PWR); } fScore << Tag << ProbScores; return EXIT_SUCCESS; }