sdynpy.signal_processing.sdynpy_camera.point_on_pixel

point_on_pixel(K, RT, pixel, distance=1)[source]

Compute the 3D position of a point on a pixel of a given camera

Parameters
  • K (np.ndarray) – A 3x3 array of camera intrinsic parameters

  • RT (np.ndarray) – A 3x4 array of camera extrinsic parameters

  • pixel (ndarray) – A (…,2) shape ndarray where the last dimension contains pixel positions

  • distance (float, optional) – The distance that the point will be positioned from the camera pinhole. The default is 1.

Returns

pixel_coordinates – An array of 3D coordinates with the same shape as the original pixel array, where the 2D pixel position has been replaced with a 3D X,Y,Z position of the point

Return type

ndarray