tf.image.rgb_to_grayscale()

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

Converts one or more images from RGB to Grayscale.

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

Args:
  • images: The RGB tensor to convert. Last dimension must have size 3 and should contain RGB values.
  • name: A name for the operation (optional).
Returns:

The converted grayscale image(s).

doc_TensorFlow
2016-10-14 13:08:12
Comments
Leave a Comment

Please login to continue.