def is_dark_image(img,min_bright=100, prop=0.1):
    """work out if too few pixels pass a brightness threshold
    Default is < 10% of pixels with brightness of 100

    :param img:
    :type img: numpy.ndarray
    :param min_bright: the threshold value for bright pixels
    :type min_bright: int
    :param prop: the proportion of image pixels that must pass the threshold
    :type prop: float

    :return bool:
    """
    count = (img <= min_bright).sum()
    target = img.shape[0] * img.shape[1] * prop
    if count >= target:
        return False
    else:
        return True