pyorc.CameraConfig.project_grid#

CameraConfig.project_grid(xs, ys, zs, swap_y_coords=False)[source]#

Project gridded coordinates to col, row coordinates on image.

Method uses the intrinsics and extrinsics and distortion parameters to perform the projection.

Parameters:
  • xs (np.ndarray) – 2d array of real-world x-coordinates

  • ys (np.ndarray) – 2d array of real-world y-coordinates

  • zs (np.ndarray) – 2d array of real-world z-coordinates

  • swap_y_coords (bool, optional) – If set to True (default: False), y-coordinates will be swapped, in order to match plotting defaults which return row counting from top to bottom instead of bottom to top.

Returns:

  • xp (np.ndarray) – list of col coordinates of image objective

  • yp (np.ndarray) – list of row coordinates of image objective