tensorflow:: ops:: ResizeArea
#include <image_ops.h>面積補間を用いてimages sizeにリサイズします。
まとめ
入力画像は様々な型に対応可能ですが、出力画像は常に浮動小数点型です。
数値精度の制限により、出力画像のピクセル値の範囲は入力画像の範囲と若干異なる場合があります。出力範囲を例えば[0.0, 1.0]に保証するには、出力にtf.clip_by_value適用してください。
各出力ピクセルは、まずピクセルのフットプリントを入力テンソルに変換し、次にフットプリントと交差するピクセルの平均を計算することによって求められます。入力ピクセルの平均への寄与は、フットプリントと交差する面積の割合によって重み付けされます。これは、OpenCVのINTER_AREAと同じです。
議論:
- スコープ:スコープオブジェクト
- 画像: 形状
[batch, height, width, channels]を持つ 4-D。 - size: = 2つの要素(
new_height, new_widthを持つ1次元int32テンソル。画像の新しいサイズ。
オプション属性( Attrs参照):
- align_corners: true の場合、入力テンソルと出力テンソルの 4 つの角ピクセルの中心が揃えられ、角ピクセルの値が保持されます。デフォルトは false です。
返品:
-
Output:形状[batch, new_height, new_width, channels]の4次元。
コンストラクターとデストラクタ | |
|---|---|
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
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
パブリック静的関数
アラインコーナーズ
Attrs AlignCorners( bool x )