aliran tensor:: operasi:: EncodeJpeg
#include <image_ops.h>
JPEG-encode gambar.
Ringkasan
image
adalah Tensor uint8 3-D bentuk [height, width, channels]
.
format
attr dapat digunakan untuk mengganti format warna dari keluaran yang disandikan. Nilai dapat berupa:
- `''
: Use a default format based on the number of channels in the image. *
skala abu-abu: Output a grayscale JPEG image. The
dimension of
gambarmust be 1. *
rgb: Output an RGB JPEG image. The
dimension of
gambar` harus 3.
Jika format
tidak ditentukan atau string kosong, format default dipilih dalam fungsi jumlah saluran dalam image
:
Argumen:
- ruang lingkup: Objek Lingkup
- gambar: 3-D dengan bentuk
[height, width, channels]
.
Atribut opsional (lihat Attrs
):
- format: Format gambar per piksel.
- kualitas: Kualitas kompresi dari 0 hingga 100 (lebih tinggi lebih baik dan lebih lambat).
- progresif: Jika Benar, buat JPEG yang memuat secara progresif (kasar hingga halus).
- optim_size: Jika Benar, habiskan CPU/RAM untuk mengurangi ukuran tanpa perubahan kualitas.
- chroma_downsampling: Lihat http://en.wikipedia.org/wiki/Chroma_subsampling .
- density_unit: Satuan yang digunakan untuk menentukan
x_density
dany_density
: piksel per inci ('in'
) atau sentimeter ('cm'
). - x_density: Piksel horizontal per unit kepadatan.
- y_density: Piksel vertikal per unit kepadatan.
- xmp_metadata: Jika tidak kosong, sematkan metadata XMP ini di header gambar.
Pengembalian:
-
Output
: 0-D. Gambar berkode JPEG.
Konstruktor dan Destructor | |
---|---|
EncodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input image) | |
EncodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input image, const EncodeJpeg::Attrs & attrs) |
Atribut publik | |
---|---|
contents | |
operation |
Fungsi publik | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Fungsi statis publik | |
---|---|
ChromaDownsampling (bool x) | |
DensityUnit (StringPiece x) | |
Format (StringPiece x) | |
OptimizeSize (bool x) | |
Progressive (bool x) | |
Quality (int64 x) | |
XDensity (int64 x) | |
XmpMetadata (StringPiece x) | |
YDensity (int64 x) |
Struktur | |
---|---|
tensorflow:: ops:: EncodeJpeg:: Attrs | Setter atribut opsional untuk EncodeJpeg . |
Atribut publik
isi
::tensorflow::Output contents
operasi
Operation operation
Fungsi publik
EncodeJpeg
EncodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input image )
EncodeJpeg
EncodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input image, const EncodeJpeg::Attrs & attrs )
simpul
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Fungsi statis publik
ChromaDownsampling
Attrs ChromaDownsampling( bool x )
Satuan Kepadatan
Attrs DensityUnit( StringPiece x )
Format
Attrs Format( StringPiece x )
Optimalkan Ukuran
Attrs OptimizeSize( bool x )
Progresif
Attrs Progressive( bool x )
Kualitas
Attrs Quality( int64 x )
kepadatan X
Attrs XDensity( int64 x )
XmpMetadata
Attrs XmpMetadata( StringPiece x )
Kepadatan Y
Attrs YDensity( int64 x )