Changes for Specimens of Composite Portraiture
This commit is contained in:
parent
e85b169301
commit
7ac4d35c50
2 changed files with 15 additions and 3 deletions
|
@ -47,6 +47,7 @@ public:
|
||||||
for (std::string emotion : viz.EMOTIONS) fStream << emotion << ",";
|
for (std::string emotion : viz.EMOTIONS) fStream << emotion << ",";
|
||||||
for (std::string expression : viz.EXPRESSIONS) fStream << expression << ",";
|
for (std::string expression : viz.EXPRESSIONS) fStream << expression << ",";
|
||||||
for (std::string emoji : viz.EMOJIS) fStream << emoji << ",";
|
for (std::string emoji : viz.EMOJIS) fStream << emoji << ",";
|
||||||
|
fStream << "x,y,width,height,";
|
||||||
fStream << std::endl;
|
fStream << std::endl;
|
||||||
fStream.precision(4);
|
fStream.precision(4);
|
||||||
fStream << std::fixed;
|
fStream << std::fixed;
|
||||||
|
@ -131,11 +132,14 @@ public:
|
||||||
for (std::string emotion : viz.EMOTIONS) fStream << "nan,";
|
for (std::string emotion : viz.EMOTIONS) fStream << "nan,";
|
||||||
for (std::string expression : viz.EXPRESSIONS) fStream << "nan,";
|
for (std::string expression : viz.EXPRESSIONS) fStream << "nan,";
|
||||||
for (std::string emoji : viz.EMOJIS) fStream << "nan,";
|
for (std::string emoji : viz.EMOJIS) fStream << "nan,";
|
||||||
|
fStream << timeStamp << "nan,nan,nan,nan,";
|
||||||
fStream << std::endl;
|
fStream << std::endl;
|
||||||
}
|
}
|
||||||
for (auto & face_id_pair : faces)
|
for (auto & face_id_pair : faces)
|
||||||
{
|
{
|
||||||
Face f = face_id_pair.second;
|
Face f = face_id_pair.second;
|
||||||
|
VecFeaturePoint points = f.featurePoints;
|
||||||
|
std::vector<cv::Point2f> bounding_box = CalculateBoundingBox(points);
|
||||||
|
|
||||||
fStream << timeStamp << ","
|
fStream << timeStamp << ","
|
||||||
<< f.id << ","
|
<< f.id << ","
|
||||||
|
@ -174,6 +178,14 @@ public:
|
||||||
values++;
|
values++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
fStream.precision(0);
|
||||||
|
fStream << round(bounding_box[0].x) << ","
|
||||||
|
<< round(bounding_box[0].y) << ","
|
||||||
|
<< round(bounding_box[1].x - bounding_box[0].x) << ","
|
||||||
|
<< round(bounding_box[1].y - bounding_box[0].y) << ",";
|
||||||
|
fStream.precision(4);
|
||||||
|
|
||||||
fStream << std::endl;
|
fStream << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,9 +136,9 @@ int main(int argsc, char ** argsv)
|
||||||
shared_ptr<PlottingImageListener> listenPtr(new PlottingImageListener(csvFileStream, draw_display));
|
shared_ptr<PlottingImageListener> listenPtr(new PlottingImageListener(csvFileStream, draw_display));
|
||||||
|
|
||||||
detector->setClassifierPath(DATA_FOLDER);
|
detector->setClassifierPath(DATA_FOLDER);
|
||||||
detector->setDetectAllEmotions(true);
|
detector->setDetectAllEmotions(false);
|
||||||
detector->setDetectAllExpressions(true);
|
detector->setDetectAllExpressions(false);
|
||||||
detector->setDetectAllEmojis(true);
|
detector->setDetectAllEmojis(false);
|
||||||
detector->setDetectAllAppearances(true);
|
detector->setDetectAllAppearances(true);
|
||||||
detector->setImageListener(listenPtr.get());
|
detector->setImageListener(listenPtr.get());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue