tensorflow:: ops:: EncodeJpeg
#include <image_ops.h>画像をJPEG形式でエンコードする。
まとめ
image 、形状が[height, width, channels]の 3 次元 uint8テンソルです。
attr formatを使用すると、エンコードされた出力の色形式を上書きできます。値は次のとおりです。
- `''
: Use a default format based on the number of channels in the image. *grayscale: Output a grayscale JPEG image. The画像dimension ofmust be 1. *rgb: Output an RGB JPEG image. The画像dimension of3 である必要があります。
formatが指定されていない場合、または空文字列の場合は、 image内のチャンネル数に応じてデフォルトのフォーマットが選択されます。
議論:
- スコープ:スコープオブジェクト
- 画像: 形状
[height, width, channels]を持つ 3D。
オプション属性( Attrs参照):
- フォーマット:ピクセル単位の画像フォーマット。
- 品質:圧縮の品質を0から100までで表したもの(数値が高いほど圧縮速度が遅く、品質が良い)。
- progressive: True の場合、段階的に(粗い画像から細かい画像へ)読み込まれる JPEG ファイルを作成します。
- optimize_size: Trueの場合、品質を損なわずにサイズを縮小するためにCPU/RAMを使用します。
- chroma_downsampling: http://en.wikipedia.org/wiki/Chroma_subsamplingを参照してください。
- density_unit:
x_densityとy_densityを指定するために使用される単位: 1 インチあたりのピクセル数 ('in') またはセンチメートル ('cm')。 - x_density: 密度単位あたりの水平方向のピクセル数。
- y_density: 密度単位あたりの垂直方向のピクセル数。
- xmp_metadata: 空でない場合、このXMPメタデータをイメージヘッダーに埋め込みます。
返品:
-
Output:0次元のJPEGエンコード画像。
コンストラクターとデストラクタ | |
|---|---|
EncodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input image) | |
EncodeJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input image, const EncodeJpeg::Attrs & attrs) |
公開属性 | |
|---|---|
contents | |
operation | |
公的機能 | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
パブリック静的関数 | |
|---|---|
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) | |
構造 | |
|---|---|
| tensorflow:: ops:: EncodeJpeg:: Attrs | EncodeJpegのオプション属性設定子。 |
公開属性
コンテンツ
::tensorflow::Output contents
手術
Operation operation
公的機能
エンコードJPEG
EncodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input image )
エンコードJPEG
EncodeJpeg( const ::tensorflow::Scope & scope, ::tensorflow::Input image, const EncodeJpeg::Attrs & attrs )
ノード
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
パブリック静的関数
クロマダウンサンプリング
Attrs ChromaDownsampling( bool x )
密度単位
Attrs DensityUnit( StringPiece x )
形式
Attrs Format( StringPiece x )
最適化サイズ
Attrs OptimizeSize( bool x )
プログレッシブ
Attrs Progressive( bool x )
品質
Attrs Quality( int64 x )
X密度
Attrs XDensity( int64 x )
Xmpメタデータ
Attrs XmpMetadata( StringPiece x )
Y密度
Attrs YDensity( int64 x )