imforge.cut module¶
-
imforge.cut.cut_out(image, *polygons, fillcolor=None)¶ Cut out the areas delimited by given list of polygons: i.e. fill image pixels outside of given polygons with the given fill color.
- Parameters
image (Union[PIL.Image.Image,numpy.ndarray]) – the image to cut out
fillcolor – the color to use for filling area outside of polygons
-
imforge.cut.cut_out_cv2(image, *polygons, fillcolor=None)¶ Cut out the areas delimited by given list of polygons: i.e. fill image pixels outside of given polygons with the given fill color.
- Parameters
image (numpy.ndarray) – the numpy array representing the image
fillcolor – the color to use for filling area outside of polygons
-
imforge.cut.cut_out_pil(image, *polygons, fillcolor=None)¶ Cut out the areas delimited by given list of polygons: i.e. fill image pixels outside of given polygons with the given fill color.
- Parameters
image (PIL.Image.Image) – the image to cut out
fillcolor – the color to use for filling area outside of polygons