pytransform3d.camera.world2image

pytransform3d.camera.world2image(P_world, cam2world, sensor_size, image_size, focal_length, image_center=None, kappa=0.0)[source]

Project points from 3D world coordinate system to 2D image.

Parameters
P_worldarray-like, shape (n_points, 4)

Points in world coordinates

cam2worldarray-like, shape (4, 4), optional (default: I)

Camera in world frame

sensor_sizearray-like, shape (2,)

Size of the sensor array

image_sizearray-like, shape (2,)

Size of the camera image: (width, height)

focal_lengthfloat

Focal length of the camera

image_centerarray-like, shape (2,), optional (default: image_size / 2)

Center of the image

kappafloat, optional (default: 0)

Camera distortion parameter

Returns
P_imgarray-like, shape (n_points, 2)

Points on image

Examples using pytransform3d.camera.world2image