Tensorflow :: ops :: DecodePng
#include <image_ops.h>
Dekodieren Sie ein PNG-codiertes Bild in einen uint8- oder uint16-Tensor.
Zusammenfassung
Die attr- channels
geben die gewünschte Anzahl von Farbkanälen für das decodierte Bild an.
Akzeptierte Werte sind:
- 0: Verwenden Sie die Anzahl der Kanäle im PNG-codierten Bild.
- 1: Geben Sie ein Graustufenbild aus.
- 3: Ausgabe eines RGB-Bildes.
- 4: Ausgabe eines RGBA-Bildes.
Bei Bedarf wird das PNG-codierte Bild so transformiert, dass es der angeforderten Anzahl von Farbkanälen entspricht.
Diese Operation unterstützt auch das Dekodieren von JPEGs und nicht animierten GIFs, da die Benutzeroberfläche identisch ist, obwohl die Verwendung von tf.image.decode_image
sauberer ist.
Argumente:
- scope: Ein Scope- Objekt
- Inhalt: 0-D. Das PNG-codierte Bild.
Optionale Attribute (siehe Attrs
):
- Kanäle: Anzahl der Farbkanäle für das decodierte Bild.
Kehrt zurück:
-
Output
: 3-D mit Form[height, width, channels]
.
Konstruktoren und Destruktoren | |
---|---|
DecodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input contents) | |
DecodePng (const :: tensorflow::Scope & scope, :: tensorflow::Input contents, const DecodePng::Attrs & attrs) |
Öffentliche Attribute | |
---|---|
image | |
operation |
Öffentliche Funktionen | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
Öffentliche statische Funktionen | |
---|---|
Channels (int64 x) | |
Dtype (DataType x) |
Strukturen | |
---|---|
tensorflow :: ops :: DecodePng :: Attrs | Optionale Attributsetzer für DecodePng . |
Öffentliche Attribute
Bild
::tensorflow::Output image
Operation
Operation operation
Öffentliche Funktionen
DecodePng
DecodePng( const ::tensorflow::Scope & scope, ::tensorflow::Input contents )
DecodePng
DecodePng( const ::tensorflow::Scope & scope, ::tensorflow::Input contents, const DecodePng::Attrs & attrs )
Knoten
::tensorflow::Node * node() const
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Output
operator::tensorflow::Output() const
Öffentliche statische Funktionen
Kanäle
Attrs Channels( int64 x )
Dtype
Attrs Dtype( DataType x )