def contrast(img, threshold):
    """
    Constrast all pixels of an image given a threshold.
    All pixels smaller or equal will be 0 and the other will be 255
    """
    return (img > threshold) * 255