def lch2rgb(lch):
"""Convert LCH to RGB colorspace (via LAB)
Input and output are in (bands, cols, rows) order
"""
# reshape for skimage (bands, cols, rows) -> (cols, rows, bands)
slch = np.swapaxes(lch, 0, 2)
# convert colorspace
rgb = lab2rgb(lch2lab(slch))
# return in (bands, cols, rows) order
return np.swapaxes(rgb, 2, 0)
评论列表
文章目录