diff --git a/common/PlottingImageListener.hpp b/common/PlottingImageListener.hpp index 21ccc21..e6367ad 100644 --- a/common/PlottingImageListener.hpp +++ b/common/PlottingImageListener.hpp @@ -47,6 +47,7 @@ public: for (std::string emotion : viz.EMOTIONS) fStream << emotion << ","; for (std::string expression : viz.EXPRESSIONS) fStream << expression << ","; for (std::string emoji : viz.EMOJIS) fStream << emoji << ","; + fStream << "x,y,width,height,"; fStream << std::endl; fStream.precision(4); fStream << std::fixed; @@ -131,11 +132,14 @@ public: for (std::string emotion : viz.EMOTIONS) fStream << "nan,"; for (std::string expression : viz.EXPRESSIONS) fStream << "nan,"; for (std::string emoji : viz.EMOJIS) fStream << "nan,"; + fStream << timeStamp << "nan,nan,nan,nan,"; fStream << std::endl; } for (auto & face_id_pair : faces) { Face f = face_id_pair.second; + VecFeaturePoint points = f.featurePoints; + std::vector bounding_box = CalculateBoundingBox(points); fStream << timeStamp << "," << f.id << "," @@ -174,6 +178,14 @@ public: 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; } } diff --git a/video-demo/video-demo.cpp b/video-demo/video-demo.cpp index 0bb6465..691ff08 100644 --- a/video-demo/video-demo.cpp +++ b/video-demo/video-demo.cpp @@ -136,9 +136,9 @@ int main(int argsc, char ** argsv) shared_ptr listenPtr(new PlottingImageListener(csvFileStream, draw_display)); detector->setClassifierPath(DATA_FOLDER); - detector->setDetectAllEmotions(true); - detector->setDetectAllExpressions(true); - detector->setDetectAllEmojis(true); + detector->setDetectAllEmotions(false); + detector->setDetectAllExpressions(false); + detector->setDetectAllEmojis(false); detector->setDetectAllAppearances(true); detector->setImageListener(listenPtr.get());