Preparing search index...

    Function opticalFlow

    • Stabilizes image objects between two consecutive frames caused by camera or object movement. Results are written to the points array.

      prevGrayscale - Uint8Array of size (width * height). Grayscale data of previous frame

      grayscale - Uint8Array of size (width * height). Grayscale data of current frame

      textureShape - Should be {width, height, 1}

      prevPoints - Float32Array of size (point count * 2). Positions of 2D points on the previous frame

      points - Float32Array of size (point count * 2). Results are written here - positions of 2D points on the current frame

      pointsShape - Should be {2, point count, 1}

      winSize - Size of the search window for each pyramid level

      maxLevel - Maximal pyramid level number, with zero based index

      maxCount - Terminate if iteration count exceeds maxCount

      epsilon - Terminate if window movement is less than epsilon

      Parameters

      • prevGrayscale: Uint8Array
      • grayscale: Uint8Array
      • textureShape: vec3
      • prevPoints: Float32Array
      • points: Float32Array
      • pointsShape: vec3
      • winSize: vec2
      • maxLevel: number
      • maxCount: number
      • epsilon: number

      Returns void