UNPKG

@polygonjs/polygonjs

Version:

node-based WebGL 3D engine https://polygonjs.com

42 lines (41 loc) 2.71 kB
import { Object3D, Vector4 } from 'three'; import { Constructor } from '../../../types/GlobalTypes'; import { ComputerVisionValidSource } from '../Common'; interface HandTrackingObjectAttributes { selfieMode: boolean; maxNumHands: number; modelComplexity: boolean; minDetectionConfidence: number; minTrackingConfidence: number; } export declare function CoreComputerVisionHandParamConfig<TBase extends Constructor>(Base: TBase): { new (...args: any[]): { /** @param selfieMode */ selfieMode: import("../../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../../engine/index_all").ParamType.BOOLEAN>; /** @param Maximum number of hands to detect */ maxNumHands: import("../../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../../engine/index_all").ParamType.INTEGER>; /** @param Complexity of the hand landmark model: 0 or 1. Landmark accuracy as well as inference latency generally go up with the model complexity */ modelComplexity: import("../../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../../engine/index_all").ParamType.BOOLEAN>; /** @param Minimum confidence value ([0.0, 1.0]) from the hand detection model for the detection to be considered successful */ minDetectionConfidence: import("../../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../../engine/index_all").ParamType.FLOAT>; /** @param Minimum confidence value ([0.0, 1.0]) from the landmark-tracking model for the hand landmarks to be considered tracked successfully, or otherwise hand detection will be invoked automatically on the next input image. Setting it to a higher value can increase robustness of the solution, at the expense of a higher latency. Ignored if static_image_mode is true, where hand detection simply runs on every image */ minTrackingConfidence: import("../../../engine/nodes/utils/params/ParamsConfig").ParamTemplate<import("../../../engine/index_all").ParamType.FLOAT>; }; } & TBase; interface ConvertedResult { multiHandLandmarks: Vector4[]; multiHandWorldLandmarks: Vector4[]; score: number; side: number; } type ConvertedResults = ConvertedResult[]; export declare class CoreComputerVisionHand { private static trackerByKey; private static trackerForObject; static trackMedia(object: Object3D, source: ComputerVisionValidSource): void; static trackerResults(object: Object3D): ConvertedResults; private static _createTracker; static trackerKey(object: Object3D): string; static setAttributes(object: Object3D, options: HandTrackingObjectAttributes): void; } export {};