Cost Functions#

pycolmap.cost_functions.ReprojErrorCost(*args, **kwargs)#

Overloaded function.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"]) ceres::CostFunction

Reprojection error.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_cov: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 2]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"]) ceres::CostFunction

Reprojection error with 2D detection noise.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.SupportsFloat | typing.SupportsIndex, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"]) ceres::CostFunction

Reprojection error with isotropic 2D detection noise.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"]) ceres::CostFunction

Reprojection error with per-axis 2D detection noise.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], cam_from_world: pycolmap.Rigid3d) ceres::CostFunction

Reprojection error with constant camera pose.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_cov: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 2]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], cam_from_world: pycolmap.Rigid3d) ceres::CostFunction

Reprojection error with constant camera pose and 2D detection noise.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.SupportsFloat | typing.SupportsIndex, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], cam_from_world: pycolmap.Rigid3d) ceres::CostFunction

Reprojection error with constant camera pose and isotropic 2D detection noise.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], cam_from_world: pycolmap.Rigid3d) ceres::CostFunction

Reprojection error with constant camera pose and per-axis 2D detection noise.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], point3D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) ceres::CostFunction

Reprojection error with constant 3D point.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_cov: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 2]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], point3D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) ceres::CostFunction

Reprojection error with constant 3D point and 2D detection noise.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.SupportsFloat | typing.SupportsIndex, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], point3D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) ceres::CostFunction

Reprojection error with constant 3D point and isotropic 2D detection noise.

  1. ReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], point3D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) ceres::CostFunction

Reprojection error with constant 3D point and per-axis 2D detection noise.

pycolmap.cost_functions.RigReprojErrorCost(*args, **kwargs)#

Overloaded function.

  1. RigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"]) ceres::CostFunction

Reprojection error for camera rig.

  1. RigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_cov: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 2]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"]) ceres::CostFunction

Reprojection error for camera rig with 2D detection noise.

  1. RigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.SupportsFloat | typing.SupportsIndex, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"]) ceres::CostFunction

Reprojection error for camera rig with isotropic 2D detection noise.

  1. RigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"]) ceres::CostFunction

Reprojection error for camera rig with per-axis 2D detection noise.

  1. RigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], cam_from_rig: pycolmap.Rigid3d) ceres::CostFunction

Reprojection error for camera rig with constant cam-from-rig pose.

  1. RigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_cov: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 2]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], cam_from_rig: pycolmap.Rigid3d) ceres::CostFunction

Reprojection error for camera rig with constant cam-from-rig pose and 2D detection noise.

  1. RigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.SupportsFloat | typing.SupportsIndex, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], cam_from_rig: pycolmap.Rigid3d) ceres::CostFunction

Reprojection error for camera rig with constant cam-from-rig pose and isotropic 2D detection noise.

  1. RigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], cam_from_rig: pycolmap.Rigid3d) ceres::CostFunction

Reprojection error for camera rig with constant cam-from-rig pose and per-axis 2D detection noise.

pycolmap.cost_functions.ScaledRigReprojErrorCost(*args, **kwargs)#

Overloaded function.

  1. ScaledRigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], use_log_scale: bool = True) ceres::CostFunction

Reprojection error for camera rig with a scaled rig-from-world transform.

  1. ScaledRigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_cov: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 2]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], use_log_scale: bool = True) ceres::CostFunction

Reprojection error for camera rig with a scaled rig-from-world transform and 2D detection noise.

  1. ScaledRigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.SupportsFloat | typing.SupportsIndex, point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], use_log_scale: bool = True) ceres::CostFunction

Reprojection error for camera rig with a scaled rig-from-world transform and isotropic 2D detection noise.

  1. ScaledRigReprojErrorCost(camera_model_id: pycolmap.CameraModelId, point2D_stddev: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], point2D: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[2, 1]"], use_log_scale: bool = True) ceres::CostFunction

Reprojection error for camera rig with a scaled rig-from-world transform and per-axis 2D detection noise.

pycolmap.cost_functions.SampsonErrorCost(
point1: Annotated[numpy.typing.ArrayLike, numpy.float64, '[2, 1]'],
point2: Annotated[numpy.typing.ArrayLike, numpy.float64, '[2, 1]'],
) ceres::CostFunction#

Sampson error for two-view geometry on image-plane points.

pycolmap.cost_functions.AbsolutePosePriorCost(*args, **kwargs)#

Overloaded function.

  1. AbsolutePosePriorCost(cam_from_world_prior: pycolmap.Rigid3d) ceres::CostFunction

6-DoF error on the absolute camera pose.

  1. AbsolutePosePriorCost(cam_cov_from_world_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[6, 6]"], cam_from_world_prior: pycolmap.Rigid3d) ceres::CostFunction

6-DoF error on the absolute camera pose with prior covariance.

  1. AbsolutePosePriorCost(cam_stddev_from_world_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[6, 1]"], cam_from_world_prior: pycolmap.Rigid3d) ceres::CostFunction

6-DoF error on the absolute camera pose with per-DoF prior standard deviations. The first three are on the rotation and the last three on the translation, so they do not share a unit.

pycolmap.cost_functions.AbsolutePosePositionPriorCost(*args, **kwargs)#

Overloaded function.

  1. AbsolutePosePositionPriorCost(position_in_world_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) ceres::CostFunction

3-DoF error on the absolute camera pose’s position.

  1. AbsolutePosePositionPriorCost(position_cov_in_world_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 3]"], position_in_world_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) ceres::CostFunction

3-DoF error on the absolute camera pose’s position with prior covariance.

  1. AbsolutePosePositionPriorCost(position_stddev_in_world_prior: typing.SupportsFloat | typing.SupportsIndex, position_in_world_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) ceres::CostFunction

3-DoF error on the absolute camera pose’s position with isotropic prior standard deviation.

  1. AbsolutePosePositionPriorCost(position_stddev_in_world_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"], position_in_world_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"]) ceres::CostFunction

3-DoF error on the absolute camera pose’s position with per-axis prior standard deviations.

pycolmap.cost_functions.RelativePosePriorCost(*args, **kwargs)#

Overloaded function.

  1. RelativePosePriorCost(i_from_j_prior: pycolmap.Rigid3d) ceres::CostFunction

6-DoF error between two absolute camera poses based on a prior relative pose.

  1. RelativePosePriorCost(i_cov_from_j_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[6, 6]"], i_from_j_prior: pycolmap.Rigid3d) ceres::CostFunction

6-DoF error between two absolute camera poses based on a prior relative pose with prior covariance.

  1. RelativePosePriorCost(i_stddev_from_j_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[6, 1]"], i_from_j_prior: pycolmap.Rigid3d) ceres::CostFunction

6-DoF error between two absolute camera poses based on a prior relative pose with per-DoF prior standard deviations. The first three are on the rotation and the last three on the translation, so they do not share a unit.

pycolmap.cost_functions.Point3DAlignmentCost(*args, **kwargs)#

Overloaded function.

  1. Point3DAlignmentCost(point_in_b_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"], use_log_scale: bool = True) ceres::CostFunction

Error between 3D points transformed by a 3D similarity transform.

  1. Point3DAlignmentCost(point_cov_in_b_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 3]"], point_in_b_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"], use_log_scale: bool = True) ceres::CostFunction

Error between 3D points transformed by a 3D similarity transform. with prior covariance

  1. Point3DAlignmentCost(point_stddev_in_b_prior: typing.SupportsFloat | typing.SupportsIndex, point_in_b_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"], use_log_scale: bool = True) ceres::CostFunction

Error between 3D points transformed by a 3D similarity transform, with an isotropic prior standard deviation.

  1. Point3DAlignmentCost(point_stddev_in_b_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"], point_in_b_prior: typing.Annotated[numpy.typing.ArrayLike, numpy.float64, "[3, 1]"], use_log_scale: bool = True) ceres::CostFunction

Error between 3D points transformed by a 3D similarity transform, with per-axis prior standard deviations.