ixfx
    Preparing search index...

    Class FrameProcessor

    Frame Processor Simplifies grabbing frames from a camera or video file.

    First, create:

    const fp = new FrameProcessor();
    

    Then either use the camera or a video file:

    fp.useCamera(constraints);
    // or:
    gp.useVideo(file);

    With useCamera, optionally specify Camera.Constraints to pick which camera and resolution.

    fp.getFrame(); // Gets the last frame
    fp.dispose(); // Close down camera/file

    See FrameProcessorOpts for details on available options.

    Index

    Constructors

    Methods

    • Closes down connections and removes created elements. Once disposed, the frame processor cannot be used

      Returns void

    • Shows or hides the Canvas we're capturing to

      Parameters

      • enabled: boolean

      Returns void

    • Hides or shows the raw source in the DOM

      Parameters

      • enabled: boolean

        Preview enabled

      Returns void

    • Grab frames from a video camera source and initialises frame processor.

      If constraints are not specified, it will use the ones provided when creating the class, or defaults.

      Parameters

      • Optionalconstraints: Constraints

        Override of constraints when requesting camera access

      Returns Promise<void>