tensör akışı:: işlem:: RGBToHSV
#include <image_ops.h>Bir veya daha fazla görüntüyü RGB'den HSV'ye dönüştürür.
Özet
Piksellerin HSV değerini içeren, images tensörüyle aynı şekle sahip bir tensör çıkışı sağlar. Çıkış yalnızca images değer [0,1] şeklindeyse iyi tanımlanır.
output[..., 0] tonu içerir, output[..., 1] doygunluğu içerir ve output[..., 2] değeri içerir. Tüm HSV değerleri [0,1] cinsindendir. 0 tonu saf kırmızıya, 1/3 tonu saf yeşile ve 2/3 tonu saf maviye karşılık gelir.
Kullanım Örneği:
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)
Argümanlar:
- kapsam: Bir Kapsam nesnesi
- görüntüler: 1-D veya daha yüksek derece. Dönüştürülecek RGB verileri. Son boyut 3 beden olmalıdır.
İade:
-
Output: HSV'ye dönüştürülenimages.
Yapıcılar ve Yıkıcılar | |
|---|---|
RGBToHSV (const :: tensorflow::Scope & scope, :: tensorflow::Input images) |
Genel özellikler | |
|---|---|
operation | |
output | |
Kamu işlevleri | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
Genel özellikler
operasyon
Operation operation
çıktı
::tensorflow::Output output
Kamu işlevleri
RGB'denHSV'ye
RGBToHSV( const ::tensorflow::Scope & scope, ::tensorflow::Input images )
düğüm
::tensorflow::Node * node() const
operatör::tensorflow::Giriş
operator::tensorflow::Input() const
operatör::tensorflow::Çıktı
operator::tensorflow::Output() const