本文整理汇总了C++中Args::GetDetectMode方法的典型用法代码示例。如果您正苦于以下问题:C++ Args::GetDetectMode方法的具体用法?C++ Args::GetDetectMode怎么用?C++ Args::GetDetectMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Args
的用法示例。
在下文中一共展示了Args::GetDetectMode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetSavePath
/*******************************************************************
* 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;
}
示例2: PrintAllVals
/*******************************************************************
* 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;
}