テンソルフロー::作戦::領域のサイズ変更

#include <image_ops.h>

領域補間を使用してimages sizeを変更します。

まとめ

入力イメージはさまざまなタイプにすることができますが、出力イメージは常に float です。

数値精度が限られているため、出力イメージのピクセル値の範囲は入力イメージの範囲とわずかに異なる場合があります。 [0.0, 1.0]などの出力範囲を保証するには、 tf.clip_by_valueを出力に適用します。

各出力ピクセルは、最初にピクセルのフットプリントを入力テンソルに変換し、次にフットプリントと交差するピクセルを平均することによって計算されます。平均に対する入力ピクセルの寄与は、フットプリントと交差する面積の割合によって重み付けされます。これはOpenCVのINTER_AREAと同じです。

引数:

  • スコープ:スコープオブジェクト
  • 画像: 形状[batch, height, width, channels]を持つ 4-D。
  • size: = 2 つの要素の 1 次元 int32テンソル: new_height, new_width 。画像の新しいサイズ。

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

  • align_corners: true の場合、入力テンソルと出力テンソルの 4 つのコーナー ピクセルの中心が位置合わせされ、コーナー ピクセルの値が維持されます。デフォルトは false です。

戻り値:

  • Output : 形状[batch, new_height, new_width, channels]の 4-D。

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

ResizeArea (const :: tensorflow::Scope & scope, :: tensorflow::Input images, :: tensorflow::Input size)
ResizeArea (const :: tensorflow::Scope & scope, :: tensorflow::Input images, :: tensorflow::Input size, const ResizeArea::Attrs & attrs)

パブリック属性

operation
resized_images

公共機能

node () const
::tensorflow::Node *
operator::tensorflow::Input () const
operator::tensorflow::Output () const

パブリック静的関数

AlignCorners (bool x)

構造体

tensorflow:: ops:: ResizeArea:: Attrs

ResizeAreaのオプションの属性セッター。

パブリック属性

手術

Operation operation

サイズ変更された画像

::tensorflow::Output resized_images

公共機能

領域のサイズ変更

 ResizeArea(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input images,
  ::tensorflow::Input size
)

領域のサイズ変更

 ResizeArea(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input images,
  ::tensorflow::Input size,
  const ResizeArea::Attrs & attrs
)

ノード

::tensorflow::Node * node() const 

演算子::tensorflow::入力

 operator::tensorflow::Input() const 

演算子::tensorflow::出力

 operator::tensorflow::Output() const 

パブリック静的関数

コーナーを揃える

Attrs AlignCorners(
  bool x
)