tensorflow::ops::EncodePng
#include <image_ops.h>Mengonversi gambar ke format PNG.
Ringkasan
image adalah Tensor 3-D uint8 atau uint16 dengan bentuk [height, width, channels] di mana channels adalah:
- 1: untuk skala abu-abu.
- 2: untuk skala abu-abu + alpha.
- 3: untuk RGB.
- 4: untuk RGBA.
Tingkat kompresi ZLIB, compression , dapat berupa -1 untuk default encoder PNG atau nilai dari 0 hingga 9. 9 adalah tingkat kompresi tertinggi, menghasilkan output terkecil, tetapi lebih lambat.
Argumen:
- Cakupan: Objek Cakupan
- gambar: 3-D dengan bentuk
[height, width, channels].
Atribut opsional (lihat Attrs ):
- kompresi: Tingkat kompresi.
Mengembalikan:
-
Output: 0-D. Gambar berkode PNG.
Konstruktor dan Destruktor | |
|---|---|
EncodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input image) | |
EncodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input image, const EncodePng::Attrs & attrs) |
Atribut publik | |
|---|---|
contents | |
operation | |
Fungsi publik | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Fungsi statis publik | |
|---|---|
Compression (int64 x) | |
Struktur | |
|---|---|
| tensorflow::ops::EncodePng::Attrs | Pengaturan atribut opsional untuk EncodePng . |
Atribut publik
isi
::tensorflow::Output contents
operasi
Operation operation
Fungsi publik
EncodePng
EncodePng( const ::tensorflow::Scope & scope, ::tensorflow::Input image )
EncodePng
EncodePng( const ::tensorflow::Scope & scope, ::tensorflow::Input image, const EncodePng::Attrs & attrs )
simpul
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Fungsi statis publik
Kompresi
Attrs Compression( int64 x )