W3cubDocs

/TensorFlow Python

tf.image.grayscale_to_rgb

tf.image.grayscale_to_rgb(
    images,
    name=None
)

Defined in tensorflow/python/ops/image_ops_impl.py.

See the guide: Images > Converting Between Colorspaces

Converts one or more images from Grayscale to RGB.

Outputs a tensor of the same DType and rank as images. The size of the last dimension of the output is 3, containing the RGB value of the pixels.

Args:

  • images: The Grayscale tensor to convert. Last dimension must be size 1.
  • name: A name for the operation (optional).

Returns:

The converted grayscale image(s).

© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/image/grayscale_to_rgb