concepts.gui.tk.point_picker.get_click_coordinates_from_image#

get_click_coordinates_from_image(image, min_dimension=0)[source]#

Opens an image in a UI window and waits for the user to click on the image. Returns the coordinates of the click and closes the window.

Parameters:
  • image (Image) – a PIL Image object.

  • min_dimension (int) – minimum dimension of the image window. If the image is smaller than this, it will be resized to fit this dimension while maintaining the aspect ratio.

Returns:

a tuple containing the u and v coordinates of the click (axis 1 and axis 0).

Return type:

Tuple[int, int]