blendersynth.annotations.utils

blendersynth.annotations.utils.project_point_to_image(P, scene, camera, invert_y=True)[source]

Return 2D (x, y) image coordinates of a 3D point P.

Parameters:
  • P (Vector) – 3D point

  • scene (Scene) – Blender scene

  • camera (Camera) – Camera to project through

  • invert_y (bool) – if True, y is measured from the top of the image, otherwise from the bottom (Blender measures from bottom)

blendersynth.annotations.utils.project_points(points, scene, camera, invert_y=True)[source]

Project points to image plane.

Parameters:
  • points (ndarray) – Nx3 matrix of points

  • scene (Scene) – Blender scene

  • camera (Camera) – Camera to project through

  • invert_y (bool) – if True, y is measured from the top of the image, otherwise from the bottom

Returns:

Nx2 matrix of 2D image coordinates