#include <image_ops.h>
Decode a JPEG-encoded image to a uint8 tensor.
The attr channels
indicates the desired number of color channels for the decoded image.
Accepted values are:
If needed, the JPEG-encoded image is transformed to match the requested number of color channels.
The attr ratio
allows downscaling the image by an integer factor during decoding. Allowed values are: 1, 2, 4, and 8. This is much faster than downscaling the image later.
Arguments:
Optional attributes (see Attrs
):
Returns:
Output
: 3-D with shape [height, width, channels]
.. Constructors and Destructors | |
---|---|
DecodeJpeg(const ::tensorflow::Scope & scope, ::tensorflow::Input contents) | |
DecodeJpeg(const ::tensorflow::Scope & scope, ::tensorflow::Input contents, const DecodeJpeg::Attrs & attrs) |
Public attributes | |
---|---|
image |
Public functions | |
---|---|
node() const | ::tensorflow::Node * |
operator::tensorflow::Input() const | |
operator::tensorflow::Output() const |
Public static functions | |
---|---|
AcceptableFraction(float x) | |
Channels(int64 x) | |
DctMethod(StringPiece x) | |
FancyUpscaling(bool x) | |
Ratio(int64 x) | |
TryRecoverTruncated(bool x) |
Structs | |
---|---|
tensorflow::ops::DecodeJpeg::Attrs | Optional attribute setters for DecodeJpeg. |
::tensorflow::Output image
DecodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input contents )
DecodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input contents, const DecodeJpeg::Attrs & attrs )
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output() const
Attrs AcceptableFraction( float x )
Attrs Channels( int64 x )
Attrs DctMethod( StringPiece x )
Attrs FancyUpscaling( bool x )
Attrs Ratio( int64 x )
Attrs TryRecoverTruncated( bool x )
© 2017 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/cc/class/tensorflow/ops/decode-jpeg.html