panel_segmentation.utils.getInferenceBoxLatLonCoordinates#
- panel_segmentation.utils.getInferenceBoxLatLonCoordinates(box, img_center_lat, img_center_lon, image_x_pixels, image_y_pixels, zoom_level)[source]#
Get the latitude-longitude coordinates of the centroid of a box output from model inference, based on the image center location & zoom level.
- Parameters:
box (list) – A list of float pixel values containing the coordinates of a bounding box in the format [xmin, ymin, xmax, ymax].
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) – Zoom level of the image.
- Returns:
(box_lat, box_lon) – The (latitude, longitude) coordinates of the centroid of a box.
- Return type:
tuple