1.1.3 • Published 7 months ago

@types/clmtrackr v1.1.3

Weekly downloads
15
License
MIT
Repository
github
Last release
7 months ago

Installation

npm install --save @types/clmtrackr

Summary

This package contains type definitions for clmtrackr (https://github.com/auduno/clmtrackr).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/clmtrackr.

index.d.ts

// Type definitions for clmtrackr 1.1
// Project: https://github.com/auduno/clmtrackr
// Definitions by: hellochar <https://github.com/hellochar>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

interface TrackerParams {
    /** whether to use constant velocity model when fitting (default is true) */
    constantVelocity?: boolean | undefined;
    /** the size of the searchwindow around each point (default is 11) */
    searchWindow?: number | undefined;
    /** whether to use webGL if it is available (default is true) */
    useWebGL?: boolean | undefined;
    /** threshold for when to assume we've lost tracking (default is 0.50) */
    scoreThreshold?: number | undefined;
    /** whether to stop tracking when the fitting has converged (default is false) */
    stopOnConvergence?: boolean | undefined;
    /** object with parameters for facedetection : */
    faceDetection?: {
        /** whether to use web workers for face detection (default is true) */
        useWebWorkers?: boolean | undefined;
    } | undefined;
}

type IPosition = [number, number];

type Model = any;

declare namespace _default {
    class tracker {
        constructor(params?: TrackerParams);

        init(model?: Model): void;

        start(element: HTMLVideoElement | HTMLCanvasElement): void;

        track(element: HTMLVideoElement | HTMLCanvasElement): IPosition[] | false;

        reset(): void;

        getConvergence(): number;

        getCurrentParameters(): number[];

        getCurrentPosition(): IPosition[] | false;

        getScore(): number;

        draw(canvas: HTMLCanvasElement): void;

        setResponseMode(type: "single" | "cycle" | "blend", list: Array<"raw" | "sobel" | "lbp">): void;
    }
    const version: string;
}

export default _default;

Additional Details

  • Last updated: Thu, 08 Jul 2021 09:07:57 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by hellochar.