Tensorflow :: ops :: EncodeJpeg
#include <image_ops.h>
JPEG-Codierung eines Bildes.
Zusammenfassung
image
ist ein 3-D uint8- Tensor mit Form [height, width, channels]
.
Das attr- format
kann verwendet werden, um das Farbformat der codierten Ausgabe zu überschreiben. Werte können sein:
- `''
: Use a default format based on the number of channels in the image. *
Graustufen: Output a grayscale JPEG image. The
Kanalabmessungdimension of
Bildesmust be 1. *
: Output an RGB JPEG image. The
Kanalabmessungdimension of
Bildes muss 3 sein.
Wenn das format
nicht angegeben ist oder die leere Zeichenfolge ist, wird ein Standardformat in Abhängigkeit von der Anzahl der Kanäle im image
:
Argumente:
- scope: Ein Scope- Objekt
- Bild: 3-D mit Form
[height, width, channels]
.
Optionale Attribute (siehe Attrs
):
- Format: Bildformat pro Pixel.
- Qualität: Qualität der Komprimierung von 0 bis 100 (höher ist besser und langsamer).
- progressiv: Wenn True, erstellen Sie ein JPEG, das progressiv geladen wird (grob bis fein).
- optimize_size: Wenn True, geben Sie CPU / RAM aus, um die Größe ohne Qualitätsänderung zu reduzieren.
- chroma_downsampling: Siehe http://en.wikipedia.org/wiki/Chroma_subsampling .
- Dichteeinheit: Einheit zur Angabe von
x_density
undy_density
: Pixel pro Zoll ('in'
) oder Zentimeter ('cm'
). - x_density: Horizontale Pixel pro Dichteeinheit.
- y_density: Vertikale Pixel pro Dichteeinheit.
- xmp_metadata: Wenn nicht leer, binden Sie diese XMP-Metadaten in den Bildheader ein.
Kehrt zurück:
-
Output
: 0-D. JPEG-codiertes Bild.
Konstruktoren und Destruktoren | |
---|---|
EncodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input image) | |
EncodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input image, const EncodeJpeg::Attrs & attrs) |
Öffentliche Attribute | |
---|---|
contents | |
operation |
Öffentliche Funktionen | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Öffentliche statische Funktionen | |
---|---|
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) |
Strukturen | |
---|---|
tensorflow :: ops :: EncodeJpeg :: Attrs | Optionale Attributsetzer für EncodeJpeg . |
Öffentliche Attribute
Inhalt
::tensorflow::Output contents
Operation
Operation operation
Öffentliche Funktionen
EncodeJpeg
EncodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input image )
EncodeJpeg
EncodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input image, const EncodeJpeg::Attrs & attrs )
Knoten
::tensorflow::Node * node() const
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Output
operator::tensorflow::Output() const
Öffentliche statische Funktionen
ChromaDownsampling
Attrs ChromaDownsampling( bool x )
DensityUnit
Attrs DensityUnit( StringPiece x )
Format
Attrs Format( StringPiece x )
OptimizeSize
Attrs OptimizeSize( bool x )
Progressiv
Attrs Progressive( bool x )
Qualität
Attrs Quality( int64 x )
XDichte
Attrs XDensity( int64 x )
XmpMetadata
Attrs XmpMetadata( StringPiece x )
YDichte
Attrs YDensity( int64 x )