sym.polynomial_camera_cal module#
- class PolynomialCameraCal(focal_length, principal_point, critical_undistorted_radius, distortion_coeffs)[source]#
Bases:
object
Autogenerated Python implementation of
symforce.cam.polynomial_camera_cal.PolynomialCameraCal
.Polynomial camera model in the style of OpenCV
Distortion is a multiplicative factor applied to the image plane coordinates in the camera frame. Mapping between distorted image plane coordinates and image coordinates is done using a standard linear model.
The distortion function is a 6th order even polynomial that is a function of the radius of the image plane coordinates:
r = (p_img[0] ** 2 + p_img[1] ** 2) ** 0.5 distorted_weight = 1 + c0 * r^2 + c1 * r^4 + c2 * r^6 uv = p_img * distorted_weight
- Parameters:
focal_length (T.Union[T.Sequence[float], numpy.ndarray]) –
principal_point (T.Union[T.Sequence[float], numpy.ndarray]) –
critical_undistorted_radius (float) –
distortion_coeffs (T.Union[T.Sequence[float], numpy.ndarray]) –
- pixel_from_camera_point(point, epsilon)[source]#
Project a 3D point in the camera frame into 2D pixel coordinates.
- Returns:
pixel – (x, y) coordinate in pixels if valid
is_valid – 1 if the operation is within bounds else 0
- Parameters:
point (PolynomialCameraCal) –
epsilon (ndarray) –
- Return type:
- pixel_from_camera_point_with_jacobians(point, epsilon)[source]#
Project a 3D point in the camera frame into 2D pixel coordinates.
- Returns:
pixel – (x, y) coordinate in pixels if valid
is_valid – 1 if the operation is within bounds else 0
pixel_D_cal – Derivative of pixel with respect to intrinsic calibration parameters
pixel_D_point – Derivative of pixel with respect to point
- Parameters:
point (PolynomialCameraCal) –
epsilon (ndarray) –
- Return type:
- local_coordinates(b, epsilon=1e-08)[source]#
- Parameters:
b (PolynomialCameraCal) –
epsilon (float) –
- Return type:
- interpolate(b, alpha, epsilon=1e-08)[source]#
- Parameters:
b (PolynomialCameraCal) –
alpha (float) –
epsilon (float) –
- Return type: