TensorFlow函數(shù)教程:tf.io.decode_bmp

2019-02-22 16:11 更新

tf.io.decode_bmp函數(shù)

別名:

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

將BMP編碼圖像的第一幀解碼為uint8張量。

將BMP編碼圖像的第一幀解碼為uint8張量。

參數(shù)channels表示解碼圖像的所需數(shù)量的顏色通道。

可接受的值是:

  • 0:使用BMP編碼圖像中的通道數(shù)。
  • 3:輸出RGB圖像。
  • 4:輸出RGBA圖像。

參數(shù):

  • contents:string類型的0-d Tensor。BMP編碼的圖像。
  • channels:可選的int。默認(rèn)為0。
  • name:操作的名稱(可選)。

返回:

uint8類型的Tensor。

以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)