tensorflow:: אופס:: RGBToHSV

#include <image_ops.h>

ממיר תמונה אחת או יותר מ-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)

טיעונים:

  • scope: אובייקט Scope
  • תמונות: 1-D או דרגה גבוהה יותר. נתוני RGB להמרה. הממד האחרון חייב להיות מידה 3.

החזרות:

  • Output : images שהומרו ל-HSV.

בנאים והורסים

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

תפקידים ציבוריים

RGBToHSV

 RGBToHSV(
  const ::tensorflow::Scope & scope,
  ::tensorflow::Input images
)

צוֹמֶת

::tensorflow::Node * node() const 

מפעיל::tensorflow::קלט

 operator::tensorflow::Input() const 

אופרטור::tensorflow::פלט

 operator::tensorflow::Output() const