tensorflow:: ops:: DecodeJpeg
#include <image_ops.h>JPEG形式でエンコードされた画像をuint8テンソルにデコードします。
まとめ
attr channels 、デコードされた画像に必要なカラーチャンネルの数を示します。
許容される値は以下のとおりです。
- 0: JPEGエンコードされた画像のチャンネル数を使用します。
- 1:グレースケール画像を出力します。
- 3:RGB画像を出力する。
必要に応じて、JPEGエンコードされた画像は、要求されたカラーチャンネル数に合わせて変換されます。
attr ratio使用すると、デコード時に画像を整数係数で縮小できます。指定可能な値は 1、2、4、8 です。これは、後から画像を縮小するよりもはるかに高速です。
この操作はインターフェースが同じなのでPNGと非アニメーションGIFのデコードもサポートしていますが、 tf.image.decode_image使用する方がより簡潔です。
議論:
- スコープ:スコープオブジェクト
- 内容:0次元。JPEGエンコードされた画像。
オプション属性( Attrs参照):
- チャンネル数:デコードされた画像のカラーチャンネル数。
- 比率:縮小率。
- fancy_upscaling: true の場合、クロマプレーン (yuv420/422 のみ) のアップスケーリングは遅くなりますが、よりきれいに処理されます。
- try_recover_truncated: trueの場合、切り詰められた入力から画像を復元しようとします。
- acceptance_fraction: 入力が途中で途切れても受け入れられるために必要な最小行数。
- dct_method: 解凍に使用するアルゴリズムに関するヒントを指定する文字列。デフォルトは「」で、これはシステム固有のデフォルト値に対応します。現在有効な値は["INTEGER_FAST", "INTEGER_ACCURATE"]です。このヒントは無視される場合があります(例:内部のjpegライブラリが、この特定のオプションを持たないバージョンに変更された場合)。
返品:
-
Output: 形状[height, width, channels]を持つ 3D 。
コンストラクターとデストラクタ | |
|---|---|
DecodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input contents) | |
DecodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input contents, const DecodeJpeg::Attrs & attrs) |
公開属性 | |
|---|---|
image | |
operation | |
公的機能 | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
パブリック静的関数 | |
|---|---|
AcceptableFraction (float x) | |
Channels (int64 x) | |
DctMethod (StringPiece x) | |
FancyUpscaling (bool x) | |
Ratio (int64 x) | |
TryRecoverTruncated (bool x) | |
構造 | |
|---|---|
| tensorflow:: ops:: DecodeJpeg:: Attrs | DecodeJpegのオプション属性設定子。 |
公開属性
画像
::tensorflow::Output image
手術
Operation operation
公的機能
デコードJPEG
DecodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input contents )
デコードJPEG
DecodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input contents, const DecodeJpeg::Attrs & attrs )
ノード
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
パブリック静的関数
許容分数
Attrs AcceptableFraction( float x )
チャンネル
Attrs Channels( int64 x )
Dctメソッド
Attrs DctMethod( StringPiece x )
ファンシーアップスケーリング
Attrs FancyUpscaling( bool x )
比率
Attrs Ratio( int64 x )
TryRecoverTruncate
Attrs TryRecoverTruncated( bool x )