mirror of https://github.com/vladmandic/human
add experimental webgu demo
parent
14cd80b32a
commit
f867d46b85
|
@ -11,9 +11,7 @@ Repository: **<git+https://github.com/vladmandic/human.git>**
|
||||||
|
|
||||||
### **HEAD -> main** 2021/08/14 mandic00@live.com
|
### **HEAD -> main** 2021/08/14 mandic00@live.com
|
||||||
|
|
||||||
|
- complete async work
|
||||||
### **origin/main** 2021/08/13 mandic00@live.com
|
|
||||||
|
|
||||||
- list detect cameras
|
- list detect cameras
|
||||||
- switch to async data reads
|
- switch to async data reads
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@ import type { Result, Face, Body, Hand, Item, Gesture, Person } from './result';
|
||||||
const bufferedResult: Result = { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0 };
|
const bufferedResult: Result = { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0 };
|
||||||
|
|
||||||
export function calc(newResult: Result): Result {
|
export function calc(newResult: Result): Result {
|
||||||
|
if (!newResult) return { face: [], body: [], hand: [], gesture: [], object: [], persons: [], performance: {}, timestamp: 0 };
|
||||||
// each record is only updated using deep clone when number of detected record changes, otherwise it will converge by itself
|
// each record is only updated using deep clone when number of detected record changes, otherwise it will converge by itself
|
||||||
// otherwise bufferedResult is a shallow clone of result plus updated local calculated values
|
// otherwise bufferedResult is a shallow clone of result plus updated local calculated values
|
||||||
// thus mixing by-reference and by-value assignments to minimize memory operations
|
// thus mixing by-reference and by-value assignments to minimize memory operations
|
||||||
|
|
Loading…
Reference in New Issue