panel_segmentation.utils.convertMaskToLatLonPolygon#

panel_segmentation.utils.convertMaskToLatLonPolygon(mask, img_center_lat, img_center_lon, image_x_pixels, image_y_pixels, zoom_level)[source]#

Take an inference mask output from a model, and convert it to a polygon with listed latitude-longitude coordinates.

Parameters:
  • mask (nparray) – A binary mask output from a deep learning model, which can be converted to a polygon.

  • img_center_lat (float) – Latitude coordinate of the image center.

  • img_center_lon (float) – Longitude coordinate of the image center.

  • image_x_pixels (int) – The x width of the image in pixels.

  • image_y_pixels (int) – The y height of the image in pixels.

  • zoom_level (int) – The zoom level of the image.

Returns:

polygon_coord_list – A list of (latitude, longitude) coordinates for a polygon.

Return type:

list