Stay organized with collections
Save and categorize content based on your preferences.
tensorflow::
ops::
RGBToHSV
#include <image_ops.h>
Converts one or more images from RGB to HSV.
Summary
Outputs a tensor of the same shape as the
images
tensor, containing the HSV value of the pixels. The output is only well defined if the value in
images
are in
[0,1]
.
output[..., 0]
contains hue,
output[..., 1]
contains saturation, and
output[..., 2]
contains value.
All
HSV values are in
[0,1]
. A hue of 0 corresponds to pure red, hue 1/3 is pure green, and 2/3 is pure blue.
Usage Example:
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)
Args:
-
scope: A
Scope
object
-
images: 1-D or higher rank. RGB data to convert. Last dimension must be size 3.
Returns:
-
Output
:
images
converted to HSV.
Public attributes
Public functions
node
::tensorflow::Node * node() const
operator::tensorflow::Input() const
operator::tensorflow::Output
operator::tensorflow::Output() const
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2021-05-14 UTC.
[null,null,["Last updated 2021-05-14 UTC."],[],[],null,["# tensorflow::ops::RGBToHSV Class Reference\n\ntensorflow::\nops::\nRGBToHSV\n===========================\n\n`\n#include \u003cimage_ops.h\u003e\n`\n\n\nConverts one or more images from RGB to HSV.\n\nSummary\n-------\n\n\nOutputs a tensor of the same shape as the\n`\nimages\n`\ntensor, containing the HSV value of the pixels. The output is only well defined if the value in\n`\nimages\n`\nare in\n`\n[0,1]\n`\n.\n\n\n`\noutput[..., 0]\n`\ncontains hue,\n`\noutput[..., 1]\n`\ncontains saturation, and\n`\noutput[..., 2]\n`\ncontains value.\n[All](/versions/r2.5/api_docs/cc/class/tensorflow/ops/all#classtensorflow_1_1ops_1_1_all)\nHSV values are in\n`\n[0,1]\n`\n. A hue of 0 corresponds to pure red, hue 1/3 is pure green, and 2/3 is pure blue.\n\n\nUsage Example:\n\n\nblue_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)\n\n\nArgs:\n\n- scope: A [Scope](/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- images: 1-D or higher rank. RGB data to convert. Last dimension must be size 3.\n\n\u003cbr /\u003e\n\n\nReturns:\n\n- `\n `[Output](/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output)`\n ` : `\n images\n ` converted to HSV.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| ` `[RGBToHSV](#classtensorflow_1_1ops_1_1_r_g_b_to_h_s_v_1adeee02a3b49a0f5c65cb80d483ea989f)` (const :: `[tensorflow::Scope](/versions/r2.5/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, :: `[tensorflow::Input](/versions/r2.5/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` images) ` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|\n| ` `[operation](#classtensorflow_1_1ops_1_1_r_g_b_to_h_s_v_1ac7ab2f00f74ab0311b9f1c48aaaf7eeb)` ` | ` `[Operation](/versions/r2.5/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation)` ` |\n| ` `[output](#classtensorflow_1_1ops_1_1_r_g_b_to_h_s_v_1a13c0fc88dc3e8e64b4d6e06b977dfb60)` ` | ` :: `[tensorflow::Output](/versions/r2.5/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output)` ` |\n\n| ### Public functions ||\n|------------------------------------------------------------------------------------------------------------------------------|--------------------------|\n| ` `[node](#classtensorflow_1_1ops_1_1_r_g_b_to_h_s_v_1a649b74b8b8eca61339a0b8697b48f663)` () const ` | ` ::tensorflow::Node * ` |\n| ` `[operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_r_g_b_to_h_s_v_1a8df89464d3f6495f95e0dacea72033dc)` () const ` | ` ` |\n| ` `[operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_r_g_b_to_h_s_v_1a985432c9b3b9e880080e1ec9c52a3d4a)` () const ` | ` ` |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### output\n\n```text\n::tensorflow::Output output\n``` \n\nPublic functions\n----------------\n\n### RGBToHSV\n\n```gdscript\n RGBToHSV(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input images\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n```"]]