wakatools.base.DataFrameAccessor.coordinates_scaled#
- DataFrameAccessor.coordinates_scaled(bbox: tuple = None) ndarray[source]#
Get an array of all coordinates in the DataFrame in the shape (N, 2), scaled to between 0 and 1 based on the bounding box of the DataFrame (xmin, ymin, xmax, ymax) or on a specified bounding box.
- Parameters:
bbox (tuple, optional) – A tuple specifying the bounding box (xmin, ymin, xmax, ymax) to use for scaling. If None, the bounding box of the DataFrame is used. The default is None.
- Returns:
An array of shape (N, 2) containing all scaled coordinates.
- Return type:
np.ndarray