This commit is contained in:
Konstantin Matskevich
2014-05-07 17:19:22 +04:00
parent 36afd4ef55
commit aa76ef9a98
3 changed files with 25 additions and 27 deletions

View File

@@ -130,7 +130,7 @@ int main(int argc, const char *argv[]) {
//
string result_message = format("Predicted class = %d / Actual class = %d.", predictedLabel, testLabel);
cout << result_message << endl;
if( (predictedLabel == testLabel) && (model->getLabelInfo(predictedLabel) != "") )
if( (predictedLabel == testLabel) && !model->getLabelInfo(predictedLabel).empty() )
cout << format("%d-th label's info: %s", predictedLabel, model->getLabelInfo(predictedLabel).c_str()) << endl;
// Sometimes you'll need to get/set internal model data,
// which isn't exposed by the public cv::FaceRecognizer.