def filter_green(img,
                 red_upper_thresh,
                 green_lower_thresh,
                 blue_lower_thresh,
                 dtype='bool'):
    """
    Create a mask that filters out green pixels
    """
    r = img[...,0] < red_upper_thresh
    g = img[...,1] > green_lower_thresh
    b = img[...,2] > blue_lower_thresh

    mask = ~(r & g & b)

    if dtype == 'bool':
        pass
    elif dtype == 'float':
        mask = mask.astype(dtype)
    elif dtype == 'uint8':
        mask = (255*mask).astype(dtype)

    return mask