make_mask¶
-
seas.rois.make_mask(polylist: numpy.ndarray, shape: Tuple[int, int], bounding_box=None)[source]¶ Makes mask from coordinates of polygon(s).
Polylist is a list of (x,y) numpy arrays,
- Parameters
polylist – A list of (x,y) numpy arrays returned under a roi key by roi_loader, each representing a closed polygon to draw..
shape – (x,y) coordinate of shape to draw the polygons onto.
bounding_box – If provided, offset the polygons by this amount to take into account a previous cropping of the input image/video.
Returns: