panel_segmentation.utils.binaryMaskToPolygon#
- panel_segmentation.utils.binaryMaskToPolygon(mask)[source]#
Convert a binary mask output (from a deep learning model) to a list of polygon coordinates, which can later be converted to latitude-longitude coordinates.
- Parameters:
mask (nparray) – A binary mask output from a deep learning model, which can be converted to a polygon.
- Returns:
contours_new – Array of (x,y) image pixel-coordinate arrays for a polygon.
- Return type:
nparray