colorimetry.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:prysm 作者: brandondube 项目源码 文件源码
def Luv_to_chroma_hue(luv):
    ''' Converts L*u*v* coordiantes to a chroma and hue.

    Args:
        luv (`numpy.ndarray`): array with last dimension L*, u*, v*.

    Returns:
        `numpy.ndarray` with last dimension corresponding to C* and h.

    '''
    luv = np.asarray(luv)
    u, v = luv[..., 1], luv[..., 2]
    C = sqrt(u**2 + v**2)
    h = atan2(v, u)

    shape = luv.shape
    return np.stack((C, h), axis=len(shape))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号