tensorflow::ops::DecodePng
#include <image_ops.h>Mendekode gambar berformat PNG menjadi tensor uint8 atau uint16.
Ringkasan
Attr channels menunjukkan jumlah saluran warna yang diinginkan untuk gambar yang didekode.
Nilai yang diterima adalah:
- 0: Gunakan jumlah saluran pada gambar yang dikodekan PNG.
- 1: menghasilkan gambar skala abu-abu.
- 3: menghasilkan gambar RGB.
- 4: menghasilkan gambar RGBA.
Jika diperlukan, gambar yang dikodekan PNG akan diubah agar sesuai dengan jumlah saluran warna yang diminta.
Operasi ini juga mendukung dekode JPEG dan GIF non-animasi karena antarmuka yang digunakan sama, meskipun lebih bersih jika menggunakan tf.io.decode_image .
Argumen:
- Cakupan: Objek Cakupan
- Isi: 0-D. Gambar yang dikodekan PNG.
Atribut opsional (lihat Attrs ):
- saluran: Jumlah saluran warna untuk gambar yang didekode.
Mengembalikan:
-
Output: 3-D dengan bentuk[height, width, channels].
Konstruktor dan Destruktor | |
|---|---|
DecodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input contents) | |
DecodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input contents, const DecodePng::Attrs & attrs) |
Atribut publik | |
|---|---|
image | |
operation | |
Fungsi publik | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Fungsi statis publik | |
|---|---|
Channels (int64 x) | |
Dtype (DataType x) | |
Struktur | |
|---|---|
| tensorflow::ops::DecodePng::Attrs | Pengaturan atribut opsional untuk DecodePng . |
Atribut publik
gambar
::tensorflow::Output image
operasi
Operation operation
Fungsi publik
DekodePng
DecodePng( const ::tensorflow::Scope & scope, ::tensorflow::Input contents )
DekodePng
DecodePng( const ::tensorflow::Scope & scope, ::tensorflow::Input contents, const DecodePng::Attrs & attrs )
simpul
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Fungsi statis publik
Saluran
Attrs Channels( int64 x )
Tipe D
Attrs Dtype( DataType x )