colorex.cex_keras : keras layers for color transformation
colorex keras layers
- colorex.cex_keras.color_space(from_space, to_space, values)[source]
lookup color transform from_space to_space apply transform and return output tensor short circuit compute if from_space == to_space
- colorex.cex_keras.color_space_numpy(from_space, to_space, values)[source]
numpy wrapper for backend color transform
- colorex.cex_keras.lab_to_xyz(lab)[source]
convert from lab to xyz color space assuming a D65 whitepoint + 2deg angle
- colorex.cex_keras.rgb_to_luminance(rgb, luma_weights=(0.2126, 0.7152, 0.0722))[source]
luminance of a color array, or higher dim color images
- colorex.cex_keras.rgb_to_ycbcr(rgb)[source]
- convert from rgb color space to YCbCr
rgb: rgb color space YCbCr: luminance with 2 chroma channels
https://en.wikipedia.org/wiki/YCbCr http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_xyY.html
- colorex.cex_keras.xyy_to_xyz(xyY)[source]
- convert from xyY color space to XYZ
xyY: normalized chromaticity with xy in 0-1, Y in 0-inf XYZ: consistent units for each component
https://en.wikipedia.org/wiki/CIE_1931_color_space http://www.brucelindbloom.com/index.html?Eqn_xyY_to_XYZ.html
- colorex.cex_keras.xyz_to_xyy(XYZ)[source]
- convert from XYZ color space to xyY
XYZ: consistent units for each component xyY: normalized chromaticity with xy in 0-1, Y in 0-inf
https://en.wikipedia.org/wiki/CIE_1931_color_space http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_xyY.html
- colorex.cex_keras.ycbcr_to_rgb(ycbcr)[source]
- convert from YCbCr color space to srgb
YCbCr: luminance with 2 chroma channels srgb: rgb color space
https://en.wikipedia.org/wiki/YCbCr http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_xyY.html