tensorflow:: ops:: DecodeAndCropJpeg

#include <image_ops.h>

JPEG形式でエンコードされた画像をデコードし、uint8テンソルに切り抜きます。

まとめ

attr channels 、デコードされた画像に必要なカラーチャンネルの数を示します。

許容される値は以下のとおりです。

  • 0: JPEGエンコードされた画像のチャンネル数を使用します。
  • 1:グレースケール画像を出力します。
  • 3:RGB画像を出力する。

必要に応じて、JPEGエンコードされた画像は、要求されたカラーチャンネル数に合わせて変換されます。

attr ratio使用すると、デコード時に画像を整数係数で縮小できます。指定可能な値は 1、2、4、8 です。これは、後から画像を縮小するよりもはるかに高速です。

これはデコードとトリミングを組み合わせたものに相当しますが、JPEG画像の一部のみをデコードすることで、はるかに高速になります。

議論:

  • スコープ:スコープオブジェクト
  • 内容:0次元。JPEGエンコードされた画像。
  • crop_window: 1次元。クロップウィンドウ: [crop_y、crop_x、crop_height、crop_width]。

オプション属性( Attrs参照):

  • チャンネル数:デコードされた画像のカラーチャンネル数。
  • 比率:縮小率。
  • fancy_upscaling: true の場合、クロマプレーン (yuv420/422 のみ) のアップスケーリングは遅くなりますが、よりきれいに処理されます。
  • try_recover_truncated: trueの場合、切り詰められた入力から画像を復元しようとします。
  • acceptance_fraction: 入力が途中で途切れても受け入れられるために必要な最小行数。
  • dct_method: string specifying a hint about the algorithm used for decompression. Defaults to "" which maps to a system-specific default. Currently valid values are ["INTEGER_FAST", "INTEGER_ACCURATE"]. The hint may be ignored (eg, the internal jpeg library changes to a version that does not have that specific option.)

返品:

  • Output : 形状[height, width, channels]を持つ 3D 。

コンストラクターとデストラクタ

DecodeAndCropJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input contents, :: tensorflow::Input crop_window)
DecodeAndCropJpeg (const :: tensorflow::Scope & scope, :: tensorflow::Input contents, :: tensorflow::Input crop_window, const DecodeAndCropJpeg::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:: DecodeAndCropJpeg:: Attrs

DecodeAndCropJpegのオプション属性設定子。

公開属性

画像

::tensorflow::Output image

手術

Operation operation

公的機能

DecodeAndCropJpeg

 DecodeAndCropJpeg(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input contents,
  ::tensorflow::Input crop_window
)

DecodeAndCropJpeg

 DecodeAndCropJpeg(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input contents,
  ::tensorflow::Input crop_window,
  const DecodeAndCropJpeg::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
)