From e7c276c0f521c88a00601bd80c5d08be1345b6aa Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Mon, 24 May 2021 11:10:06 -0400 Subject: [PATCH] implemented unified result.persons that combines face, body and hands for each person --- Outputs.md | 22 +++++++++++++++++----- Usage.md | 3 +++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/Outputs.md b/Outputs.md index 29e21af..00c7240 100644 --- a/Outputs.md +++ b/Outputs.md @@ -82,12 +82,12 @@ result = { ], gesture: // [ - { - : , - gesture: + gesture-type: { // type of a gesture, can be face, iris, body, hand + id, // + gesture, // } ], - performance = { // performance data of last execution for each module measuredin miliseconds + performance: { // performance data of last execution for each module measuredin miliseconds // note that per-model performance data is not available in async execution mode frames, // total number of frames processed cached, // total number of frames where some cached values were used @@ -102,6 +102,18 @@ result = { emotion, // model time change, // frame change detection time total, // end to end time - } + }, + persons: // virtual object that is calculated on-demand by reading it + // it unifies face, body, hands and gestures belonging to a same person under single object + [ + id, // + face, // face object + body, // body object if found + hands: { + left, // left hand object if found + right, // right hand object if found + } + gestures: [] // array of gestures + ] } ``` diff --git a/Usage.md b/Usage.md index a36d4b6..663a062 100644 --- a/Usage.md +++ b/Usage.md @@ -62,6 +62,9 @@ Internal list of modules and objects used by current instance of `Human`: Additional helper functions inside `human.draw`: ```js + human.draw.all(canvas, result) // interpolates results for smoother operations + // and triggers each individual draw operation + human.draw.person(canvas, result) // triggers unified person analysis and draws bounding box human.draw.canvas(inCanvas, outCanvas) // simply copies one canvas to another, // can be used to draw results.canvas to user canvas on page human.draw.face(canvas, results.face) // draw face detection results to canvas