przepływ tensorowy:: ops:: Zakoduj JPEG
#include <image_ops.h>Kodowanie obrazu w formacie JPEG.
Streszczenie
image jest trójwymiarowym tensorem kształtu [height, width, channels] .
format attr może zostać użyty do zastąpienia formatu koloru zakodowanego wyniku. Wartości mogą być:
- `''
: Use a default format based on the number of channels in the image. *skala szarości: Output a grayscale JPEG image. Thedimension of: Output a grayscale JPEG image. Theobrazumust be 1. *rgb: Output an RGB JPEG image. Thedimension of: Output an RGB JPEG image. Theobrazu musi wynosić 3.
Jeśli format nie jest określony lub jest pustym ciągiem znaków, wybierany jest format domyślny w zależności od liczby kanałów w image :
Argumenty:
- zakres: Obiekt Scope
- obraz: 3-D z kształtem
[height, width, channels].
Opcjonalne atrybuty (patrz Attrs ):
- format: format obrazu w pikselach.
- jakość: Jakość kompresji od 0 do 100 (im wyższa, tym lepsza i wolniejsza).
- progresywny: Jeśli ma wartość True, utwórz plik JPEG, który ładuje się stopniowo (od zgrubnego do dokładnego).
- Optimal_size: Jeśli ma wartość True, wydaj procesor/RAM, aby zmniejszyć rozmiar bez zmiany jakości.
- chroma_downsampling: Zobacz http://en.wikipedia.org/wiki/Chroma_subsampling .
- gęstości_jednostki: Jednostka używana do określenia
x_densityiy_density: pikseli 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 pusty, osadź te metadane XMP w nagłówku obrazu.
Zwroty:
-
Output: 0-D. Obraz zakodowany w formacie JPEG.
Konstruktory i destruktory | |
|---|---|
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 moduły ustawiające atrybuty dla EncodeJpeg . |
Atrybuty publiczne
zawartość
::tensorflow::Output contents
działanie
Operation operation
Funkcje publiczne
Zakoduj JPEG
EncodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input image )
Zakoduj JPEG
EncodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input image, const EncodeJpeg::Attrs & attrs )
węzeł
::tensorflow::Node * node() const
operator::tensorflow::Wejście
operator::tensorflow::Input() const
operator::tensorflow::Wyjście
operator::tensorflow::Output() const
Publiczne funkcje statyczne
Próbkowanie Chroma
Attrs ChromaDownsampling( bool x )
Jednostka gęstości
Attrs DensityUnit( StringPiece x )
Format
Attrs Format( StringPiece x )
Optymalizujrozmiar
Attrs OptimizeSize( bool x )
Progresywny
Attrs Progressive( bool x )
Jakość
Attrs Quality( int64 x )
XDęstość
Attrs XDensity( int64 x )
XmpMetadane
Attrs XmpMetadata( StringPiece x )
YGęstość
Attrs YDensity( int64 x )