CameraModel.pixels_to_unit

abstract CameraModel.pixels_to_unit(pixels, temperature=0, image=0)[source]

This method converts pixel image locations to unit vectors expressed in the camera frame.

The pixel locations should be expressed as a shape (2,) or (2, n) array. They are converted to unit vectors by first going through the inverse distortion model (see undistort_pixels()) and then being converted to unit vectors in the camera frame according to the definitions of the current model (also including any misalignment terms).

Parameters:
  • pixels (Sequence | ndarray) – The image points to be converted to unit vectors in the camera frame as a shape (2,) or (2, n) array

  • temperature (Real) – The temperature to use for the undistortion

  • image (int) – The image index that the pixels belong to (only important if there are multiple misalignments)

Returns:

The unit vectors corresponding to the image locations expressed in the camera frame as a shape (3,) or (3, n) array.

Return type:

ndarray