codecamp

TensorFlow函数:tf.image.decode_bmp

tf.image.decode_bmp函数

tf.image.decode_bmp(
    contents,
    channels=0,
    name=None
)

请参阅指南:图像操作>编码和解码图像

将BMP编码图像的第一帧解码为uint8张量.

attr channels表示解码图像的期望数量的颜色通道.

接受的值是:

  • 0:使用BMP编码图像中的通道数量.
  • 3:输出RGB图像.
  • 4:输出RGBA图像.

参数:

  • contents:string类型的Tensor,0维,BMP编码的图像.
  • channels:可选的int,默认为0.
  • name:操作的名称(可选).

返回值:

函数返回uint8类型的Tensor.

TensorFlow函数:tf.image.decode_and_crop_jpeg
TensorFlow函数:tf.image.decode_gif
温馨提示
下载编程狮App,免费阅读超1000+编程语言教程
取消
确定