tensorflow:: ops:: RGBToHSV
#include <image_ops.h>Converte una o più immagini da RGB a HSV.
Riepilogo
Genera un tensore della stessa forma del tensore images , contenente il valore HSV dei pixel. L'output è ben definito solo se il valore nelle images è compreso nell'intervallo [0,1] .
output[..., 0] contiene la tonalità, output[..., 1] contiene la saturazione e output[..., 2] contiene il valore. Tutti i valori HSV sono compresi tra [0,1] . Una tonalità di 0 corrisponde al rosso puro, una tonalità di 1/3 al verde puro e una tonalità di 2/3 al blu puro.
Esempio di utilizzo:
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)
Argomentazioni:
- ambito: un oggetto Scope
- Immagini: 1-D o di rango superiore. Dati RGB da convertire. L'ultima dimensione deve essere di dimensione 3.
Resi:
-
Output:imagesconvertite in formato HSV.
Costruttori e distruttori | |
|---|---|
RGBToHSV (const :: tensorflow::Scope & scope, :: tensorflow::Input images) |
attributi pubblici | |
|---|---|
operation | |
output | |
Funzioni pubbliche | |
|---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const | |
attributi pubblici
operazione
Operation operation
produzione
::tensorflow::Output output
Funzioni pubbliche
RGBToHSV
RGBToHSV( const ::tensorflow::Scope & scope, ::tensorflow::Input images )
nodo
::tensorflow::Node * node() const
operatore::tensorflow::Input
operator::tensorflow::Input() const
operatore::tensoreflusso::output
operator::tensorflow::Output() const