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 pointscene (
Scene
) – Blender scenecamera (
Camera
) – Camera to project throughinvert_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 pointsscene (
Scene
) – Blender scenecamera (
Camera
) – Camera to project throughinvert_y (
bool
) – if True, y is measured from the top of the image, otherwise from the bottom
- Returns:
Nx2 matrix of 2D image coordinates