implemented unified result.persons that combines face, body and hands for each person

master
Vladimir Mandic 2021-05-24 11:10:06 -04:00
parent d3e31ec79f
commit e7c276c0f5
2 changed files with 20 additions and 5 deletions

@ -82,12 +82,12 @@ result = {
], ],
gesture: // <array of objects object> gesture: // <array of objects object>
[ [
{ gesture-type: { // type of a gesture, can be face, iris, body, hand
<gesture-type>: <person-number>, id, // <number>
gesture: <gesture-string> gesture, // <string>
} }
], ],
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 // note that per-model performance data is not available in async execution mode
frames, // total number of frames processed frames, // total number of frames processed
cached, // total number of frames where some cached values were used cached, // total number of frames where some cached values were used
@ -102,6 +102,18 @@ result = {
emotion, // model time emotion, // model time
change, // frame change detection time change, // frame change detection time
total, // end to end 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, // <number>
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
]
} }
``` ```

@ -62,6 +62,9 @@ Internal list of modules and objects used by current instance of `Human`:
Additional helper functions inside `human.draw`: Additional helper functions inside `human.draw`:
```js ```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, human.draw.canvas(inCanvas, outCanvas) // simply copies one canvas to another,
// can be used to draw results.canvas to user canvas on page // can be used to draw results.canvas to user canvas on page
human.draw.face(canvas, results.face) // draw face detection results to canvas human.draw.face(canvas, results.face) // draw face detection results to canvas