tensorflow :: ops :: EncodeJpeg
#include <image_ops.h>
Kodowanie JPEG obrazu.
Podsumowanie
image
jest 3-D Uint8 Tensor kształtu [height, width, channels]
.
format
attr może służyć do przesłonięcia formatu koloru zakodowanego wyjścia. Wartości mogą być:
- `` ''
: Use a default format based on the number of channels in the image. *
grayscale: Output a grayscale JPEG image. The
Kanałydimension of
obrazumust be 1. *
RGB: Output an RGB JPEG image. The
Kanałydimension of
image` musi 3.
Jeśli format
nie jest określony lub jest pustym ciągiem, domyślny format jest wybierany w zależności od liczby kanałów w image
:
Argumenty:
- zakres: obiekt Scope
- obraz: 3-D z kształtem
[height, width, channels]
.
Atrybuty opcjonalne (patrz Attrs
):
- format: format obrazu na piksel.
- jakość: Jakość kompresji od 0 do 100 (wyższa jest lepsza i wolniejsza).
- progresywny: jeśli prawda, utwórz plik JPEG, który będzie ładowany stopniowo (od zgrubnego do dokładnego).
- optimize_size: Jeśli True, wydaj procesor / pamięć RAM, aby zmniejszyć rozmiar bez zmiany jakości.
- chroma_downsampling: Zobacz http://en.wikipedia.org/wiki/Chroma_subsampling .
- density_unit: jednostka używana do określenia
x_density
iy_density
: piksele na cal ('in'
) lub centymetr ('cm'
). - x_density: poziome piksele na jednostkę gęstości.
- y_density: pionowe piksele na jednostkę gęstości.
- xmp_metadata: jeśli nie jest puste, umieść te metadane XMP w nagłówku obrazu.
Zwroty:
-
Output
: 0-D. Obraz zakodowany w formacie JPEG.
Konstruktorzy i niszczyciele | |
---|---|
EncodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input image) | |
EncodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input image, const EncodeJpeg::Attrs & attrs) |
Atrybuty publiczne | |
---|---|
contents | |
operation |
Funkcje publiczne | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Publiczne funkcje statyczne | |
---|---|
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) |
Struktury | |
---|---|
tensorflow :: ops :: EncodeJpeg :: Attrs | Opcjonalne metody ustawiające atrybuty dla EncodeJpeg . |
Atrybuty publiczne
zawartość
::tensorflow::Output contents
operacja
Operation operation
Funkcje publiczne
EncodeJpeg
EncodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input image )
EncodeJpeg
EncodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input image, const EncodeJpeg::Attrs & attrs )
węzeł
::tensorflow::Node * node() const
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Output
operator::tensorflow::Output() const
Publiczne funkcje statyczne
ChromaDownsampling
Attrs ChromaDownsampling( bool x )
DensityUnit
Attrs DensityUnit( StringPiece x )
Format
Attrs Format( StringPiece x )
OptimizeSize
Attrs OptimizeSize( bool x )
Progresywny
Attrs Progressive( bool x )
Jakość
Attrs Quality( int64 x )
XDensity
Attrs XDensity( int64 x )
XmpMetadata
Attrs XmpMetadata( StringPiece x )
YDensity
Attrs YDensity( int64 x )