def weight_combination(entropy, contrast, visibility, alpha1, alpha2, alpha3):
    """
    Combining the entropy, the contrast and the visibility to build a weight layer

    :param entropy: The local entropy of the image, a grayscale image
    :param contrast: The local contrast of the image, a grayscale image
    :param visibility: The visibility of the image, a grayscale image
    :param alpha1: The weight of the local entropy, a float within [0, 1]
    :param alpha2: The weight of the local contrast, a float within [0, 1]
    :param alpha3: The weight of the visibility, a float within [0, 1]
    :return: Weight map of the image, a grayscale image
    """

    weight = entropy**alpha1 * contrast**alpha2 * visibility**alpha3
    return weight