sksurgerycalibration.video.video_calibration_cost_functions module¶
Cost functions for video calibration, used with scipy.
-
sksurgerycalibration.video.video_calibration_cost_functions.
mono_proj_err_h2e
(x_0, object_points, image_points, intrinsics, distortion, pattern_tracking, device_tracking, pattern2marker_matrix)[source]¶ Computes the SSE of projected image points and actual image points, for a single camera, where we have a tracked calibration pattern, and assume the pattern2marker transform should remain fixed. Therefore we only optimise hand-eye. So, x_0 should be of length 6.
-
sksurgerycalibration.video.video_calibration_cost_functions.
mono_proj_err_h2e_g2w
(x_0, object_points, image_points, intrinsics, distortion, device_tracking)[source]¶ Method to the SSE of projected image points to actual image points, for a single camera, where we have an untracked pattern. Both the hand2eye and grid2world are optimised. So, x_0 should be of length 12.
-
sksurgerycalibration.video.video_calibration_cost_functions.
mono_proj_err_h2e_int_dist
(x_0, object_points, image_points, device_tracking, pattern_tracking, pattern2marker_matrix)[source]¶ Computes the SSE between projected image points to actual image points, for a single camera, where we have a tracked pattern. The handeye, intrinsics and distortion parameters are optimised. So, x_0 should be of length 6+4+5 = 15.
-
sksurgerycalibration.video.video_calibration_cost_functions.
mono_proj_err_p2m_h2e
(x_0, object_points, image_points, intrinsics, distortion, pattern_tracking, device_tracking)[source]¶ Computes the SSE between projected image points to actual image points, for a single camera, where we have a tracked pattern. Both the pattern2marker and hand2eye are optimised. So, x_0 should be of length 12.
-
sksurgerycalibration.video.video_calibration_cost_functions.
stereo_2d_error_for_extrinsics
(x_0, common_object_points, common_left_image_points, common_right_image_points, left_intrinsics, left_distortion, right_intrinsics, right_distortion, l2r_rmat, l2r_tvec)[source]¶ Computes a vector of residuals between projected image points and actual image points, for left and right image. x_0 should contain left camera extrinsic parameters.
-
sksurgerycalibration.video.video_calibration_cost_functions.
stereo_proj_err_h2e
(x_0, common_object_points, common_left_image_points, common_right_image_points, left_intrinsics, left_distortion, right_intrinsics, right_distortion, l2r_rmat, l2r_tvec, device_tracking_array, pattern_tracking_array, left_pattern2marker_matrix=None)[source]¶ Computes the SSE of projected image points and actual image points for left and right cameras. x_0 should contain the 6DOF of hand-to-eye, and if left_pattern2marker_matrix is None, then an additional 6DOF of pattern-to-marker. So, x_0 can be either length 6 or length 12.
Parameters: - x_0 –
- common_object_points –
- common_left_image_points –
- common_right_image_points –
- left_intrinsics –
- left_distortion –
- right_intrinsics –
- right_distortion –
- l2r_rmat –
- l2r_tvec –
- device_tracking_array –
- pattern_tracking_array –
- left_pattern2marker_matrix –
Returns: matrix of residuals for Levenberg-Marquardt optimisation.
-
sksurgerycalibration.video.video_calibration_cost_functions.
stereo_proj_err_h2e_int_dist_l2r
(x_0, common_object_points, common_left_image_points, common_right_image_points, device_tracking_array, pattern_tracking_array, left_pattern2marker_matrix)[source]¶ Computes the SSE of projected image points against actual image points. x_0 should be 30 DOF.