otx.api.entities.coordinate#

This module implements the Coordinate entity.

Classes

Coordinate(x, y)

Represents a 2D-coordinate with an x-position and a y-position.

class otx.api.entities.coordinate.Coordinate(x: float, y: float)[source]#

Bases: object

Represents a 2D-coordinate with an x-position and a y-position.

NB most coordinates are normalized (between 0.0 and 1.0)

Parameters:
  • x (float) – x-coordinate

  • y (float) – y-coordinate

as_int_tuple() Tuple[int, int][source]#

Convert the coordinates to a pair of integer coordinates (x,y).

as_tuple() Tuple[float, float][source]#

Convert the coordinates to a pair (x,y).