Options
All
  • Public
  • Public/Protected
  • All
Menu

A class for processing image frames and returning any planar target detections.

Hierarchy

  • PlanarTargetDetector

Index

Constructors

constructor

Methods

addDetection

  • addDetection(detectorIndexData: Uint8Array): void
  • Takes a Uint8Array containing the raw byte data of a BoxDetectorIndex file representing an arbitrary number of planar targets, and copies it to the shared heap for C++-side WASM processing, adding all targets to the set of objects to detect. The unique identifiers for these objects should be already built into the BoxDetectorIndex file.

    Parameters

    • detectorIndexData: Uint8Array

      The array of raw byte data for a BoxDetectorIndex file, which can be generated offline using the Planar Target Indexer utility.

    Returns void

addDetectionWithId

  • addDetectionWithId(objectId: number, detectorIndexData: Uint8Array): void
  • Takes a Uint8Array containing the raw byte data of a BoxDetectorIndex file representing a single planar target, as well as the unique identifier to use for this planar target when detecting. Will set the objectId as specified, copy over the data to the shared heap for C++-side WASM processing, and add it to the set of objects to detect. The unique identifier should not currently be in use, and the BoxDetectorIndex data must represent only one planar target. Whatever object identifier was previously encoded into the BoxDetectorIndex data will be overwritten by the new objectId.

    Parameters

    • objectId: number

      The unique (non-negative) identifier to use for this object during detection. Must not be currently in use.

    • detectorIndexData: Uint8Array

      The array of raw byte data for a BoxDetectorIndex file, which can be generated offline using the Planar Target Indexer utility.

    Returns void

cancelDetection

  • cancelDetection(objectId: number): void
  • Takes the id of an object we currently try to detect, and removes it from our dictionary of detection objects, thereby cancelling detection on it.

    Parameters

    • objectId: number

      The unique identifier of the object to stop detecting.

    Returns void

process

  • process(imageData: ImageData, timestamp: number): any
  • Takes the relevant information from the JS image frame and hands it off to C++ for processing to determine planar target detections.

    Parameters

    • imageData: ImageData

      The raw image data for the current frame.

    • timestamp: number

      The timestamp of the current frame, in ms.

    Returns any

    embind-created structure holding a vector of {!QuadDetection} objects. Structure is autogenerated from planar_target_detector_internal.cc, so please see there for more info.

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc