tensorflow:: ops:: RGBToHSV
#include <image_ops.h>1つまたは複数の画像をRGB形式からHSV形式に変換します。
まとめ
imagesテンソルと同じ形状のテンソルを出力します。このテンソルには、ピクセルのHSV値が含まれます。出力は、 imagesの値が[0,1]範囲内にある場合にのみ正しく定義されます。
output[..., 0]には色相、 output[..., 1]には彩度、 output[..., 2]には明度が格納されます。HSV値はすべて[0,1]範囲です。色相0は純粋な赤、色相1/3は純粋な緑、色相2/3は純粋な青に対応します。
使用例:
blue_image = tf.stack([ ... tf.zeros([5,5]), ... tf.zeros([5,5]), ... tf.ones([5,5])], ... axis=-1) blue_hsv_image = tf.image.rgb_to_hsv(blue_image) blue_hsv_image[0,0].numpy() array([0.6666667, 1. , 1. ], dtype=float32)
議論:
- スコープ:スコープオブジェクト
- 画像:1次元以上の次元。変換対象はRGBデータ。最後の次元はサイズ3である必要があります。
返品:
-
Output:HSV形式に変換されたimages。
コンストラクターとデストラクタ | |
|---|---|
RGBToHSV (const :: tensorflow::Scope & scope, :: tensorflow::Input images) |
公開属性 | |
|---|---|
operation | |
output | |
公的機能 | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
公開属性
手術
Operation operation
出力
::tensorflow::Output output
公的機能
RGBからHSVへ
RGBToHSV( const ::tensorflow::Scope & scope, ::tensorflow::Input images )
ノード
::tensorflow::Node * node() const
operator::tensorflow::Input
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const