import math


def exposure(rgb, deltaS):
    """
    Re-exposes the image

    :param rgb: 3xHxW input RGB image, float [0-1]
    :param deltaS: exposure shift (usually -1 to 1)
    :return: 3xHxW output image
    """

    return 1.0 / (1.0 + math.exp(deltaS) * (1.0 / (rgb + 0.0001) - 1.0))