Color Space Transform¶
- color_space_transform.color_space_transform(src_data, src_space, dst_space)[source]¶
Transform an image from a one color space to another color space.
Parameters: src_data: ndarray
- The input data to be transformed, of either one of following form:
- a 3xN matrix, with each column representing a color vector.
- an MxNx3 or MxNx4 image. The alpha channel will be preserved if present.
src_space, dst_space: string
Color spaces to be transformed from and to. Current supported color spaces are: “CIE-XYZ”, “CIE-xyY”, “sRGB-linear”, “sRGB” and “CIE-L*a*b*”.
Returns: dst_data : ndarray
The output data after transformation. It will be an ndarray of the same size as src_data.