deepof.arena_utils.retrieve_corners_from_image

deepof.arena_utils.retrieve_corners_from_image(frame: ndarray, arena_type: str, cur_vid: int, videos: list, current_roi: int = 0, arena_dims: float = 1.0, norm_dist: float | None = None, arena_corners: ndarray | None = None, corners: list = [], test: bool = False)

Open a window and waits for the user to click on all corners of the polygonal arena.

The user should click on the corners in sequential order.

Parameters:
  • frame (np.ndarray) – Frame to display.

  • arena_type (str) – Type of arena to be used. Must be one of the following: “circular-manual”, “polygon-manual”.

  • cur_vid (int) – Index of the current video in the list of videos.

  • videos (list) – List of videos to be processed.

  • current_roi (int) – Current ROI to be extracted. 0 is the global arena ROI

  • arena_dims (float) – Distance as taken from video in pixels

  • norm_dist (float) – Same distance as arena_dims for normalization in mm

  • arena_corners (np.ndarray) – Corners of arena, relevant for automatic ROIs

  • test (bool) – Runs project in test mode and bypasses manual inputs, defaults to false

Returns:

nx2 array containing the x-y coordinates of all n corners.

Return type:

corners (np.ndarray)