Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PlanarYUVLuminanceSource

This object extends LuminanceSource around an array of YUV data returned from the camera driver, with the option to crop to a rectangle within the full data. This can be used to exclude superfluous pixels around the perimeter and speed up decoding.

It works for any pixel format where the Y channel is planar and appears first, including YCbCr_420_SP and YCbCr_422_SP.

author

dswitkin@google.com (Daniel Switkin)

Hierarchy

Index

Constructors

constructor

  • new PlanarYUVLuminanceSource(yuvData: Uint8ClampedArray, dataWidth: number, dataHeight: number, left: number, top: number, width: number, height: number, reverseHorizontal: boolean): PlanarYUVLuminanceSource

Properties

Private dataHeight

dataHeight: number

Private dataWidth

dataWidth: number

Private left

left: number

Private top

top: number

Private yuvData

yuvData: Uint8ClampedArray

Static Private THUMBNAIL_SCALE_FACTOR

THUMBNAIL_SCALE_FACTOR: number = 2

Methods

crop

  • crop(left: number, top: number, width: number, height: number): LuminanceSource

getHeight

  • getHeight(): number

getMatrix

  • getMatrix(): Uint8ClampedArray

getRow

  • getRow(y: number, row?: Uint8ClampedArray): Uint8ClampedArray

getThumbnailHeight

  • getThumbnailHeight(): number

getThumbnailWidth

  • getThumbnailWidth(): number

getWidth

  • getWidth(): number

invert

isCropSupported

  • isCropSupported(): boolean

isRotateSupported

  • isRotateSupported(): boolean

renderThumbnail

  • renderThumbnail(): Int32Array

Private reverseHorizontal

  • reverseHorizontal(width: number, height: number): void

rotateCounterClockwise

rotateCounterClockwise45

toString

  • toString(): string

Generated using TypeDoc