(image, mask)
return image.crop(coords), mask.crop(coords)
Removes black borders from an image, and adjust its mask
Removes black borders from an image, and adjust its mask
Removes black borders from an image and adjust its mask
def cropBlack(image, mask):
    """Removes black borders from an image, and adjust its mask
    """
    coords = image.getbbox()
    return image.crop(coords), mask.crop(coords)
def cropBlack ( image , mask ) : coords = image . getbbox ( ) return image . crop ( coords ) , mask . crop ( coords )