bob.ip.gray_to_rgb

bob.ip.gray_to_rgb((object)y, (object)dtype) → object :
Converts a grayscale pixel to RGB by copying the gray value to all 3 bands. Returns a tuple with (r,g,b) values. This method is just here for convenience.

Depending on the dtype parameter, different types of data is expected:

  • ‘float’: float values between 0 and 1
  • ‘uint8’: integers between 0 and 255
  • ‘uint16’: integers between 0 and 65535
gray_to_rgb( (object)gray, (object)rgb) -> None :
Takes a 2-dimensional array encoded as grays and sets the second array with RGB equivalents as determined by gray_to_rgb_one(). The output array has to have the required size for the conversion otherwise an exception is raised (except for versions allocating the returned arrays). WARNING: As of this time only C-style storage arrays are supported
gray_to_rgb( (object)gray) -> object :
Takes a 2-dimensional array encoded as grays and sets the second array with RGB equivalents as determined by gray_to_rgb_one(). The output array has to have the required size for the conversion otherwise an exception is raised (except for versions allocating the returned arrays). WARNING: As of this time only C-style storage arrays are supported