interface ConversionUtils {
    toDataURL(options?): string;
    toImageData(options?): ImageData;
}

方法

  • 从张量创建 DataURL 实例

    参数

    • 可选 options: TensorToDataUrlOptions

      一个可选对象,表示从张量创建 DataURL 实例的选项。

      将应用以下默认设置

      • format: 'RGB'
      • tensorLayout: 'NCHW'

    返回 string

    一个 DataURL 字符串,表示从张量数据转换的图像

  • 从张量创建 ImageData 实例

    参数

    • 可选 options: TensorToImageDataOptions

      一个可选对象,表示从张量创建 ImageData 实例的选项。

      将应用以下默认设置

      • format: 'RGB'
      • tensorLayout: 'NCHW'

    返回 ImageData

    一个 ImageData 实例,表示从张量数据转换的图像

使用 TypeDoc 生成