def RGBToLumaCCIR601(rgb):
    """
    RGB -> Luma conversion
    Digital CCIR601 (gives less weight to the R and B components)
    :param: rgb - The elements of the array rgb are unsigned chars (0..255).
    :return: The luminance.
    """
    Y = 0.299 * rgb[0] + 0.587 * rgb[1] + 0.114 * rgb[2]
    return Y