Test json output
This commit is contained in:
parent
4ab47dcfa4
commit
3e49451996
1 changed files with 11 additions and 3 deletions
|
@ -47,21 +47,29 @@ std::string getAsJson(const std::map<FaceId, Face> faces, const double timeStamp
|
||||||
// << affdex::EmojiToString(f.emojis.dominantEmoji) << ",";
|
// << affdex::EmojiToString(f.emojis.dominantEmoji) << ",";
|
||||||
|
|
||||||
float *values = (float *)&f.measurements.orientation;
|
float *values = (float *)&f.measurements.orientation;
|
||||||
for (std::string angle : PlottingImageListener.headAngles)
|
for (std::string angle : { "pitch", "yaw", "roll" })
|
||||||
{
|
{
|
||||||
ss << "'" << angle << "':" << (*values) << ",";
|
ss << "'" << angle << "':" << (*values) << ",";
|
||||||
values++;
|
values++;
|
||||||
}
|
}
|
||||||
|
|
||||||
values = (float *)&f.emotions;
|
values = (float *)&f.emotions;
|
||||||
for (std::string emotion : PlottingImageListener.emotions)
|
for (std::string emotion : {
|
||||||
|
"joy", "fear", "disgust", "sadness", "anger",
|
||||||
|
"surprise", "contempt", "valence", "engagement"
|
||||||
|
})
|
||||||
{
|
{
|
||||||
ss << "'" << emotion << "':" << (*values) << ",";
|
ss << "'" << emotion << "':" << (*values) << ",";
|
||||||
values++;
|
values++;
|
||||||
}
|
}
|
||||||
|
|
||||||
values = (float *)&f.expressions;
|
values = (float *)&f.expressions;
|
||||||
for (std::string expression : PlottingImageListener.expressions)
|
for (std::string expression : expressions = {
|
||||||
|
"smile", "innerBrowRaise", "browRaise", "browFurrow", "noseWrinkle",
|
||||||
|
"upperLipRaise", "lipCornerDepressor", "chinRaise", "lipPucker", "lipPress",
|
||||||
|
"lipSuck", "mouthOpen", "smirk", "eyeClosure", "attention", "eyeWiden", "cheekRaise",
|
||||||
|
"lidTighten", "dimpler", "lipStretch", "jawDrop"
|
||||||
|
})
|
||||||
{
|
{
|
||||||
ss << "'" << expression << "':" << (*values) << ",";
|
ss << "'" << expression << "':" << (*values) << ",";
|
||||||
values++;
|
values++;
|
||||||
|
|
Loading…
Reference in a new issue