Interface TensorFromImageOptions

Describes Tensor and Image configuration to an image data.

Hierarchy

  • TensorFromImageOptions

Properties

bitmapFormat?: ImageFormat

Describes image data format - will be used only in the case of ImageBitMap

dataType?: "float32" | "uint8"

Tensor data type - default is 'float32'

height?: number

Describes Image Height - Required only in the case of ImageBitMap

norm?: {
    bias?: number;
    mean?: number;
}

Describes normalization parameters to tensor conversion from image data - default values - Bias: 0, Mean: 255

Type declaration

  • Optional bias?: number
  • Optional mean?: number
resizedHeight?: number

Describes resized height - can be accessed via tensor dimensions as well

resizedWidth?: number

Describes resized width - can be accessed via tensor dimensions as well

tensorFormat?: ImageFormat

Describes Tensor channels order - can differ from original image

tensorLayout?: "NHWC" | "NCHW"

Tensor channel layout - default is 'NHWC'

width?: number

Describes Image Width - Required only in the case of ImageBitMap

Generated using TypeDoc