pycolmap
- class pycolmap.Device(*args, **kwargs)
Members:
auto
cpu
cuda
Overloaded function.
__init__(self: pycolmap.Device, value: int) → None
__init__(self: pycolmap.Device, name: str) → None
- property name
- property value
- auto = Device.auto
- cpu = Device.cpu
- cuda = Device.cuda
- class pycolmap.logging
- class Level(self: pycolmap.logging.Level, value: int)
Members:
INFO
WARNING
ERROR
FATAL
- ERROR = <Level.ERROR: 2>
- FATAL = <Level.FATAL: 3>
- INFO = <Level.INFO: 0>
- WARNING = <Level.WARNING: 1>
- property name
- property value
- INFO = <Level.INFO: 0>
- WARNING = <Level.WARNING: 1>
- ERROR = <Level.ERROR: 2>
- FATAL = <Level.FATAL: 3>
- minloglevel = 0
- stderrthreshold = 2
- log_dir = ''
- logtostderr = False
- alsologtostderr = True
- verbose_level = 0
- static set_log_destination(level: pycolmap.logging.Level, path: str) None
- static verbose(level: int, message: str) None
- static info(message: str) None
- static warning(message: str) None
- static error(message: str) None
- static fatal(message: str) None
- class pycolmap.Timer(self: pycolmap.Timer)
- start(self: pycolmap.Timer) None
- restart(self: pycolmap.Timer) None
- pause(self: pycolmap.Timer) None
- resume(self: pycolmap.Timer) None
- reset(self: pycolmap.Timer) None
- elapsed_micro_seconds(self: pycolmap.Timer) float
- elapsed_seconds(self: pycolmap.Timer) float
- elapsed_minutes(self: pycolmap.Timer) float
- elapsed_hours(self: pycolmap.Timer) float
- print_seconds(self: pycolmap.Timer) None
- print_minutes(self: pycolmap.Timer) None
- print_hours(self: pycolmap.Timer) None
- class pycolmap.Rotation3d(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.Rotation3d) → None
__init__(self: pycolmap.Rotation3d, xyzw: numpy.ndarray[numpy.float64[4, 1]]) → None
Quaternion in [x,y,z,w] format.
__init__(self: pycolmap.Rotation3d, matrix: numpy.ndarray[numpy.float64[3, 3]]) → None
3x3 rotation matrix.
__init__(self: pycolmap.Rotation3d, axis_angle: numpy.ndarray[numpy.float64[3, 1]]) → None
Axis-angle 3D vector.
__init__(self: pycolmap.Rotation3d, kwargs: dict) → None
__init__(self: pycolmap.Rotation3d, **kwargs) → None
- property quat
Quaternion in [x,y,z,w] format. (ndarray, default: [0. 0. 0. 1.])
- normalize(self: pycolmap.Rotation3d) None
- matrix(self: pycolmap.Rotation3d) numpy.ndarray[numpy.float64[3, 3]]
- norm(self: pycolmap.Rotation3d) float
- angle(self: pycolmap.Rotation3d) float
- angle_to(self: pycolmap.Rotation3d, other: pycolmap.Rotation3d) float
- inverse(self: pycolmap.Rotation3d) pycolmap.Rotation3d
- summary(self: pycolmap.Rotation3d, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.Rotation3d, recursive: bool = True) dict
- class pycolmap.Rigid3d(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.Rigid3d) → None
__init__(self: pycolmap.Rigid3d, rotation: pycolmap.Rotation3d, translation: numpy.ndarray[numpy.float64[3, 1]]) → None
__init__(self: pycolmap.Rigid3d, matrix: numpy.ndarray[numpy.float64[3, 4]]) → None
3x4 transformation matrix.
__init__(self: pycolmap.Rigid3d, kwargs: dict) → None
__init__(self: pycolmap.Rigid3d, **kwargs) → None
- property rotation
(Rotation3d, default: Rotation3d(xyzw=[0, 0, 0, 1]))
- property translation
(ndarray, default: [0. 0. 0.])
- matrix(self: pycolmap.Rigid3d) numpy.ndarray[numpy.float64[3, 4]]
- adjoint(self: pycolmap.Rigid3d) numpy.ndarray[numpy.float64[6, 6]]
- inverse(self: pycolmap.Rigid3d) pycolmap.Rigid3d
- get_covariance_for_inverse(
- self: pycolmap.Rigid3d,
- covar: numpy.ndarray[numpy.float64[6, 6]],
- static interpolate(cam_from_world1: pycolmap.Rigid3d, cam_from_world2: pycolmap.Rigid3d, t: float) pycolmap.Rigid3d
- summary(self: pycolmap.Rigid3d, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.Rigid3d, recursive: bool = True) dict
- class pycolmap.Sim3d(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.Sim3d) → None
__init__(self: pycolmap.Sim3d, scale: float, rotation: pycolmap.Rotation3d, translation: numpy.ndarray[numpy.float64[3, 1]]) → None
__init__(self: pycolmap.Sim3d, matrix: numpy.ndarray[numpy.float64[3, 4]]) → None
3x4 transformation matrix.
__init__(self: pycolmap.Sim3d, kwargs: dict) → None
__init__(self: pycolmap.Sim3d, **kwargs) → None
- property scale
(ndarray, default: 1.0)
- property rotation
(Rotation3d, default: Rotation3d(xyzw=[0, 0, 0, 1]))
- property translation
(ndarray, default: [0. 0. 0.])
- matrix(self: pycolmap.Sim3d) numpy.ndarray[numpy.float64[3, 4]]
- transform_camera_world(self: pycolmap.Sim3d, cam_from_world: pycolmap.Rigid3d) pycolmap.Rigid3d
- inverse(self: pycolmap.Sim3d) pycolmap.Sim3d
- summary(self: pycolmap.Sim3d, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.Sim3d, recursive: bool = True) dict
- class pycolmap.PosePriorCoordinateSystem(*args, **kwargs)
Members:
UNDEFINED
WGS84
CARTESIAN
Overloaded function.
__init__(self: pycolmap.PosePriorCoordinateSystem, value: int) → None
__init__(self: pycolmap.PosePriorCoordinateSystem, name: str) → None
- property name
- property value
- UNDEFINED = PosePriorCoordinateSystem.UNDEFINED
- WGS84 = PosePriorCoordinateSystem.WGS84
- CARTESIAN = PosePriorCoordinateSystem.CARTESIAN
- class pycolmap.PosePrior(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.PosePrior) → None
__init__(self: pycolmap.PosePrior, position: numpy.ndarray[numpy.float64[3, 1]]) → None
__init__(self: pycolmap.PosePrior, position: numpy.ndarray[numpy.float64[3, 1]], coordinate_system: pycolmap.PosePriorCoordinateSystem) → None
__init__(self: pycolmap.PosePrior, position: numpy.ndarray[numpy.float64[3, 1]], position_covariance: numpy.ndarray[numpy.float64[3, 3]]) → None
__init__(self: pycolmap.PosePrior, position: numpy.ndarray[numpy.float64[3, 1]], position_covariance: numpy.ndarray[numpy.float64[3, 3]], coordinate_system: pycolmap.PosePriorCoordinateSystem) → None
__init__(self: pycolmap.PosePrior, kwargs: dict) → None
__init__(self: pycolmap.PosePrior, **kwargs) → None
- property position
(ndarray, default: [nan nan nan])
- property position_covariance
(ndarray, default: [[nan nan nan] [nan nan nan] [nan nan nan]])
- property coordinate_system
(PosePriorCoordinateSystem, default: PosePriorCoordinateSystem.UNDEFINED)
- is_valid(self: pycolmap.PosePrior) bool
- is_covariance_valid(self: pycolmap.PosePrior) bool
- summary(self: pycolmap.PosePrior, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.PosePrior, recursive: bool = True) dict
- pycolmap.pose_from_homography_matrix(
- H: numpy.ndarray[numpy.float64[3, 3]],
- K1: numpy.ndarray[numpy.float64[3, 3]],
- K2: numpy.ndarray[numpy.float64[3, 3]],
- points1: numpy.ndarray[numpy.float64[m, 2]],
- points2: numpy.ndarray[numpy.float64[m, 2]],
Recover the most probable pose from the given homography matrix using the cheirality check.
- pycolmap.homography_decomposition(*args, **kwargs) object
Deprecated, use
pose_from_homography_matrix
instead.
- pycolmap.essential_matrix_from_pose(cam2_from_cam1: pycolmap.Rigid3d) numpy.ndarray[numpy.float64[3, 3]]
Construct essential matrix from relative pose.
- class pycolmap.RANSACOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.RANSACOptions) → None
__init__(self: pycolmap.RANSACOptions, kwargs: dict) → None
__init__(self: pycolmap.RANSACOptions, **kwargs) → None
- property max_error
(float, default: 4.0)
- property min_inlier_ratio
(float, default: 0.01)
- property confidence
(float, default: 0.9999)
- property dyn_num_trials_multiplier
(float, default: 3.0)
- property min_num_trials
(int, default: 1000)
- property max_num_trials
(int, default: 100000)
- summary(self: pycolmap.RANSACOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.RANSACOptions, recursive: bool = True) dict
- class pycolmap.Point2D(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.Point2D) → None
__init__(self: pycolmap.Point2D, xy: numpy.ndarray[numpy.float64[2, 1]], point3D_id: int = 18446744073709551615) → None
__init__(self: pycolmap.Point2D, kwargs: dict) → None
__init__(self: pycolmap.Point2D, **kwargs) → None
- property xy
(ndarray, default: [0. 0.])
- property point3D_id
(int, default: 18446744073709551615)
- has_point3D(self: pycolmap.Point2D) bool
- summary(self: pycolmap.Point2D, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.Point2D, recursive: bool = True) dict
- class pycolmap.ListPoint2D(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.ListPoint2D) → None
__init__(self: pycolmap.ListPoint2D, arg0: pycolmap.ListPoint2D) → None
Copy constructor
__init__(self: pycolmap.ListPoint2D, arg0: Iterable) → None
- count(self: pycolmap.ListPoint2D, x: pycolmap.Point2D) int
Return the number of times
x
appears in the list
- remove(self: pycolmap.ListPoint2D, x: pycolmap.Point2D) None
Remove the first item from the list whose value is x. It is an error if there is no such item.
- append(self: pycolmap.ListPoint2D, x: pycolmap.Point2D) None
Add an item to the end of the list
- clear(self: pycolmap.ListPoint2D) None
Clear the contents
- extend(*args, **kwargs)
Overloaded function.
extend(self: pycolmap.ListPoint2D, L: pycolmap.ListPoint2D) → None
Extend the list by appending all the items in the given list
extend(self: pycolmap.ListPoint2D, L: Iterable) → None
Extend the list by appending all the items in the given list
- insert(self: pycolmap.ListPoint2D, i: int, x: pycolmap.Point2D) None
Insert an item at a given position.
- pop(*args, **kwargs)
Overloaded function.
pop(self: pycolmap.ListPoint2D) → pycolmap.Point2D
Remove and return the last item
pop(self: pycolmap.ListPoint2D, i: int) → pycolmap.Point2D
Remove and return the item at index
i
- class pycolmap.CameraModelId(*args, **kwargs)
Members:
INVALID
SIMPLE_PINHOLE
PINHOLE
SIMPLE_RADIAL
SIMPLE_RADIAL_FISHEYE
RADIAL
RADIAL_FISHEYE
OPENCV
OPENCV_FISHEYE
FULL_OPENCV
FOV
THIN_PRISM_FISHEYE
RAD_TAN_THIN_PRISM_FISHEYE
Overloaded function.
__init__(self: pycolmap.CameraModelId, value: int) → None
__init__(self: pycolmap.CameraModelId, name: str) → None
- property name
- property value
- INVALID = CameraModelId.INVALID
- SIMPLE_PINHOLE = CameraModelId.SIMPLE_PINHOLE
- PINHOLE = CameraModelId.PINHOLE
- SIMPLE_RADIAL = CameraModelId.SIMPLE_RADIAL
- SIMPLE_RADIAL_FISHEYE = CameraModelId.SIMPLE_RADIAL_FISHEYE
- RADIAL = CameraModelId.RADIAL
- RADIAL_FISHEYE = CameraModelId.RADIAL_FISHEYE
- OPENCV = CameraModelId.OPENCV
- OPENCV_FISHEYE = CameraModelId.OPENCV_FISHEYE
- FULL_OPENCV = CameraModelId.FULL_OPENCV
- FOV = CameraModelId.FOV
- THIN_PRISM_FISHEYE = CameraModelId.THIN_PRISM_FISHEYE
- RAD_TAN_THIN_PRISM_FISHEYE = CameraModelId.RAD_TAN_THIN_PRISM_FISHEYE
- class pycolmap.Camera(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.Camera) → None
__init__(self: pycolmap.Camera, kwargs: dict) → None
__init__(self: pycolmap.Camera, **kwargs) → None
- static create(
- camera_id: int,
- model: pycolmap.CameraModelId,
- focal_length: float,
- width: int,
- height: int,
- property camera_id
Unique identifier of the camera. (int, default: 4294967295)
- property model
Camera model. (CameraModelId, default: CameraModelId.INVALID)
- property width
Width of camera sensor. (int, default: 0)
- property height
Height of camera sensor. (int, default: 0)
- mean_focal_length(self: pycolmap.Camera) float
- property focal_length
- property focal_length_x
- property focal_length_y
- property has_prior_focal_length
(bool, default: False)
- property principal_point_x
- property principal_point_y
- focal_length_idxs(self: pycolmap.Camera) list[int]
Indices of focal length parameters in params property.
- principal_point_idxs(self: pycolmap.Camera) list[int]
Indices of principal point parameters in params property.
- extra_params_idxs(self: pycolmap.Camera) list[int]
Indices of extra parameters in params property.
- calibration_matrix(self: pycolmap.Camera) numpy.ndarray[numpy.float64[3, 3]]
Compute calibration matrix from params.
- property params_info
Get human-readable information about the parameter vector ordering.
- property params
Camera parameters. (ndarray, default: [])
- params_to_string(self: pycolmap.Camera) str
Concatenate parameters as comma-separated list.
- set_params_from_string(self: pycolmap.Camera, params: str) bool
Set camera parameters from comma-separated list.
- verify_params(self: pycolmap.Camera) bool
Check whether parameters are valid, i.e. the parameter vector has the correct dimensions that match the specified camera model.
- has_bogus_params(
- self: pycolmap.Camera,
- min_focal_length_ratio: float,
- max_focal_length_ratio: float,
- max_extra_param: float,
Check whether camera has bogus parameters.
- cam_from_img(*args, **kwargs)
Overloaded function.
cam_from_img(self: pycolmap.Camera, image_point: numpy.ndarray[numpy.float64[2, 1]]) → numpy.ndarray[numpy.float64[2, 1]]
Project point in image plane to world / infinity.
cam_from_img(self: pycolmap.Camera, image_points: numpy.ndarray[numpy.float64[m, 2]]) → numpy.ndarray[numpy.float64[m, 2]]
Project list of points in image plane to world / infinity.
cam_from_img(self: pycolmap.Camera, image_points: pycolmap.ListPoint2D) → numpy.ndarray[numpy.float64[m, 2]]
Project list of points in image plane to world / infinity.
- cam_from_img_threshold(self: pycolmap.Camera, threshold: float) float
Convert pixel threshold in image plane to world space.
- img_from_cam(*args, **kwargs)
Overloaded function.
img_from_cam(self: pycolmap.Camera, cam_point: numpy.ndarray[numpy.float64[2, 1]]) → numpy.ndarray[numpy.float64[2, 1]]
Project point from world / infinity to image plane.
img_from_cam(self: pycolmap.Camera, cam_points: numpy.ndarray[numpy.float64[m, 2]]) → numpy.ndarray[numpy.float64[m, 2]]
Project list of points from world / infinity to image plane.
img_from_cam(self: pycolmap.Camera, cam_points: numpy.ndarray[numpy.float64[m, 3]]) → object
Project list of points from world / infinity to image plane.
img_from_cam(self: pycolmap.Camera, cam_points: pycolmap.ListPoint2D) → numpy.ndarray[numpy.float64[m, 2]]
Project list of points from world / infinity to image plane.
- rescale(*args, **kwargs)
Overloaded function.
rescale(self: pycolmap.Camera, new_width: int, new_height: int) → None
Rescale the camera dimensions and accordingly the focal length and the principal point.
rescale(self: pycolmap.Camera, scale: float) → None
Rescale the camera dimensions and accordingly the focal length and the principal point.
- summary(self: pycolmap.Camera, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.Camera, recursive: bool = True) dict
- class pycolmap.MapCameraIdToCamera(self: pycolmap.MapCameraIdToCamera)
- keys(self: pycolmap.MapCameraIdToCamera) pycolmap.KeysView
- values(self: pycolmap.MapCameraIdToCamera) pycolmap.ValuesView
- items(self: pycolmap.MapCameraIdToCamera) pycolmap.ItemsView
- class pycolmap.KeysView
- class pycolmap.ValuesView
- class pycolmap.ItemsView
- class pycolmap.Image(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.Image) → None
__init__(self: pycolmap.Image, name: str = '', points2D: pycolmap.ListPoint2D = ListPoint2D(), cam_from_world: Optional[pycolmap.Rigid3d] = None, camera_id: int = 4294967295, id: int = 4294967295) → None
__init__(self: pycolmap.Image, name: str = '', keypoints: numpy.ndarray[numpy.float64[m, 2]] = array([], shape=(0, 2), dtype=float64), cam_from_world: Optional[pycolmap.Rigid3d] = Rigid3d(rotation_xyzw=[0, 0, 0, 1], translation=[0, 0, 0]), camera_id: int = 4294967295, id: int = 4294967295) → None
__init__(self: pycolmap.Image, kwargs: dict) → None
__init__(self: pycolmap.Image, **kwargs) → None
- property image_id
Unique identifier of the image. (int, default: 4294967295)
- property camera_id
Unique identifier of the camera. (int, default: 4294967295)
- property camera
The address of the camera (NoneType, default: None)
- property name
Name of the image. (str, default: )
- property cam_from_world
The pose of the image, defined as the transformation from world to camera space. None if the image is not registered. (NoneType, default: None)
- property has_pose
Whether the image has a valid pose. (bool, default: False)
- reset_pose(self: pycolmap.Image) None
Invalidate the pose of the image.
- property points2D
Array of Points2D (=keypoints). (ListPoint2D, default: ListPoint2D[])
- point2D(self: pycolmap.Image, point2D_idx: int) pycolmap.Point2D
Direct accessor for a point2D.
- set_point3D_for_point2D(self: pycolmap.Image, point2D_Idx: int, point3D_id: int) None
Set the point as triangulated, i.e. it is part of a 3D point track.
- reset_point3D_for_point2D(self: pycolmap.Image, point2D_idx: int) None
Set the point as not triangulated, i.e. it is not part of a 3D point track
- has_point3D(self: pycolmap.Image, point3D_id: int) bool
Check whether one of the image points is part of a 3D point track.
- projection_center(self: pycolmap.Image) numpy.ndarray[numpy.float64[3, 1]]
Extract the projection center in world space.
- viewing_direction(self: pycolmap.Image) numpy.ndarray[numpy.float64[3, 1]]
Extract the viewing direction of the image.
- project_point(
- self: pycolmap.Image,
- point3D: numpy.ndarray[numpy.float64[3, 1]],
Project 3D point onto the image
- has_camera_id(self: pycolmap.Image) bool
Check whether identifier of camera has been set.
- has_camera_ptr(self: pycolmap.Image) bool
Check whether the camera pointer has been set.
- reset_camera_ptr(self: pycolmap.Image) None
Make the camera pointer a nullptr.
- num_points2D(self: pycolmap.Image) int
Get the number of image points (keypoints).
- property num_points3D
Get the number of triangulations, i.e. the number of points that are part of a 3D point track. (int, default: 0)
- get_observation_point2D_idxs(self: pycolmap.Image) list[int]
Get the indices of 2D points that observe a 3D point.
- get_observation_points2D(self: pycolmap.Image) pycolmap.ListPoint2D
Get the 2D points that observe a 3D point.
- summary(self: pycolmap.Image, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.Image, recursive: bool = True) dict
- class pycolmap.MapImageIdToImage(self: pycolmap.MapImageIdToImage)
- keys(self: pycolmap.MapImageIdToImage) pycolmap.KeysView
- values(self: pycolmap.MapImageIdToImage) pycolmap.ValuesView
- items(self: pycolmap.MapImageIdToImage) pycolmap.ItemsView
- class pycolmap.TrackElement(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.TrackElement) → None
__init__(self: pycolmap.TrackElement, image_id: int, point2D_idx: int) → None
__init__(self: pycolmap.TrackElement, kwargs: dict) → None
__init__(self: pycolmap.TrackElement, **kwargs) → None
- property image_id
(int, default: 4294967295)
- property point2D_idx
(int, default: 4294967295)
- summary(self: pycolmap.TrackElement, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.TrackElement, recursive: bool = True) dict
- class pycolmap.Track(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.Track) → None
__init__(self: pycolmap.Track, elements: list[pycolmap.TrackElement]) → None
__init__(self: pycolmap.Track, kwargs: dict) → None
__init__(self: pycolmap.Track, **kwargs) → None
- property elements
(list, default: [])
- length(self: pycolmap.Track) int
Track Length.
- add_element(*args, **kwargs)
Overloaded function.
add_element(self: pycolmap.Track, image_id: int, point2D_idx: int) → None
Add an observation to the track.
add_element(self: pycolmap.Track, element: pycolmap.TrackElement) → None
- add_elements(self: pycolmap.Track, elements: list[pycolmap.TrackElement]) None
Add multiple elements.
- delete_element(*args, **kwargs)
Overloaded function.
delete_element(self: pycolmap.Track, image_id: int, point2D_idx: int) → None
Delete observation from track.
delete_element(self: pycolmap.Track, index: int) → None
Remove TrackElement at index.
- summary(self: pycolmap.Track, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.Track, recursive: bool = True) dict
- class pycolmap.Point3D(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.Point3D) → None
__init__(self: pycolmap.Point3D, kwargs: dict) → None
__init__(self: pycolmap.Point3D, **kwargs) → None
- property xyz
(ndarray, default: [0. 0. 0.])
- property color
(ndarray, default: [0 0 0])
- property error
(float, default: -1.0)
- property track
(Track, default: Track(elements=[]))
- summary(self: pycolmap.Point3D, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.Point3D, recursive: bool = True) dict
- class pycolmap.MapPoint3DIdToPoint3D(self: pycolmap.MapPoint3DIdToPoint3D)
- keys(self: pycolmap.MapPoint3DIdToPoint3D) pycolmap.KeysView
- values(self: pycolmap.MapPoint3DIdToPoint3D) pycolmap.ValuesView
- items(self: pycolmap.MapPoint3DIdToPoint3D) pycolmap.ItemsView
- class pycolmap.Correspondence(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.Correspondence) → None
__init__(self: pycolmap.Correspondence, image_id: int, point2D_idx: int) → None
__init__(self: pycolmap.Correspondence, kwargs: dict) → None
__init__(self: pycolmap.Correspondence, **kwargs) → None
- property image_id
(int, default: 4294967295)
- property point2D_idx
(int, default: 4294967295)
- summary(self: pycolmap.Correspondence, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.Correspondence, recursive: bool = True) dict
- class pycolmap.CorrespondenceGraph(self: pycolmap.CorrespondenceGraph)
- num_images(self: pycolmap.CorrespondenceGraph) int
- num_image_pairs(self: pycolmap.CorrespondenceGraph) int
- exists_image(self: pycolmap.CorrespondenceGraph, image_id: int) bool
- num_observations_for_image(self: pycolmap.CorrespondenceGraph, image_id: int) int
- num_correspondences_for_image(self: pycolmap.CorrespondenceGraph, image_id: int) int
- num_correspondences_between_images(
- self: pycolmap.CorrespondenceGraph,
- image_id1: int,
- image_id2: int,
- num_correspondences_between_all_images(self: pycolmap.CorrespondenceGraph) dict[int, int]
- finalize(self: pycolmap.CorrespondenceGraph) None
- add_image(self: pycolmap.CorrespondenceGraph, image_id: int, num_points2D: int) None
- add_correspondences(
- self: pycolmap.CorrespondenceGraph,
- image_id1: int,
- image_id2: int,
- correspondences: numpy.ndarray[numpy.uint32[m, 2]],
- extract_correspondences(
- self: pycolmap.CorrespondenceGraph,
- image_id: int,
- point2D_idx: int,
- extract_transitive_correspondences(
- self: pycolmap.CorrespondenceGraph,
- image_id: int,
- point2D_idx: int,
- transitivity: int,
- find_correspondences_between_images(
- self: pycolmap.CorrespondenceGraph,
- image_id1: int,
- image_id2: int,
- has_correspondences(self: pycolmap.CorrespondenceGraph, image_id: int, point2D_idx: int) bool
- is_two_view_observation(self: pycolmap.CorrespondenceGraph, image_id: int, point2D_idx: int) bool
- class pycolmap.Reconstruction(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.Reconstruction) → None
__init__(self: pycolmap.Reconstruction, reconstruction: pycolmap.Reconstruction) → None
__init__(self: pycolmap.Reconstruction, path: str) → None
- read(self: pycolmap.Reconstruction, path: str) None
Read reconstruction in COLMAP format. Prefer binary.
- write(self: pycolmap.Reconstruction, output_dir: str) None
Write reconstruction in COLMAP binary format.
- read_text(self: pycolmap.Reconstruction, path: str) None
- read_binary(self: pycolmap.Reconstruction, path: str) None
- write_text(self: pycolmap.Reconstruction, path: str) None
- write_binary(self: pycolmap.Reconstruction, path: str) None
- num_cameras(self: pycolmap.Reconstruction) int
- num_images(self: pycolmap.Reconstruction) int
- num_reg_images(self: pycolmap.Reconstruction) int
- num_points3D(self: pycolmap.Reconstruction) int
- property images
- image(self: pycolmap.Reconstruction, image_id: int) pycolmap.Image
Direct accessor for an image.
- property cameras
- camera(self: pycolmap.Reconstruction, camera_id: int) pycolmap.Camera
Direct accessor for a camera.
- property points3D
- point3D(self: pycolmap.Reconstruction, point3D_id: int) pycolmap.Point3D
Direct accessor for a Point3D.
- point3D_ids(self: pycolmap.Reconstruction) set[int]
- reg_image_ids(self: pycolmap.Reconstruction) set[int]
- exists_camera(self: pycolmap.Reconstruction, camera_id: int) bool
- exists_image(self: pycolmap.Reconstruction, image_id: int) bool
- exists_point3D(self: pycolmap.Reconstruction, point3D_id: int) bool
- tear_down(self: pycolmap.Reconstruction) None
- add_camera(self: pycolmap.Reconstruction, camera: pycolmap.Camera) None
Add new camera. There is only one camera per image, while multiple images might be taken by the same camera.
- add_image(self: pycolmap.Reconstruction, image: pycolmap.Image) None
Add new image. Its camera must have been added before. If its camera object is unset, it will be automatically populated from the added cameras.
- add_point3D(
- self: pycolmap.Reconstruction,
- xyz: numpy.ndarray[numpy.float64[3, 1]],
- track: pycolmap.Track,
- color: numpy.ndarray[numpy.uint8[3, 1]] = array([0, 0, 0], dtype=uint8),
Add new 3D object, and return its unique ID.
- add_observation(
- self: pycolmap.Reconstruction,
- point3D_id: int,
- track_element: pycolmap.TrackElement,
Add observation to existing 3D point.
- merge_points3D(self: pycolmap.Reconstruction, point3D_id1: int, point3D_id2: int) int
Merge two 3D points and return new identifier of new 3D point.The location of the merged 3D point is a weighted average of the two original 3D point’s locations according to their track lengths.
- delete_point3D(self: pycolmap.Reconstruction, point3D_id: int) None
Delete a 3D point, and all its references in the observed images.
- delete_observation(self: pycolmap.Reconstruction, image_id: int, point2D_idx: int) None
Delete one observation from an image and the corresponding 3D point. Note that this deletes the entire 3D point, if the track has two elements prior to calling this method.
- register_image(self: pycolmap.Reconstruction, image_id: int) None
Register an existing image.
- deregister_image(self: pycolmap.Reconstruction, image_id: int) None
De-register an existing image, and all its references.
- is_image_registered(self: pycolmap.Reconstruction, image_id: int) bool
Check if image is registered.
- normalize(
- self: pycolmap.Reconstruction,
- fixed_scale: bool = False,
- extent: float = 10.0,
- p0: float = 0.1,
- p1: float = 0.9,
- use_images: bool = True,
Normalize scene by scaling and translation to avoid degeneratevisualization after bundle adjustment and to improve numericalstability of algorithms.
Translates scene such that the mean of the camera centers or pointlocations are at the origin of the coordinate system.
Scales scene such that the minimum and maximum camera centers are at the given extent, whereas p0 and p1 determine the minimum and maximum percentiles of the camera centers considered.
- transform(self: pycolmap.Reconstruction, new_from_old_world: pycolmap.Sim3d) None
Apply the 3D similarity transformation to all images and points.
- compute_bounding_box(
- self: pycolmap.Reconstruction,
- p0: float = 0.0,
- p1: float = 1.0,
- crop(
- self: pycolmap.Reconstruction,
- bbox: tuple[numpy.ndarray[numpy.float64[3, 1]], numpy.ndarray[numpy.float64[3, 1]]],
- find_image_with_name(self: pycolmap.Reconstruction, name: str) pycolmap.Image
Find image with matching name. Returns None if no match is found.
- find_common_reg_image_ids(
- self: pycolmap.Reconstruction,
- other: pycolmap.Reconstruction,
Find images that are both present in this and the given reconstruction.
- update_point_3d_errors(self: pycolmap.Reconstruction) None
- compute_num_observations(self: pycolmap.Reconstruction) int
- compute_mean_track_length(self: pycolmap.Reconstruction) float
- compute_mean_observations_per_reg_image(self: pycolmap.Reconstruction) float
- compute_mean_reprojection_error(self: pycolmap.Reconstruction) float
- import_PLY(self: pycolmap.Reconstruction, path: str) None
Import from PLY format. Note that these import functions areonly intended for visualization of data and usable for reconstruction.
- export_PLY(self: pycolmap.Reconstruction, output_path: str) None
Export 3D points to PLY format (.ply).
- extract_colors_for_image(self: pycolmap.Reconstruction, image_id: int, path: str) bool
Extract colors for 3D points of given image. Colors will be extracted only for 3D points which are completely black. Return True if the image could be read at the given path.
- extract_colors_for_all_images(self: pycolmap.Reconstruction, path: str) None
Extract colors for all 3D points by computing the mean color of all images.
- create_image_dirs(self: pycolmap.Reconstruction, path: str) None
Create all image sub-directories in the given path.
- check(self: pycolmap.Reconstruction) None
Check if current reconstruction is well formed.
- summary(self: pycolmap.Reconstruction) str
- class pycolmap.ReconstructionManager(self: pycolmap.ReconstructionManager)
- size(self: pycolmap.ReconstructionManager) int
- get(self: pycolmap.ReconstructionManager, idx: int) pycolmap.Reconstruction
- add(self: pycolmap.ReconstructionManager) int
- delete(self: pycolmap.ReconstructionManager, idx: int) None
- clear(self: pycolmap.ReconstructionManager) None
- read(self: pycolmap.ReconstructionManager, path: str) int
- write(self: pycolmap.ReconstructionManager, path: str) None
- class pycolmap.TwoViewGeometryConfiguration(*args, **kwargs)
Members:
UNDEFINED
DEGENERATE
CALIBRATED
UNCALIBRATED
PLANAR
PANORAMIC
PLANAR_OR_PANORAMIC
WATERMARK
MULTIPLE
Overloaded function.
__init__(self: pycolmap.TwoViewGeometryConfiguration, value: int) → None
__init__(self: pycolmap.TwoViewGeometryConfiguration, name: str) → None
- property name
- property value
- UNDEFINED = TwoViewGeometryConfiguration.UNDEFINED
- DEGENERATE = TwoViewGeometryConfiguration.DEGENERATE
- CALIBRATED = TwoViewGeometryConfiguration.CALIBRATED
- UNCALIBRATED = TwoViewGeometryConfiguration.UNCALIBRATED
- PLANAR = TwoViewGeometryConfiguration.PLANAR
- PANORAMIC = TwoViewGeometryConfiguration.PANORAMIC
- PLANAR_OR_PANORAMIC = TwoViewGeometryConfiguration.PLANAR_OR_PANORAMIC
- WATERMARK = TwoViewGeometryConfiguration.WATERMARK
- MULTIPLE = TwoViewGeometryConfiguration.MULTIPLE
- class pycolmap.TwoViewGeometry(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.TwoViewGeometry) → None
__init__(self: pycolmap.TwoViewGeometry, kwargs: dict) → None
__init__(self: pycolmap.TwoViewGeometry, **kwargs) → None
- property config
(int, default: 0)
- property E
(ndarray, default: [[0. 0. 0.] [0. 0. 0.] [0. 0. 0.]])
- property F
(ndarray, default: [[0. 0. 0.] [0. 0. 0.] [0. 0. 0.]])
- property H
(ndarray, default: [[0. 0. 0.] [0. 0. 0.] [0. 0. 0.]])
- property cam2_from_cam1
(Rigid3d, default: Rigid3d(rotation_xyzw=[0, 0, 0, 1], translation=[0, 0, 0]))
- property inlier_matches
(ndarray, default: [])
- property tri_angle
(float, default: -1.0)
- invert(self: pycolmap.TwoViewGeometry) None
- summary(self: pycolmap.TwoViewGeometry, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.TwoViewGeometry, recursive: bool = True) dict
- class pycolmap.Database(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.Database) → None
__init__(self: pycolmap.Database, path: str) → None
- open(self: pycolmap.Database, path: str) None
- close(self: pycolmap.Database) None
- exists_camera(self: pycolmap.Database, camera_id: int) bool
- exists_image(*args, **kwargs)
Overloaded function.
exists_image(self: pycolmap.Database, image_id: int) → bool
exists_image(self: pycolmap.Database, name: str) → bool
- exists_pose_prior(self: pycolmap.Database, image_id: int) bool
- exists_keypoints(self: pycolmap.Database, image_id: int) bool
- exists_descriptors(self: pycolmap.Database, image_id: int) bool
- exists_matches(self: pycolmap.Database, image_id1: int, image_id2: int) bool
- exists_inlier_matches(self: pycolmap.Database, image_id1: int, image_id2: int) bool
- property num_cameras
- property num_images
- property num_pose_priors
- property num_keypoints
- num_keypoints_for_image(self: pycolmap.Database, image_id: int) int
- property num_descriptors
- num_descriptors_for_image(self: pycolmap.Database, image_id: int) int
- property num_matches
- property num_inlier_matches
- property num_matched_image_pairs
- property num_verified_image_pairs
- static image_pair_to_pair_id(image_id1: int, image_id2: int) int
- static pair_id_to_image_pair(pair_id: int) tuple[int, int]
- static swap_image_pair(image_id1: int, image_id2: int) bool
- read_camera(self: pycolmap.Database, camera_id: int) pycolmap.Camera
- read_all_cameras(self: pycolmap.Database) list[pycolmap.Camera]
- read_image(*args, **kwargs)
Overloaded function.
read_image(self: pycolmap.Database, image_id: int) → pycolmap.Image
read_image(self: pycolmap.Database, name: str) → pycolmap.Image
- read_all_images(self: pycolmap.Database) list[pycolmap.Image]
- read_pose_prior(self: pycolmap.Database, image_id: int) pycolmap.PosePrior
- read_keypoints(self: pycolmap.Database, image_id: int) numpy.ndarray[numpy.float32[m, n]]
- read_descriptors(self: pycolmap.Database, image_id: int) numpy.ndarray[numpy.uint8[m, n]]
- read_matches(self: pycolmap.Database, image_id1: int, image_id2: int) numpy.ndarray[numpy.uint32[m, 2]]
- read_all_matches(self: pycolmap.Database) tuple[list[int], list[numpy.ndarray[numpy.uint32[m, 2]]]]
- read_two_view_geometry(self: pycolmap.Database, image_id1: int, image_id2: int) pycolmap.TwoViewGeometry
- read_two_view_geometries(self: pycolmap.Database) tuple[list[int], list[pycolmap.TwoViewGeometry]]
- read_two_view_geometry_num_inliers(self: pycolmap.Database) tuple[list[int], list[int]]
- write_camera(self: pycolmap.Database, camera: pycolmap.Camera, use_camera_id: bool = False) int
- write_image(self: pycolmap.Database, image: pycolmap.Image, use_image_id: bool = False) int
- write_pose_prior(self: pycolmap.Database, image_id: int, pose_prior: pycolmap.PosePrior) None
- write_keypoints(self: pycolmap.Database, image_id: int, keypoints: numpy.ndarray[numpy.float32[m, n]]) None
- write_descriptors(
- self: pycolmap.Database,
- image_id: int,
- descriptors: numpy.ndarray[numpy.uint8[m, n]],
- write_matches(
- self: pycolmap.Database,
- image_id1: int,
- image_id2: int,
- matches: numpy.ndarray[numpy.uint32[m, 2]],
- write_two_view_geometry(
- self: pycolmap.Database,
- image_id1: int,
- image_id2: int,
- two_view_geometry: pycolmap.TwoViewGeometry,
- update_camera(self: pycolmap.Database, camera: pycolmap.Camera) None
- update_image(self: pycolmap.Database, image: pycolmap.Image) None
- delete_matches(self: pycolmap.Database, image_id1: int, image_id2: int) None
- delete_inlier_matches(self: pycolmap.Database, image_id1: int, image_id2: int) None
- clear_all_tables(self: pycolmap.Database) None
- clear_cameras(self: pycolmap.Database) None
- clear_images(self: pycolmap.Database) None
- clear_pose_priors(self: pycolmap.Database) None
- clear_descriptors(self: pycolmap.Database) None
- clear_keypoints(self: pycolmap.Database) None
- clear_matches(self: pycolmap.Database) None
- clear_two_view_geometries(self: pycolmap.Database) None
- static merge(database1: pycolmap.Database, database2: pycolmap.Database, merged_database: pycolmap.Database) None
- class pycolmap.DatabaseTransaction(self: pycolmap.DatabaseTransaction, database: pycolmap.Database)
- class pycolmap.DatabaseCache(self: pycolmap.DatabaseCache)
- static create(
- database: pycolmap.Database,
- min_num_matches: int,
- ignore_watermarks: bool,
- image_names: set[str],
- num_cameras(self: pycolmap.DatabaseCache) int
- num_images(self: pycolmap.DatabaseCache) int
- exists_camera(self: pycolmap.DatabaseCache, camera_id: int) bool
- exists_image(self: pycolmap.DatabaseCache, image_id: int) bool
- property cameras
- property images
- property correspondence_graph
- find_image_with_name(self: pycolmap.DatabaseCache, name: str) pycolmap.Image
- class pycolmap.SyntheticDatasetMatchConfig(*args, **kwargs)
Members:
EXHAUSTIVE
CHAINED
Overloaded function.
__init__(self: pycolmap.SyntheticDatasetMatchConfig, value: int) → None
__init__(self: pycolmap.SyntheticDatasetMatchConfig, name: str) → None
- property name
- property value
- EXHAUSTIVE = SyntheticDatasetMatchConfig.EXHAUSTIVE
- CHAINED = SyntheticDatasetMatchConfig.CHAINED
- class pycolmap.SyntheticDatasetOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.SyntheticDatasetOptions) → None
__init__(self: pycolmap.SyntheticDatasetOptions, kwargs: dict) → None
__init__(self: pycolmap.SyntheticDatasetOptions, **kwargs) → None
- property num_cameras
(int, default: 2)
- property num_images
(int, default: 10)
- property num_points3D
(int, default: 100)
- property camera_width
(int, default: 1024)
- property camera_height
(int, default: 768)
- property camera_model_id
(CameraModelId, default: CameraModelId.SIMPLE_RADIAL)
- property camera_params
(list, default: [1280.0, 512.0, 384.0, 0.05])
- property num_points2D_without_point3D
(int, default: 10)
- property point2D_stddev
(float, default: 0.0)
- property match_config
(SyntheticDatasetMatchConfig, default: SyntheticDatasetMatchConfig.EXHAUSTIVE)
- property use_prior_position
(bool, default: False)
- property use_geographic_coords_prior
(bool, default: False)
- property prior_position_stddev
(float, default: 1.5)
- summary(self: pycolmap.SyntheticDatasetOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.SyntheticDatasetOptions, recursive: bool = True) dict
- pycolmap.synthesize_dataset(
- options: pycolmap.SyntheticDatasetOptions,
- database: pycolmap.Database = None,
- class pycolmap.AbsolutePoseEstimationOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.AbsolutePoseEstimationOptions) → None
__init__(self: pycolmap.AbsolutePoseEstimationOptions, kwargs: dict) → None
__init__(self: pycolmap.AbsolutePoseEstimationOptions, **kwargs) → None
- property estimate_focal_length
(bool, default: False)
- property ransac
(RANSACOptions, default: RANSACOptions(max_error=12.0, min_inlier_ratio=0.1, confidence=0.99999, dyn_num_trials_multiplier=3.0, min_num_trials=100, max_num_trials=10000))
- summary(self: pycolmap.AbsolutePoseEstimationOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.AbsolutePoseEstimationOptions, recursive: bool = True) dict
- class pycolmap.AbsolutePoseRefinementOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.AbsolutePoseRefinementOptions) → None
__init__(self: pycolmap.AbsolutePoseRefinementOptions, kwargs: dict) → None
__init__(self: pycolmap.AbsolutePoseRefinementOptions, **kwargs) → None
- property gradient_tolerance
(float, default: 1.0)
- property max_num_iterations
(int, default: 100)
- property loss_function_scale
(float, default: 1.0)
- property refine_focal_length
(bool, default: False)
- property refine_extra_params
(bool, default: False)
- property print_summary
(bool, default: False)
- summary(self: pycolmap.AbsolutePoseRefinementOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.AbsolutePoseRefinementOptions, recursive: bool = True) dict
- pycolmap.estimate_absolute_pose(
- points2D: numpy.ndarray[numpy.float64[m, 2]],
- points3D: numpy.ndarray[numpy.float64[m, 3]],
- camera: pycolmap.Camera,
- estimation_options: pycolmap.AbsolutePoseEstimationOptions = AbsolutePoseEstimationOptions(),
Robustly estimate absolute pose using LO-RANSAC without non-linear refinement.
- pycolmap.refine_absolute_pose(
- cam_from_world: pycolmap.Rigid3d,
- points2D: numpy.ndarray[numpy.float64[m, 2]],
- points3D: numpy.ndarray[numpy.float64[m, 3]],
- inlier_mask: numpy.ndarray[bool[m, 1]],
- camera: pycolmap.Camera,
- refinement_options: pycolmap.AbsolutePoseRefinementOptions = AbsolutePoseRefinementOptions(),
- return_covariance: bool = False,
Non-linear refinement of absolute pose.
- pycolmap.estimate_and_refine_absolute_pose(
- points2D: numpy.ndarray[numpy.float64[m, 2]],
- points3D: numpy.ndarray[numpy.float64[m, 3]],
- camera: pycolmap.Camera,
- estimation_options: pycolmap.AbsolutePoseEstimationOptions = AbsolutePoseEstimationOptions(),
- refinement_options: pycolmap.AbsolutePoseRefinementOptions = AbsolutePoseRefinementOptions(),
- return_covariance: bool = False,
Robust absolute pose estimation with LO-RANSAC followed by non-linear refinement.
- pycolmap.absolute_pose_estimation(*args, **kwargs) object
Deprecated, use
estimate_and_refine_absolute_pose
instead.
- class pycolmap.ImageAlignmentError(self: pycolmap.ImageAlignmentError)
- property image_name
- property rotation_error_deg
- property proj_center_error
- pycolmap.align_reconstructions_via_reprojections(
- src_reconstruction: pycolmap.Reconstruction,
- tgt_reconstruction: pycolmap.Reconstruction,
- min_inlier_observations: float = 0.3,
- max_reproj_error: float = 8.0,
- pycolmap.align_reconstructions_via_proj_centers(
- src_reconstruction: pycolmap.Reconstruction,
- tgt_reconstruction: pycolmap.Reconstruction,
- max_proj_center_error: float,
- pycolmap.align_reconstructions_via_points(
- src_reconstruction: pycolmap.Reconstruction,
- tgt_reconstruction: pycolmap.Reconstruction,
- min_common_observations: int = 3,
- max_error: float = 0.005,
- min_inlier_ratio: float = 0.9,
- pycolmap.align_reconstruction_to_locations(
- src: pycolmap.Reconstruction,
- tgt_image_names: list[str],
- tgt_locations: numpy.ndarray[numpy.float64[m, 3]],
- min_common_images: int,
- ransac_options: pycolmap.RANSACOptions,
- pycolmap.compare_reconstructions(
- reconstruction1: pycolmap.Reconstruction,
- reconstruction2: pycolmap.Reconstruction,
- alignment_error: str = 'reprojection',
- min_inlier_observations: float = 0.3,
- max_reproj_error: float = 8.0,
- max_proj_center_error: float = 0.1,
- class pycolmap.BundleAdjustmentConfig(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.BundleAdjustmentConfig) → None
__init__(self: pycolmap.BundleAdjustmentConfig, kwargs: dict) → None
__init__(self: pycolmap.BundleAdjustmentConfig, **kwargs) → None
- num_images(self: pycolmap.BundleAdjustmentConfig) int
- num_points(self: pycolmap.BundleAdjustmentConfig) int
- num_constant_cam_intrinsics(self: pycolmap.BundleAdjustmentConfig) int
- num_constant_cam_poses(self: pycolmap.BundleAdjustmentConfig) int
- num_constant_cam_positions(self: pycolmap.BundleAdjustmentConfig) int
- num_variable_points(self: pycolmap.BundleAdjustmentConfig) int
- num_constant_points(self: pycolmap.BundleAdjustmentConfig) int
- num_residuals(
- self: pycolmap.BundleAdjustmentConfig,
- reconstruction: pycolmap.Reconstruction,
- add_image(self: pycolmap.BundleAdjustmentConfig, image_id: int) None
- has_image(self: pycolmap.BundleAdjustmentConfig, image_id: int) bool
- remove_image(self: pycolmap.BundleAdjustmentConfig, image_id: int) None
- set_constant_cam_intrinsics(self: pycolmap.BundleAdjustmentConfig, camera_id: int) None
- set_variable_cam_intrinsics(self: pycolmap.BundleAdjustmentConfig, camera_id: int) None
- has_constant_cam_intrinsics(self: pycolmap.BundleAdjustmentConfig, camera_id: int) bool
- set_constant_cam_pose(self: pycolmap.BundleAdjustmentConfig, image_id: int) None
- set_variable_cam_pose(self: pycolmap.BundleAdjustmentConfig, image_id: int) None
- has_constant_cam_pose(self: pycolmap.BundleAdjustmentConfig, image_id: int) bool
- set_constant_cam_positions(
- self: pycolmap.BundleAdjustmentConfig,
- image_id: int,
- idxs: list[int],
- remove_variable_cam_positions(self: pycolmap.BundleAdjustmentConfig, image_id: int) None
- has_constant_cam_positions(self: pycolmap.BundleAdjustmentConfig, image_id: int) bool
- add_variable_point(self: pycolmap.BundleAdjustmentConfig, point3D_id: int) None
- add_constant_point(self: pycolmap.BundleAdjustmentConfig, point3D_id: int) None
- has_point(self: pycolmap.BundleAdjustmentConfig, point3D_id: int) bool
- has_variable_point(self: pycolmap.BundleAdjustmentConfig, point3D_id: int) bool
- has_constant_point(self: pycolmap.BundleAdjustmentConfig, point3D_id: int) bool
- remove_variable_point(self: pycolmap.BundleAdjustmentConfig, point3D_id: int) None
- remove_constant_point(self: pycolmap.BundleAdjustmentConfig, point3D_id: int) None
- property constant_intrinsics
(set, default: set())
- property image_ids
(set, default: set())
- property variable_point3D_ids
(set, default: set())
- property constant_point3D_ids
(set, default: set())
- property constant_cam_poses
(set, default: set())
- constant_cam_positions(self: pycolmap.BundleAdjustmentConfig, image_id: int) list[int]
- summary(self: pycolmap.BundleAdjustmentConfig, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.BundleAdjustmentConfig, recursive: bool = True) dict
- class pycolmap.LossFunctionType(*args, **kwargs)
Members:
TRIVIAL
SOFT_L1
CAUCHY
Overloaded function.
__init__(self: pycolmap.LossFunctionType, value: int) → None
__init__(self: pycolmap.LossFunctionType, name: str) → None
- property name
- property value
- TRIVIAL = LossFunctionType.TRIVIAL
- SOFT_L1 = LossFunctionType.SOFT_L1
- CAUCHY = LossFunctionType.CAUCHY
- class pycolmap.BundleAdjustmentOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.BundleAdjustmentOptions) → None
__init__(self: pycolmap.BundleAdjustmentOptions, kwargs: dict) → None
__init__(self: pycolmap.BundleAdjustmentOptions, **kwargs) → None
- create_loss_function(self: pycolmap.BundleAdjustmentOptions) pyceres.LossFunction
- create_solver_options(
- self: pycolmap.BundleAdjustmentOptions,
- config: pycolmap.BundleAdjustmentConfig,
- problem: pyceres.Problem,
- property loss_function_type
Loss function types: Trivial (non-robust) and Cauchy (robust) loss. (LossFunctionType, default: LossFunctionType.TRIVIAL)
- property loss_function_scale
Scaling factor determines residual at which robustification takes place. (float, default: 1.0)
- property refine_focal_length
Whether to refine the focal length parameter group. (bool, default: True)
- property refine_principal_point
Whether to refine the principal point parameter group. (bool, default: False)
- property refine_extra_params
Whether to refine the extra parameter group. (bool, default: True)
- property refine_extrinsics
Whether to refine the extrinsic parameter group. (bool, default: True)
- property print_summary
Whether to print a final summary. (bool, default: True)
- property use_gpu
Whether to use Ceres’ CUDA linear algebra library, if available. (bool, default: False)
- property gpu_index
Which GPU to use for solving the problem. (str, default: -1)
- property min_num_residuals_for_cpu_multi_threading
Minimum number of residuals to enable multi-threading. Note that single-threaded is typically better for small bundle adjustment problems due to the overhead of threading. (int, default: 50000)
- property min_num_images_gpu_solver
Minimum number of images to use the GPU solver. (int, default: 50)
- property max_num_images_direct_dense_cpu_solver
Threshold to switch between direct, sparse, and iterative solvers. (int, default: 50)
- property max_num_images_direct_sparse_cpu_solver
Threshold to switch between direct, sparse, and iterative solvers. (int, default: 1000)
- property max_num_images_direct_dense_gpu_solver
Threshold to switch between direct, sparse, and iterative solvers. (int, default: 200)
- property max_num_images_direct_sparse_gpu_solver
Threshold to switch between direct, sparse, and iterative solvers. (int, default: 4000)
- property solver_options
Options for the Ceres solver. Using this member requires having PyCeres installed. (SolverOptions, default: <pyceres.SolverOptions object at 0x757b559d6fb0>)
- summary(self: pycolmap.BundleAdjustmentOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.BundleAdjustmentOptions, recursive: bool = True) dict
- class pycolmap.PosePriorBundleAdjustmentOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.PosePriorBundleAdjustmentOptions) → None
__init__(self: pycolmap.PosePriorBundleAdjustmentOptions, kwargs: dict) → None
__init__(self: pycolmap.PosePriorBundleAdjustmentOptions, **kwargs) → None
- property use_robust_loss_on_prior_position
Whether to use a robust loss on prior locations. (bool, default: False)
- property prior_position_loss_scale
Threshold on the residual for the robust loss (chi2 for 3DOF at 95% = 7.815). (float, default: 7.815)
- property ransac_max_error
Maximum RANSAC error for Sim3 alignment. (float, default: 0.0)
- summary(
- self: pycolmap.PosePriorBundleAdjustmentOptions,
- write_type: bool = False,
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.PosePriorBundleAdjustmentOptions, recursive: bool = True) dict
- class pycolmap.BundleAdjuster(
- self: pycolmap.BundleAdjuster,
- options: pycolmap.BundleAdjustmentOptions,
- config: pycolmap.BundleAdjustmentConfig,
- solve(self: pycolmap.BundleAdjuster) pyceres.SolverSummary
- property problem
- property options
- property config
- pycolmap.create_default_bundle_adjuster(
- options: pycolmap.BundleAdjustmentOptions,
- config: pycolmap.BundleAdjustmentConfig,
- reconstruction: pycolmap.Reconstruction,
- pycolmap.create_pose_prior_bundle_adjuster(
- options: pycolmap.BundleAdjustmentOptions,
- prior_options: pycolmap.PosePriorBundleAdjustmentOptions,
- config: pycolmap.BundleAdjustmentConfig,
- pose_priors: dict[int, pycolmap.PosePrior],
- reconstruction: pycolmap.Reconstruction,
- class pycolmap.BACovarianceOptionsParams(*args, **kwargs)
Members:
POSES
POINTS
POSES_AND_POINTS
ALL
Overloaded function.
__init__(self: pycolmap.BACovarianceOptionsParams, value: int) → None
__init__(self: pycolmap.BACovarianceOptionsParams, name: str) → None
- property name
- property value
- POSES = BACovarianceOptionsParams.POSES
- POINTS = BACovarianceOptionsParams.POINTS
- POSES_AND_POINTS = BACovarianceOptionsParams.POSES_AND_POINTS
- ALL = BACovarianceOptionsParams.ALL
- class pycolmap.ExperimentalPoseParam(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.ExperimentalPoseParam) → None
__init__(self: pycolmap.ExperimentalPoseParam, kwargs: dict) → None
__init__(self: pycolmap.ExperimentalPoseParam, **kwargs) → None
- property image_id
(int, default: 4294967295)
- property qvec
(NoneType, default: None)
- property tvec
(NoneType, default: None)
- summary(self: pycolmap.ExperimentalPoseParam, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.ExperimentalPoseParam, recursive: bool = True) dict
- class pycolmap.BACovarianceOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.BACovarianceOptions) → None
__init__(self: pycolmap.BACovarianceOptions, kwargs: dict) → None
__init__(self: pycolmap.BACovarianceOptions, **kwargs) → None
- property params
For which parameters to compute the covariance. (BACovarianceOptionsParams, default: BACovarianceOptionsParams.ALL)
- property damping
Damping factor for the Hessian in the Schur complement solver. Enables to robustly deal with poorly conditioned parameters. (float, default: 1e-08)
- property experimental_custom_poses
WARNING: This option will be removed in a future release, use at your own risk. For custom bundle adjustment problems, this enables to specify a custom set of pose parameter blocks to consider. Note that these pose blocks must not necessarily be part of the reconstruction but they must follow the standard requirement for applying the Schur complement trick. (list, default: [])
- summary(self: pycolmap.BACovarianceOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.BACovarianceOptions, recursive: bool = True) dict
- class pycolmap.BACovariance
- get_point_cov(self: pycolmap.BACovariance, image_id: int) numpy.ndarray[numpy.float64[m, n]] | None
Covariance for 3D points, conditioned on all other variables set constant. If some dimensions are kept constant, the respective rows/columns are omitted. Returns null if 3D point not a variable in the problem.
- get_cam_from_world_cov(
- self: pycolmap.BACovariance,
- image_id: int,
Tangent space covariance in the order [rotation, translation]. If some dimensions are kept constant, the respective rows/columns are omitted. Returns null if image not a variable in the problem.
- get_cam1_from_cam2_cov(
- self: pycolmap.BACovariance,
- image_id1: int,
- image_id2: int,
Tangent space covariance in the order [rotation, translation]. If some dimensions are kept constant, the respective rows/columns are omitted. Returns null if image not a variable in the problem.
- get_other_params_cov(
- self: pycolmap.BACovariance,
- param: float,
Tangent space covariance for any variable parameter block in the problem. If some dimensions are kept constant, the respective rows/columns are omitted. Returns null if parameter block not a variable in the problem.
- pycolmap.estimate_ba_covariance(
- options: pycolmap.BACovarianceOptions,
- reconstruction: pycolmap.Reconstruction,
- bundle_adjuster: pycolmap.BundleAdjuster,
Computes covariances for the parameters in a bundle adjustment problem. It is important that the problem has a structure suitable for solving using the Schur complement trick. This is the case for the standard configuration of bundle adjustment problems, but be careful if you modify the underlying problem with custom residuals. Returns null if the estimation was not successful.
- pycolmap.estimate_essential_matrix(
- points2D1: numpy.ndarray[numpy.float64[m, 2]],
- points2D2: numpy.ndarray[numpy.float64[m, 2]],
- camera1: pycolmap.Camera,
- camera2: pycolmap.Camera,
- estimation_options: pycolmap.RANSACOptions = RANSACOptions(),
Robustly estimate essential matrix with LO-RANSAC and decompose it using the cheirality check.
- pycolmap.essential_matrix_estimation(*args, **kwargs) object
Deprecated, use
estimate_essential_matrix
instead.
- pycolmap.estimate_fundamental_matrix(
- points2D1: numpy.ndarray[numpy.float64[m, 2]],
- points2D2: numpy.ndarray[numpy.float64[m, 2]],
- estimation_options: pycolmap.RANSACOptions = RANSACOptions(),
Robustly estimate fundamental matrix with LO-RANSAC.
- pycolmap.fundamental_matrix_estimation(*args, **kwargs) object
Deprecated, use
estimate_fundamental_matrix
instead.
- pycolmap.estimate_and_refine_generalized_absolute_pose(
- points2D: numpy.ndarray[numpy.float64[m, 2]],
- points3D: numpy.ndarray[numpy.float64[m, 3]],
- camera_idxs: list[int],
- cams_from_rig: list[pycolmap.Rigid3d],
- cameras: list[pycolmap.Camera],
- estimation_options: pycolmap.RANSACOptions = AbsolutePoseEstimationOptions().ransac,
- refinement_options: pycolmap.AbsolutePoseRefinementOptions = AbsolutePoseRefinementOptions(),
- return_covariance: bool = False,
Robustly estimate generalized absolute pose using LO-RANSACfollowed by non-linear refinement.
- pycolmap.rig_absolute_pose_estimation(*args, **kwargs) object
Deprecated, use
estimate_and_refine_generalized_absolute_pose
instead.
- pycolmap.estimate_homography_matrix(
- points2D1: numpy.ndarray[numpy.float64[m, 2]],
- points2D2: numpy.ndarray[numpy.float64[m, 2]],
- estimation_options: pycolmap.RANSACOptions = RANSACOptions(),
Robustly estimate homography matrix using LO-RANSAC.
- pycolmap.homography_matrix_estimation(*args, **kwargs) object
Deprecated, use
estimate_homography_matrix
instead.
- pycolmap.estimate_sim3d(
- src: numpy.ndarray[numpy.float64[m, 3]],
- tgt: numpy.ndarray[numpy.float64[m, 3]],
Estimate the 3D similarity transform tgt_from_src.
- pycolmap.estimate_sim3d_robust(
- src: numpy.ndarray[numpy.float64[m, 3]],
- tgt: numpy.ndarray[numpy.float64[m, 3]],
- estimation_options: pycolmap.RANSACOptions = RANSACOptions(),
Robustly estimate the 3D similarity transform tgt_from_src using LO-RANSAC.
- class pycolmap.TriangulationResidualType(*args, **kwargs)
Members:
ANGULAR_ERROR
REPROJECTION_ERROR
Overloaded function.
__init__(self: pycolmap.TriangulationResidualType, value: int) → None
__init__(self: pycolmap.TriangulationResidualType, name: str) → None
- property name
- property value
- ANGULAR_ERROR = TriangulationResidualType.ANGULAR_ERROR
- REPROJECTION_ERROR = TriangulationResidualType.REPROJECTION_ERROR
- class pycolmap.EstimateTriangulationOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.EstimateTriangulationOptions) → None
__init__(self: pycolmap.EstimateTriangulationOptions, kwargs: dict) → None
__init__(self: pycolmap.EstimateTriangulationOptions, **kwargs) → None
- property min_tri_angle
Minimum triangulation angle in radians. (float, default: 0.0)
- property residual_type
Employed residual type. (TriangulationResidualType, default: TriangulationResidualType.ANGULAR_ERROR)
- property ransac
RANSAC options. (RANSACOptions, default: RANSACOptions(max_error=0.03490658503988659, min_inlier_ratio=0.02, confidence=0.9999, dyn_num_trials_multiplier=3.0, min_num_trials=0, max_num_trials=10000))
- summary(self: pycolmap.EstimateTriangulationOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.EstimateTriangulationOptions, recursive: bool = True) dict
- pycolmap.estimate_triangulation(
- points: numpy.ndarray[numpy.float64[m, 2]],
- cams_from_world: list[pycolmap.Rigid3d],
- cameras: list[pycolmap.Camera],
- options: pycolmap.EstimateTriangulationOptions = EstimateTriangulationOptions(),
Robustly estimate 3D point from observations in multiple views using LO-RANSAC
- class pycolmap.TwoViewGeometryOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.TwoViewGeometryOptions) → None
__init__(self: pycolmap.TwoViewGeometryOptions, kwargs: dict) → None
__init__(self: pycolmap.TwoViewGeometryOptions, **kwargs) → None
- property min_num_inliers
(int, default: 15)
- property min_E_F_inlier_ratio
(float, default: 0.95)
- property max_H_inlier_ratio
(float, default: 0.8)
- property watermark_min_inlier_ratio
(float, default: 0.7)
- property watermark_border_size
(float, default: 0.1)
- property detect_watermark
(bool, default: True)
- property multiple_ignore_watermark
(bool, default: True)
- property force_H_use
(bool, default: False)
- property compute_relative_pose
(bool, default: False)
- property multiple_models
(bool, default: False)
- property ransac
(RANSACOptions, default: RANSACOptions(max_error=4.0, min_inlier_ratio=0.25, confidence=0.999, dyn_num_trials_multiplier=3.0, min_num_trials=100, max_num_trials=10000))
- summary(self: pycolmap.TwoViewGeometryOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.TwoViewGeometryOptions, recursive: bool = True) dict
- pycolmap.estimate_calibrated_two_view_geometry(
- camera1: pycolmap.Camera,
- points1: numpy.ndarray[numpy.float64[m, 2]],
- camera2: pycolmap.Camera,
- points2: numpy.ndarray[numpy.float64[m, 2]],
- matches: numpy.ndarray[numpy.uint32[m, 2]] = None,
- options: pycolmap.TwoViewGeometryOptions = TwoViewGeometryOptions(),
- pycolmap.estimate_two_view_geometry(
- camera1: pycolmap.Camera,
- points1: numpy.ndarray[numpy.float64[m, 2]],
- camera2: pycolmap.Camera,
- points2: numpy.ndarray[numpy.float64[m, 2]],
- matches: numpy.ndarray[numpy.uint32[m, 2]] = None,
- options: pycolmap.TwoViewGeometryOptions = TwoViewGeometryOptions(),
- pycolmap.estimate_two_view_geometry_pose(
- camera1: pycolmap.Camera,
- points1: numpy.ndarray[numpy.float64[m, 2]],
- camera2: pycolmap.Camera,
- points2: numpy.ndarray[numpy.float64[m, 2]],
- geometry: pycolmap.TwoViewGeometry,
- pycolmap.compute_squared_sampson_error(
- points2D1: numpy.ndarray[numpy.float64[m, 2]],
- points2D2: numpy.ndarray[numpy.float64[m, 2]],
- E: numpy.ndarray[numpy.float64[3, 3]],
Calculate the squared Sampson error for a given essential or fundamental matrix.
- pycolmap.squared_sampson_error(*args, **kwargs) object
Deprecated, use
compute_squared_sampson_error
instead.
- class pycolmap.ImagePairStat(self: pycolmap.ImagePairStat)
- property num_tri_corrs
- property num_total_corrs
- class pycolmap.ObservationManager(
- self: pycolmap.ObservationManager,
- reconstruction: pycolmap.Reconstruction,
- correspondence_graph: pycolmap.CorrespondenceGraph = None,
- property image_pairs
- add_point3D(
- self: pycolmap.ObservationManager,
- xyz: numpy.ndarray[numpy.float64[3, 1]],
- track: pycolmap.Track,
- color: numpy.ndarray[numpy.uint8[3, 1]] = array([0, 0, 0], dtype=uint8),
Add new 3D object, and return its unique ID.
- add_observation(
- self: pycolmap.ObservationManager,
- point3D_id: int,
- track_element: pycolmap.TrackElement,
Add observation to existing 3D point.
- delete_point3D(self: pycolmap.ObservationManager, point3D_id: int) None
Delete a 3D point, and all its references in the observed images.
- delete_observation(self: pycolmap.ObservationManager, image_id: int, point2D_idx: int) None
Delete one observation from an image and the corresponding 3D point. Note that this deletes the entire 3D point, if the track has two elements prior to calling this method.
- merge_points3D(self: pycolmap.ObservationManager, point3D_id1: int, point3D_id2: int) int
Merge two 3D points and return new identifier of new 3D point.The location of the merged 3D point is a weighted average of the two original 3D point’s locations according to their track lengths.
- filter_points3D(
- self: pycolmap.ObservationManager,
- max_reproj_error: float,
- min_tri_angle: float,
- point3D_ids: set[int],
Filter 3D points with large reprojection error, negative depth, orinsufficient triangulation angle. Return the number of filtered observations.
- filter_points3D_in_images(
- self: pycolmap.ObservationManager,
- max_reproj_error: float,
- min_tri_angle: float,
- image_ids: set[int],
Filter 3D points with large reprojection error, negative depth, orinsufficient triangulation angle. Return the number of filtered observations.
- filter_all_points3D(
- self: pycolmap.ObservationManager,
- max_reproj_error: float,
- min_tri_angle: float,
Filter 3D points with large reprojection error, negative depth, orinsufficient triangulation angle. Return the number of filtered observations.
- filter_observations_with_negative_depth(self: pycolmap.ObservationManager) int
Filter observations that have negative depth. Return the number of filtered observations.
- filter_images(
- self: pycolmap.ObservationManager,
- min_focal_length_ratio: float,
- max_focal_length_ratio: float,
- max_extra_param: float,
Filter images without observations or bogus camera parameters.Return the identifiers of the filtered images.
- deregister_image(self: pycolmap.ObservationManager, image_id: int) None
De-register an existing image, and all its references.
- num_observations(self: pycolmap.ObservationManager, image_id: int) int
Number of observations, i.e. the number of image points thathave at least one correspondence to another image.
- num_correspondences(self: pycolmap.ObservationManager, image_id: int) int
Number of correspondences for all image points.
- num_visible_points3D(self: pycolmap.ObservationManager, image_id: int) int
Get the number of observations that see a triangulated point, i.e. the number of image points that have at least one correspondence toa triangulated point in another image.
- point3D_visibility_score(self: pycolmap.ObservationManager, image_id: int) int
Get the score of triangulated observations. In contrast to`NumVisiblePoints3D`, this score also captures the distributionof triangulated observations in the image. This is useful to select the next best image in incremental reconstruction, because amore uniform distribution of observations results in more robust registration.
- increment_correspondence_has_point3D(
- self: pycolmap.ObservationManager,
- image_id: int,
- point2D_idx: int,
Indicate that another image has a point that is triangulated and has a correspondence to this image point.
- decrement_correspondence_has_point3D(
- self: pycolmap.ObservationManager,
- image_id: int,
- point2D_idx: int,
Indicate that another image has a point that is not triangulated any more and has a correspondence to this image point. This assumesthat IncrementCorrespondenceHasPoint3D was called for the sameimage point and correspondence before.
- class pycolmap.IncrementalTriangulatorOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.IncrementalTriangulatorOptions) → None
__init__(self: pycolmap.IncrementalTriangulatorOptions, kwargs: dict) → None
__init__(self: pycolmap.IncrementalTriangulatorOptions, **kwargs) → None
- property max_transitivity
Maximum transitivity to search for correspondences. (int, default: 1)
- property create_max_angle_error
Maximum angular error to create new triangulations. (float, default: 2.0)
- property continue_max_angle_error
Maximum angular error to continue existing triangulations. (float, default: 2.0)
- property merge_max_reproj_error
Maximum reprojection error in pixels to merge triangulations. (float, default: 4.0)
- property complete_max_reproj_error
Maximum reprojection error to complete an existing triangulation. (float, default: 4.0)
- property complete_max_transitivity
Maximum transitivity for track completion. (int, default: 5)
- property re_max_angle_error
Maximum angular error to re-triangulate under-reconstructed image pairs. (float, default: 5.0)
- property re_min_ratio
Minimum ratio of common triangulations between an image pair over the number of correspondences between that image pair to be considered as under-reconstructed. (float, default: 0.2)
- property re_max_trials
Maximum number of trials to re-triangulate an image pair. (int, default: 1)
- property min_angle
Minimum pairwise triangulation angle for a stable triangulation. (float, default: 1.5)
- property ignore_two_view_tracks
Whether to ignore two-view tracks. (bool, default: True)
- property min_focal_length_ratio
The threshold used to filter and ignore images with degenerate intrinsics. (float, default: 0.1)
- property max_focal_length_ratio
The threshold used to filter and ignore images with degenerate intrinsics. (float, default: 10.0)
- property max_extra_param
The threshold used to filter and ignore images with degenerate intrinsics. (float, default: 1.0)
- summary(self: pycolmap.IncrementalTriangulatorOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.IncrementalTriangulatorOptions, recursive: bool = True) dict
- class pycolmap.IncrementalTriangulator(
- self: pycolmap.IncrementalTriangulator,
- correspondence_graph: pycolmap.CorrespondenceGraph,
- reconstruction: pycolmap.Reconstruction,
- observation_manager: pycolmap.ObservationManager = None,
- triangulate_image(
- self: pycolmap.IncrementalTriangulator,
- options: pycolmap.IncrementalTriangulatorOptions,
- image_id: int,
- complete_image(
- self: pycolmap.IncrementalTriangulator,
- options: pycolmap.IncrementalTriangulatorOptions,
- image_id: int,
- complete_all_tracks(
- self: pycolmap.IncrementalTriangulator,
- options: pycolmap.IncrementalTriangulatorOptions,
- merge_all_tracks(
- self: pycolmap.IncrementalTriangulator,
- options: pycolmap.IncrementalTriangulatorOptions,
- retriangulate(
- self: pycolmap.IncrementalTriangulator,
- options: pycolmap.IncrementalTriangulatorOptions,
- add_modified_point3D(self: pycolmap.IncrementalTriangulator, point3D_id: int) None
- clear_modified_points3D(self: pycolmap.IncrementalTriangulator) None
- merge_tracks(
- self: pycolmap.IncrementalTriangulator,
- options: pycolmap.IncrementalTriangulatorOptions,
- point3D_ids: set[int],
- complete_tracks(
- self: pycolmap.IncrementalTriangulator,
- options: pycolmap.IncrementalTriangulatorOptions,
- point3D_ids: set[int],
- class pycolmap.ImageSelectionMethod(*args, **kwargs)
Members:
MAX_VISIBLE_POINTS_NUM
MAX_VISIBLE_POINTS_RATIO
MIN_UNCERTAINTY
Overloaded function.
__init__(self: pycolmap.ImageSelectionMethod, value: int) → None
__init__(self: pycolmap.ImageSelectionMethod, name: str) → None
- property name
- property value
- MAX_VISIBLE_POINTS_NUM = ImageSelectionMethod.MAX_VISIBLE_POINTS_NUM
- MAX_VISIBLE_POINTS_RATIO = ImageSelectionMethod.MAX_VISIBLE_POINTS_RATIO
- MIN_UNCERTAINTY = ImageSelectionMethod.MIN_UNCERTAINTY
- class pycolmap.IncrementalMapperOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.IncrementalMapperOptions) → None
__init__(self: pycolmap.IncrementalMapperOptions, kwargs: dict) → None
__init__(self: pycolmap.IncrementalMapperOptions, **kwargs) → None
- property init_min_num_inliers
Minimum number of inliers for initial image pair. (int, default: 100)
- property init_max_error
Maximum error in pixels for two-view geometry estimation for initial image pair. (float, default: 4.0)
- property init_max_forward_motion
Maximum forward motion for initial image pair. (float, default: 0.95)
- property init_min_tri_angle
Minimum triangulation angle for initial image pair. (float, default: 16.0)
- property init_max_reg_trials
Maximum number of trials to use an image for initialization. (int, default: 2)
- property abs_pose_max_error
Maximum reprojection error in absolute pose estimation. (float, default: 12.0)
- property abs_pose_min_num_inliers
Minimum number of inliers in absolute pose estimation. (int, default: 30)
- property abs_pose_min_inlier_ratio
Minimum inlier ratio in absolute pose estimation. (float, default: 0.25)
- property abs_pose_refine_focal_length
Whether to estimate the focal length in absolute pose estimation. (bool, default: True)
- property abs_pose_refine_extra_params
Whether to estimate the extra parameters in absolute pose estimation. (bool, default: True)
- property local_ba_num_images
Number of images to optimize in local bundle adjustment. (int, default: 6)
- property local_ba_min_tri_angle
Minimum triangulation for images to be chosen in local bundle adjustment. (float, default: 6.0)
- property min_focal_length_ratio
The threshold used to filter and ignore images with degenerate intrinsics. (float, default: 0.1)
- property max_focal_length_ratio
The threshold used to filter and ignore images with degenerate intrinsics. (float, default: 10.0)
- property max_extra_param
The threshold used to filter and ignore images with degenerate intrinsics. (float, default: 1.0)
- property filter_max_reproj_error
Maximum reprojection error in pixels for observations. (float, default: 4.0)
- property filter_min_tri_angle
Minimum triangulation angle in degrees for stable 3D points. (float, default: 1.5)
- property max_reg_trials
Maximum number of trials to register an image. (int, default: 3)
- property fix_existing_images
If reconstruction is provided as input, fix the existing image poses. (bool, default: False)
- property num_threads
Number of threads. (int, default: -1)
- property image_selection_method
Method to find and select next best image to register. (ImageSelectionMethod, default: ImageSelectionMethod.MIN_UNCERTAINTY)
- summary(self: pycolmap.IncrementalMapperOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.IncrementalMapperOptions, recursive: bool = True) dict
- class pycolmap.LocalBundleAdjustmentReport(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.LocalBundleAdjustmentReport) → None
__init__(self: pycolmap.LocalBundleAdjustmentReport, kwargs: dict) → None
__init__(self: pycolmap.LocalBundleAdjustmentReport, **kwargs) → None
- property num_merged_observations
(int, default: 0)
- property num_completed_observations
(int, default: 0)
- property num_filtered_observations
(int, default: 0)
- property num_adjusted_observations
(int, default: 0)
- summary(self: pycolmap.LocalBundleAdjustmentReport, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.LocalBundleAdjustmentReport, recursive: bool = True) dict
- class pycolmap.IncrementalMapper(self: pycolmap.IncrementalMapper, database_cache: pycolmap.DatabaseCache)
- begin_reconstruction(
- self: pycolmap.IncrementalMapper,
- reconstruction: pycolmap.Reconstruction,
- end_reconstruction(self: pycolmap.IncrementalMapper, discard: bool) None
- find_initial_image_pair(
- self: pycolmap.IncrementalMapper,
- options: pycolmap.IncrementalMapperOptions,
- image_id1: int,
- image_id2: int,
- estimate_initial_two_view_geometry(
- self: pycolmap.IncrementalMapper,
- options: pycolmap.IncrementalMapperOptions,
- image_id1: int,
- image_id2: int,
- register_initial_image_pair(
- self: pycolmap.IncrementalMapper,
- options: pycolmap.IncrementalMapperOptions,
- two_view_geometry: pycolmap.TwoViewGeometry,
- image_id1: int,
- image_id2: int,
- find_next_images(
- self: pycolmap.IncrementalMapper,
- options: pycolmap.IncrementalMapperOptions,
- register_next_image(
- self: pycolmap.IncrementalMapper,
- options: pycolmap.IncrementalMapperOptions,
- image_id: int,
- triangulate_image(
- self: pycolmap.IncrementalMapper,
- tri_options: pycolmap.IncrementalTriangulatorOptions,
- image_id: int,
- retriangulate(
- self: pycolmap.IncrementalMapper,
- tri_options: pycolmap.IncrementalTriangulatorOptions,
- complete_tracks(
- self: pycolmap.IncrementalMapper,
- tri_options: pycolmap.IncrementalTriangulatorOptions,
- merge_tracks(
- self: pycolmap.IncrementalMapper,
- tri_options: pycolmap.IncrementalTriangulatorOptions,
- complete_and_merge_tracks(
- self: pycolmap.IncrementalMapper,
- tri_options: pycolmap.IncrementalTriangulatorOptions,
- adjust_local_bundle(
- self: pycolmap.IncrementalMapper,
- options: pycolmap.IncrementalMapperOptions,
- ba_options: pycolmap.BundleAdjustmentOptions,
- tri_options: pycolmap.IncrementalTriangulatorOptions,
- image_id: int,
- point3D_ids: set[int],
- iterative_local_refinement(
- self: pycolmap.IncrementalMapper,
- max_num_refinements: int,
- max_refinement_change: float,
- options: pycolmap.IncrementalMapperOptions,
- ba_options: pycolmap.BundleAdjustmentOptions,
- tri_options: pycolmap.IncrementalTriangulatorOptions,
- image_id: int,
- find_local_bundle(
- self: pycolmap.IncrementalMapper,
- options: pycolmap.IncrementalMapperOptions,
- image_id: int,
- adjust_global_bundle(
- self: pycolmap.IncrementalMapper,
- options: pycolmap.IncrementalMapperOptions,
- ba_options: pycolmap.BundleAdjustmentOptions,
- iterative_global_refinement(
- self: pycolmap.IncrementalMapper,
- max_num_refinements: int,
- max_refinement_change: float,
- options: pycolmap.IncrementalMapperOptions,
- ba_options: pycolmap.BundleAdjustmentOptions,
- tri_options: pycolmap.IncrementalTriangulatorOptions,
- normalize_reconstruction: bool = True,
- filter_images(self: pycolmap.IncrementalMapper, options: pycolmap.IncrementalMapperOptions) int
- filter_points(self: pycolmap.IncrementalMapper, options: pycolmap.IncrementalMapperOptions) int
- property reconstruction
- property observation_manager
- property triangulator
- property filtered_images
- property existing_image_ids
- property num_reg_images_per_camera
- num_total_reg_images(self: pycolmap.IncrementalMapper) int
- get_modified_points3D(self: pycolmap.IncrementalMapper) set[int]
- clear_modified_points3D(self: pycolmap.IncrementalMapper) None
- class pycolmap.IncrementalPipelineOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.IncrementalPipelineOptions) → None
__init__(self: pycolmap.IncrementalPipelineOptions, kwargs: dict) → None
__init__(self: pycolmap.IncrementalPipelineOptions, **kwargs) → None
- property min_num_matches
The minimum number of matches for inlier matches to be considered. (int, default: 15)
- property ignore_watermarks
Whether to ignore the inlier matches of watermark image pairs. (bool, default: False)
- property multiple_models
Whether to reconstruct multiple sub-models. (bool, default: True)
- property max_num_models
The number of sub-models to reconstruct. (int, default: 50)
- property max_model_overlap
The maximum number of overlapping images between sub-models. If the current sub-models shares more than this number of images with another model, then the reconstruction is stopped. (int, default: 20)
- property min_model_size
The minimum number of registered images of a sub-model, otherwise the sub-model is discarded. Note that the first sub-model is always kept independent of size. (int, default: 10)
- property init_image_id1
The image identifier of the first image used to initialize the reconstruction. (int, default: -1)
- property init_image_id2
The image identifier of the second image used to initialize the reconstruction. Determined automatically if left unspecified. (int, default: -1)
- property init_num_trials
The number of trials to initialize the reconstruction. (int, default: 200)
- property extract_colors
Whether to extract colors for reconstructed points. (bool, default: True)
- property num_threads
The number of threads to use during reconstruction. (int, default: -1)
- property min_focal_length_ratio
The threshold used to filter and ignore images with degenerate intrinsics. (float, default: 0.1)
- property max_focal_length_ratio
The threshold used to filter and ignore images with degenerate intrinsics. (float, default: 10.0)
- property max_extra_param
The threshold used to filter and ignore images with degenerate intrinsics. (float, default: 1.0)
- property ba_refine_focal_length
Which intrinsic parameters to optimize during the reconstruction. (bool, default: True)
- property ba_refine_principal_point
Which intrinsic parameters to optimize during the reconstruction. (bool, default: False)
- property ba_refine_extra_params
Which intrinsic parameters to optimize during the reconstruction. (bool, default: True)
- property ba_min_num_residuals_for_cpu_multi_threading
The minimum number of residuals per bundle adjustment problem to enable multi-threading solving of the problems. (int, default: 50000)
- property ba_local_num_images
The number of images to optimize in local bundle adjustment. (int, default: 6)
- property ba_local_function_tolerance
Ceres solver function tolerance for local bundle adjustment. (float, default: 0.0)
- property ba_local_max_num_iterations
The maximum number of local bundle adjustment iterations. (int, default: 25)
- property ba_global_images_ratio
The growth rates after which to perform global bundle adjustment. (float, default: 1.1)
- property ba_global_points_ratio
The growth rates after which to perform global bundle adjustment. (float, default: 1.1)
- property ba_global_images_freq
The growth rates after which to perform global bundle adjustment. (int, default: 500)
- property ba_global_points_freq
The growth rates after which to perform global bundle adjustment. (int, default: 250000)
- property ba_global_function_tolerance
Ceres solver function tolerance for global bundle adjustment. (float, default: 0.0)
- property ba_global_max_num_iterations
The maximum number of global bundle adjustment iterations. (int, default: 50)
- property ba_local_max_refinements
The thresholds for iterative bundle adjustment refinements. (int, default: 2)
- property ba_local_max_refinement_change
The thresholds for iterative bundle adjustment refinements. (float, default: 0.001)
- property ba_global_max_refinements
The thresholds for iterative bundle adjustment refinements. (int, default: 5)
- property ba_global_max_refinement_change
The thresholds for iterative bundle adjustment refinements. (float, default: 0.0005)
- property snapshot_path
Path to a folder in which reconstruction snapshots will be saved during incremental reconstruction. (str, default: )
- property snapshot_images_freq
Frequency of registered images according to which reconstruction snapshots will be saved. (int, default: 0)
- property image_names
Which images to reconstruct. If no images are specified, all images will be reconstructed by default. (set, default: set())
- property fix_existing_images
If reconstruction is provided as input, fix the existing image poses. (bool, default: False)
- property mapper
Options of the IncrementalMapper. (IncrementalMapperOptions, default: IncrementalMapperOptions(init_min_num_inliers=100, init_max_error=4.0, init_max_forward_motion=0.95, init_min_tri_angle=16.0, init_max_reg_trials=2, abs_pose_max_error=12.0, abs_pose_min_num_inliers=30, abs_pose_min_inlier_ratio=0.25, abs_pose_refine_focal_length=True, abs_pose_refine_extra_params=True, local_ba_num_images=6, local_ba_min_tri_angle=6.0, min_focal_length_ratio=0.1, max_focal_length_ratio=10.0, max_extra_param=1.0, filter_max_reproj_error=4.0, filter_min_tri_angle=1.5, max_reg_trials=3, fix_existing_images=False, num_threads=-1, image_selection_method=ImageSelectionMethod.MIN_UNCERTAINTY))
- property triangulation
Options of the IncrementalTriangulator. (IncrementalTriangulatorOptions, default: IncrementalTriangulatorOptions(max_transitivity=1, create_max_angle_error=2.0, continue_max_angle_error=2.0, merge_max_reproj_error=4.0, complete_max_reproj_error=4.0, complete_max_transitivity=5, re_max_angle_error=5.0, re_min_ratio=0.2, re_max_trials=1, min_angle=1.5, ignore_two_view_tracks=True, min_focal_length_ratio=0.1, max_focal_length_ratio=10.0, max_extra_param=1.0))
- get_mapper(self: pycolmap.IncrementalPipelineOptions) pycolmap.IncrementalMapperOptions
- get_triangulation( ) pycolmap.IncrementalTriangulatorOptions
- get_local_bundle_adjustment( ) pycolmap.BundleAdjustmentOptions
- get_global_bundle_adjustment( ) pycolmap.BundleAdjustmentOptions
- is_initial_pair_provided(self: pycolmap.IncrementalPipelineOptions) bool
- summary(self: pycolmap.IncrementalPipelineOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.IncrementalPipelineOptions, recursive: bool = True) dict
- class pycolmap.IncrementalMapperCallback(*args, **kwargs)
Members:
INITIAL_IMAGE_PAIR_REG_CALLBACK
NEXT_IMAGE_REG_CALLBACK
LAST_IMAGE_REG_CALLBACK
Overloaded function.
__init__(self: pycolmap.IncrementalMapperCallback, value: int) → None
__init__(self: pycolmap.IncrementalMapperCallback, name: str) → None
- property name
- property value
- INITIAL_IMAGE_PAIR_REG_CALLBACK = IncrementalMapperCallback.INITIAL_IMAGE_PAIR_REG_CALLBACK
- NEXT_IMAGE_REG_CALLBACK = IncrementalMapperCallback.NEXT_IMAGE_REG_CALLBACK
- LAST_IMAGE_REG_CALLBACK = IncrementalMapperCallback.LAST_IMAGE_REG_CALLBACK
- class pycolmap.IncrementalMapperStatus(*args, **kwargs)
Members:
NO_INITIAL_PAIR
BAD_INITIAL_PAIR
SUCCESS
INTERRUPTED
Overloaded function.
__init__(self: pycolmap.IncrementalMapperStatus, value: int) → None
__init__(self: pycolmap.IncrementalMapperStatus, name: str) → None
- property name
- property value
- NO_INITIAL_PAIR = IncrementalMapperStatus.NO_INITIAL_PAIR
- BAD_INITIAL_PAIR = IncrementalMapperStatus.BAD_INITIAL_PAIR
- SUCCESS = IncrementalMapperStatus.SUCCESS
- INTERRUPTED = IncrementalMapperStatus.INTERRUPTED
- class pycolmap.IncrementalPipeline(
- self: pycolmap.IncrementalPipeline,
- options: pycolmap.IncrementalPipelineOptions,
- image_path: str,
- database_path: str,
- reconstruction_manager: pycolmap.ReconstructionManager,
- property options
- property image_path
- property database_path
- property reconstruction_manager
- property database_cache
- add_callback(self: pycolmap.IncrementalPipeline, id: int, func: Callable[[], None]) None
- callback(self: pycolmap.IncrementalPipeline, id: int) None
- load_database(self: pycolmap.IncrementalPipeline) bool
- check_run_global_refinement(
- self: pycolmap.IncrementalPipeline,
- reconstruction: pycolmap.Reconstruction,
- ba_prev_num_reg_images: int,
- ba_prev_num_points: int,
- reconstruct(
- self: pycolmap.IncrementalPipeline,
- mapper_options: pycolmap.IncrementalMapperOptions,
- reconstruct_sub_model(
- self: pycolmap.IncrementalPipeline,
- core_mapper: pycolmap.IncrementalMapper,
- mapper_options: pycolmap.IncrementalMapperOptions,
- reconstruction: pycolmap.Reconstruction,
- initialize_reconstruction(
- self: pycolmap.IncrementalPipeline,
- core_mapper: pycolmap.IncrementalMapper,
- mapper_options: pycolmap.IncrementalMapperOptions,
- reconstruction: pycolmap.Reconstruction,
- run(self: pycolmap.IncrementalPipeline) None
- class pycolmap.Normalization(*args, **kwargs)
Members:
L1_ROOT : L1-normalizes each descriptor followed by element-wise square rooting. This normalization is usually better than standard L2-normalization. See ‘Three things everyone should know to improve object retrieval’, Relja Arandjelovic and Andrew Zisserman, CVPR 2012.
L2 : Each vector is L2-normalized.
Overloaded function.
__init__(self: pycolmap.Normalization, value: int) → None
__init__(self: pycolmap.Normalization, name: str) → None
- property name
- property value
- L1_ROOT = Normalization.L1_ROOT
- L2 = Normalization.L2
- class pycolmap.SiftExtractionOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.SiftExtractionOptions) → None
__init__(self: pycolmap.SiftExtractionOptions, kwargs: dict) → None
__init__(self: pycolmap.SiftExtractionOptions, **kwargs) → None
- property num_threads
Number of threads for feature matching and geometric verification. (int, default: -1)
- property gpu_index
Index of the GPU used for feature matching. For multi-GPU matching, you should separate multiple GPU indices by comma, e.g., ‘0,1,2,3’. (str, default: -1)
- property max_image_size
Maximum image size, otherwise image will be down-scaled. (int, default: 3200)
- property max_num_features
Maximum number of features to detect, keeping larger-scale features. (int, default: 8192)
- property first_octave
First octave in the pyramid, i.e. -1 upsamples the image by one level. (int, default: -1)
- property num_octaves
(int, default: 4)
- property octave_resolution
Number of levels per octave. (int, default: 3)
- property peak_threshold
Peak threshold for detection. (float, default: 0.006666666666666667)
- property edge_threshold
Edge threshold for detection. (float, default: 10.0)
- property estimate_affine_shape
Estimate affine shape of SIFT features in the form of oriented ellipses as opposed to original SIFT which estimates oriented disks. (bool, default: False)
- property max_num_orientations
Maximum number of orientations per keypoint if not estimate_affine_shape. (int, default: 2)
- property upright
Fix the orientation to 0 for upright features (bool, default: False)
- property darkness_adaptivity
Whether to adapt the feature detection depending on the image darkness. only available on GPU. (bool, default: False)
- property domain_size_pooling
“Domain-Size Pooling in Local Descriptors and NetworkArchitectures”, J. Dong and S. Soatto, CVPR 2015 (bool, default: False)
- property dsp_min_scale
(float, default: 0.16666666666666666)
- property dsp_max_scale
(float, default: 3.0)
- property dsp_num_scales
(int, default: 10)
- property normalization
L1_ROOT or L2 descriptor normalization (Normalization, default: Normalization.L1_ROOT)
- summary(self: pycolmap.SiftExtractionOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.SiftExtractionOptions, recursive: bool = True) dict
- class pycolmap.Sift(
- self: pycolmap.Sift,
- options: pycolmap.SiftExtractionOptions | None = None,
- device: pycolmap.Device = Device.auto,
- extract(*args, **kwargs)
Overloaded function.
extract(self: pycolmap.Sift, image: numpy.ndarray[numpy.uint8[m, n], flags.c_contiguous]) → tuple[numpy.ndarray[numpy.float32[m, 4]], numpy.ndarray[numpy.float32[m, n]]]
extract(self: pycolmap.Sift, image: numpy.ndarray[numpy.float32[m, n], flags.c_contiguous]) → tuple[numpy.ndarray[numpy.float32[m, 4]], numpy.ndarray[numpy.float32[m, n]]]
- property options
- property device
- class pycolmap.SiftMatchingOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.SiftMatchingOptions) → None
__init__(self: pycolmap.SiftMatchingOptions, kwargs: dict) → None
__init__(self: pycolmap.SiftMatchingOptions, **kwargs) → None
- property num_threads
(int, default: -1)
- property gpu_index
Index of the GPU used for feature matching. For multi-GPU matching, you should separate multiple GPU indices by comma, e.g., “0,1,2,3”. (str, default: -1)
- property max_ratio
Maximum distance ratio between first and second best match. (float, default: 0.8)
- property max_distance
Maximum distance to best match. (float, default: 0.7)
- property cross_check
Whether to enable cross checking in matching. (bool, default: True)
- property max_num_matches
Maximum number of matches. (int, default: 32768)
- property guided_matching
Whether to perform guided matching, if geometric verification succeeds. (bool, default: False)
- summary(self: pycolmap.SiftMatchingOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.SiftMatchingOptions, recursive: bool = True) dict
- class pycolmap.CameraMode(*args, **kwargs)
Members:
AUTO
SINGLE
PER_FOLDER
PER_IMAGE
Overloaded function.
__init__(self: pycolmap.CameraMode, value: int) → None
__init__(self: pycolmap.CameraMode, name: str) → None
- property name
- property value
- AUTO = CameraMode.AUTO
- SINGLE = CameraMode.SINGLE
- PER_FOLDER = CameraMode.PER_FOLDER
- PER_IMAGE = CameraMode.PER_IMAGE
- class pycolmap.ImageReaderOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.ImageReaderOptions) → None
__init__(self: pycolmap.ImageReaderOptions, kwargs: dict) → None
__init__(self: pycolmap.ImageReaderOptions, **kwargs) → None
- property camera_model
Name of the camera model. (str, default: SIMPLE_RADIAL)
- property mask_path
Optional root path to folder which contains imagemasks. For a given image, the corresponding maskmust have the same sub-path below this root as theimage has below image_path. The filename must beequal, aside from the added extension .png. For example, for an image image_path/abc/012.jpg,the mask would be mask_path/abc/012.jpg.png. Nofeatures will be extracted in regions where themask image is black (pixel intensity value 0 ingrayscale). (str, default: )
- property existing_camera_id
Whether to explicitly use an existing camera for all images. Note that in this case the specified camera model and parameters are ignored. (int, default: -1)
- property camera_params
Manual specification of camera parameters. If empty, camera parameters will be extracted from EXIF, i.e. principal point and focal length. (str, default: )
- property default_focal_length_factor
If camera parameters are not specified manually and the image does not have focal length EXIF information, the focal length is set to the value default_focal_length_factor * max(width, height). (float, default: 1.2)
- property camera_mask_path
Optional path to an image file specifying a mask for all images. No features will be extracted in regions where the mask is black (pixel intensity value 0 in grayscale) (str, default: )
- summary(self: pycolmap.ImageReaderOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.ImageReaderOptions, recursive: bool = True) dict
- class pycolmap.CopyType(*args, **kwargs)
Members:
copy
softlink
hardlink
Overloaded function.
__init__(self: pycolmap.CopyType, value: int) → None
__init__(self: pycolmap.CopyType, name: str) → None
- property name
- property value
- copy = CopyType.copy
- softlink = CopyType.softlink
- hardlink = CopyType.hardlink
- class pycolmap.UndistortCameraOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.UndistortCameraOptions) → None
__init__(self: pycolmap.UndistortCameraOptions, kwargs: dict) → None
__init__(self: pycolmap.UndistortCameraOptions, **kwargs) → None
- property blank_pixels
The amount of blank pixels in the undistorted image in the range [0, 1]. (float, default: 0.0)
- property min_scale
Minimum scale change of camera used to satisfy the blank pixel constraint. (float, default: 0.2)
- property max_scale
Maximum scale change of camera used to satisfy the blank pixel constraint. (float, default: 2.0)
- property max_image_size
Maximum image size in terms of width or height of the undistorted camera. (int, default: -1)
- property roi_min_x
(float, default: 0.0)
- property roi_min_y
(float, default: 0.0)
- property roi_max_x
(float, default: 1.0)
- property roi_max_y
(float, default: 1.0)
- summary(self: pycolmap.UndistortCameraOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.UndistortCameraOptions, recursive: bool = True) dict
- pycolmap.import_images(
- database_path: str,
- image_path: str,
- camera_mode: pycolmap.CameraMode = CameraMode.AUTO,
- image_list: list[str] = [],
- options: pycolmap.ImageReaderOptions = ImageReaderOptions(),
Import images into a database
- pycolmap.infer_camera_from_image(image_path: str, options: pycolmap.ImageReaderOptions = ImageReaderOptions()) pycolmap.Camera
Guess the camera parameters from the EXIF metadata
- pycolmap.undistort_images(
- output_path: str,
- input_path: str,
- image_path: str,
- image_list: list[str] = [],
- output_type: str = 'COLMAP',
- copy_policy: pycolmap.CopyType = CopyType.copy,
- num_patch_match_src_images: int = 20,
- undistort_options: pycolmap.UndistortCameraOptions = UndistortCameraOptions(),
Undistort images
- pycolmap.extract_features(
- database_path: str,
- image_path: str,
- image_list: list[str] = [],
- camera_mode: pycolmap.CameraMode = CameraMode.AUTO,
- camera_model: str = 'SIMPLE_RADIAL',
- reader_options: pycolmap.ImageReaderOptions = ImageReaderOptions(),
- sift_options: pycolmap.SiftExtractionOptions = SiftExtractionOptions(),
- device: pycolmap.Device = Device.auto,
Extract SIFT Features and write them to database
- class pycolmap.ExhaustiveMatchingOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.ExhaustiveMatchingOptions) → None
__init__(self: pycolmap.ExhaustiveMatchingOptions, kwargs: dict) → None
__init__(self: pycolmap.ExhaustiveMatchingOptions, **kwargs) → None
- property block_size
(int, default: 50)
- summary(self: pycolmap.ExhaustiveMatchingOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.ExhaustiveMatchingOptions, recursive: bool = True) dict
- class pycolmap.SpatialMatchingOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.SpatialMatchingOptions) → None
__init__(self: pycolmap.SpatialMatchingOptions, kwargs: dict) → None
__init__(self: pycolmap.SpatialMatchingOptions, **kwargs) → None
- property ignore_z
Whether to ignore the Z-component of the location prior. (bool, default: True)
- property max_num_neighbors
The maximum number of nearest neighbors to match. (int, default: 50)
- property max_distance
The maximum distance between the query and nearest neighbor [meters]. (float, default: 100.0)
- property num_threads
(int, default: -1)
- summary(self: pycolmap.SpatialMatchingOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.SpatialMatchingOptions, recursive: bool = True) dict
- class pycolmap.VocabTreeMatchingOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.VocabTreeMatchingOptions) → None
__init__(self: pycolmap.VocabTreeMatchingOptions, kwargs: dict) → None
__init__(self: pycolmap.VocabTreeMatchingOptions, **kwargs) → None
- property num_images
Number of images to retrieve for each query image. (int, default: 100)
- property num_nearest_neighbors
Number of nearest neighbors to retrieve per query feature. (int, default: 5)
- property num_checks
Number of nearest-neighbor checks to use in retrieval. (int, default: 256)
- property num_images_after_verification
How many images to return after spatial verification. Set to 0 to turn off spatial verification. (int, default: 0)
- property max_num_features
The maximum number of features to use for indexing an image. (int, default: -1)
- property vocab_tree_path
Path to the vocabulary tree. (str, default: )
- property match_list_path
Optional path to file with specific image names to match. (str, default: )
- property num_threads
(int, default: -1)
- check(self: pycolmap.VocabTreeMatchingOptions) None
- summary(self: pycolmap.VocabTreeMatchingOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.VocabTreeMatchingOptions, recursive: bool = True) dict
- class pycolmap.SequentialMatchingOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.SequentialMatchingOptions) → None
__init__(self: pycolmap.SequentialMatchingOptions, kwargs: dict) → None
__init__(self: pycolmap.SequentialMatchingOptions, **kwargs) → None
- property overlap
Number of overlapping image pairs. (int, default: 10)
- property quadratic_overlap
Whether to match images against their quadratic neighbors. (bool, default: True)
- property loop_detection
Loop detection is invoked every loop_detection_period images. (bool, default: False)
- property loop_detection_num_images
The number of images to retrieve in loop detection. This number should be significantly bigger than the sequential matching overlap. (int, default: 50)
- property loop_detection_num_nearest_neighbors
Number of nearest neighbors to retrieve per query feature. (int, default: 1)
- property loop_detection_num_checks
Number of nearest-neighbor checks to use in retrieval. (int, default: 256)
- property loop_detection_num_images_after_verification
How many images to return after spatial verification. Set to 0 to turn off spatial verification. (int, default: 0)
- property loop_detection_max_num_features
The maximum number of features to use for indexing an image. If an image has more features, only the largest-scale features will be indexed. (int, default: -1)
- property vocab_tree_path
Path to the vocabulary tree. (str, default: )
- vocab_tree_options( ) pycolmap.VocabTreeMatchingOptions
- summary(self: pycolmap.SequentialMatchingOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.SequentialMatchingOptions, recursive: bool = True) dict
- class pycolmap.ImagePairsMatchingOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.ImagePairsMatchingOptions) → None
__init__(self: pycolmap.ImagePairsMatchingOptions, kwargs: dict) → None
__init__(self: pycolmap.ImagePairsMatchingOptions, **kwargs) → None
- property block_size
Number of image pairs to match in one batch. (int, default: 1225)
- property match_list_path
Path to the file with the matches. (str, default: )
- summary(self: pycolmap.ImagePairsMatchingOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.ImagePairsMatchingOptions, recursive: bool = True) dict
- pycolmap.match_exhaustive(
- database_path: str,
- sift_options: pycolmap.SiftMatchingOptions = SiftMatchingOptions(),
- matching_options: pycolmap.ExhaustiveMatchingOptions = ExhaustiveMatchingOptions(),
- verification_options: pycolmap.TwoViewGeometryOptions = TwoViewGeometryOptions(),
- device: pycolmap.Device = Device.auto,
Exhaustive feature matching
- pycolmap.match_spatial(
- database_path: str,
- sift_options: pycolmap.SiftMatchingOptions = SiftMatchingOptions(),
- matching_options: pycolmap.SpatialMatchingOptions = SpatialMatchingOptions(),
- verification_options: pycolmap.TwoViewGeometryOptions = TwoViewGeometryOptions(),
- device: pycolmap.Device = Device.auto,
Spatial feature matching
- pycolmap.match_vocabtree(
- database_path: str,
- sift_options: pycolmap.SiftMatchingOptions = SiftMatchingOptions(),
- matching_options: pycolmap.VocabTreeMatchingOptions = VocabTreeMatchingOptions(),
- verification_options: pycolmap.TwoViewGeometryOptions = TwoViewGeometryOptions(),
- device: pycolmap.Device = Device.auto,
Vocab tree feature matching
- pycolmap.match_sequential(
- database_path: str,
- sift_options: pycolmap.SiftMatchingOptions = SiftMatchingOptions(),
- matching_options: pycolmap.SequentialMatchingOptions = SequentialMatchingOptions(),
- verification_options: pycolmap.TwoViewGeometryOptions = TwoViewGeometryOptions(),
- device: pycolmap.Device = Device.auto,
Sequential feature matching
- pycolmap.verify_matches(
- database_path: str,
- pairs_path: str,
- options: pycolmap.TwoViewGeometryOptions = TwoViewGeometryOptions(),
Run geometric verification of the matches
- class pycolmap.PairGenerator
- reset(self: pycolmap.PairGenerator) None
- has_finished(self: pycolmap.PairGenerator) bool
- next(self: pycolmap.PairGenerator) list[tuple[int, int]]
- all_pairs(self: pycolmap.PairGenerator) list[tuple[int, int]]
- class pycolmap.ExhaustivePairGenerator(
- self: pycolmap.ExhaustivePairGenerator,
- options: pycolmap.ExhaustiveMatchingOptions,
- database: pycolmap.Database,
- class pycolmap.VocabTreePairGenerator(
- self: pycolmap.VocabTreePairGenerator,
- options: pycolmap.VocabTreeMatchingOptions,
- database: pycolmap.Database,
- query_image_ids: list[int] = [],
- class pycolmap.SequentialPairGenerator(
- self: pycolmap.SequentialPairGenerator,
- options: pycolmap.SequentialMatchingOptions,
- database: pycolmap.Database,
- class pycolmap.SpatialPairGenerator(
- self: pycolmap.SpatialPairGenerator,
- options: pycolmap.SpatialMatchingOptions,
- database: pycolmap.Database,
- class pycolmap.ImportedPairGenerator(
- self: pycolmap.ImportedPairGenerator,
- options: pycolmap.ImagePairsMatchingOptions,
- database: pycolmap.Database,
- pycolmap.triangulate_points(
- reconstruction: pycolmap.Reconstruction,
- database_path: str,
- image_path: str,
- output_path: str,
- clear_points: bool = True,
- options: pycolmap.IncrementalPipelineOptions = IncrementalPipelineOptions(),
- refine_intrinsics: bool = False,
Triangulate 3D points from known camera poses
- pycolmap.incremental_mapping(
- database_path: str,
- image_path: str,
- output_path: str,
- options: pycolmap.IncrementalPipelineOptions = IncrementalPipelineOptions(),
- input_path: str = '',
- initial_image_pair_callback: Callable[[], None] = None,
- next_image_callback: Callable[[], None] = None,
Recover 3D points and unknown camera poses
- pycolmap.bundle_adjustment(
- reconstruction: pycolmap.Reconstruction,
- options: pycolmap.BundleAdjustmentOptions = BundleAdjustmentOptions(),
Jointly refine 3D points and camera poses
- class pycolmap.PatchMatchOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.PatchMatchOptions) → None
__init__(self: pycolmap.PatchMatchOptions, kwargs: dict) → None
__init__(self: pycolmap.PatchMatchOptions, **kwargs) → None
- property max_image_size
Maximum image size in either dimension. (int, default: -1)
- property gpu_index
Index of the GPU used for patch match. For multi-GPU usage, you should separate multiple GPU indices by comma, e.g., “0,1,2,3”. (str, default: -1)
- property depth_min
(float, default: -1.0)
- property depth_max
(float, default: -1.0)
- property window_radius
Half window size to compute NCC photo-consistency cost. (int, default: 5)
- property window_step
Number of pixels to skip when computing NCC. (int, default: 1)
- property sigma_spatial
Spatial sigma for bilaterally weighted NCC. (float, default: -1.0)
- property sigma_color
Color sigma for bilaterally weighted NCC. (float, default: 0.20000000298023224)
- property num_samples
Number of random samples to draw in Monte Carlo sampling. (int, default: 15)
- property ncc_sigma
Spread of the NCC likelihood function. (float, default: 0.6000000238418579)
- property min_triangulation_angle
Minimum triangulation angle in degrees. (float, default: 1.0)
- property incident_angle_sigma
Spread of the incident angle likelihood function. (float, default: 0.8999999761581421)
- property num_iterations
Number of coordinate descent iterations. (int, default: 5)
- property geom_consistency
Whether to add a regularized geometric consistency term to the cost function. If true, the depth_maps and normal_maps must not be null. (bool, default: True)
- property geom_consistency_regularizer
The relative weight of the geometric consistency term w.r.t. to the photo-consistency term. (float, default: 0.30000001192092896)
- property geom_consistency_max_cost
Maximum geometric consistency cost in terms of the forward-backward reprojection error in pixels. (float, default: 3.0)
- property filter
Whether to enable filtering. (bool, default: True)
- property filter_min_ncc
Minimum NCC coefficient for pixel to be photo-consistent. (float, default: 0.10000000149011612)
- property filter_min_triangulation_angle
Minimum triangulation angle to be stable. (float, default: 3.0)
- property filter_min_num_consistent
Minimum number of source images have to be consistent for pixel not to be filtered. (int, default: 2)
- property filter_geom_consistency_max_cost
Maximum forward-backward reprojection error for pixel to be geometrically consistent. (float, default: 1.0)
- property cache_size
Cache size in gigabytes for patch match. (float, default: 32.0)
- property allow_missing_files
Whether to tolerate missing images/maps in the problem setup (bool, default: False)
- property write_consistency_graph
Whether to write the consistency graph. (bool, default: False)
- summary(self: pycolmap.PatchMatchOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.PatchMatchOptions, recursive: bool = True) dict
- pycolmap.patch_match_stereo(
- workspace_path: str,
- workspace_format: str = 'COLMAP',
- pmvs_option_name: str = 'option-all',
- options: pycolmap.PatchMatchOptions = PatchMatchOptions(),
- config_path: str = '',
Runs Patch-Match-Stereo (requires CUDA)
- class pycolmap.StereoFusionOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.StereoFusionOptions) → None
__init__(self: pycolmap.StereoFusionOptions, kwargs: dict) → None
__init__(self: pycolmap.StereoFusionOptions, **kwargs) → None
- property mask_path
Path for PNG masks. Same format expected as ImageReaderOptions. (str, default: )
- property num_threads
The number of threads to use during fusion. (int, default: -1)
- property max_image_size
Maximum image size in either dimension. (int, default: -1)
- property min_num_pixels
Minimum number of fused pixels to produce a point. (int, default: 5)
- property max_num_pixels
Maximum number of pixels to fuse into a single point. (int, default: 10000)
- property max_traversal_depth
Maximum depth in consistency graph traversal. (int, default: 100)
- property max_reproj_error
Maximum relative difference between measured and projected pixel. (float, default: 2.0)
- property max_depth_error
Maximum relative difference between measured and projected depth. (float, default: 0.009999999776482582)
- property max_normal_error
Maximum angular difference in degrees of normals of pixels to be fused. (float, default: 10.0)
- property check_num_images
Number of overlapping images to transitively check for fusing points. (int, default: 50)
- property use_cache
Flag indicating whether to use LRU cache or pre-load all data (bool, default: False)
- property cache_size
Cache size in gigabytes for fusion. (float, default: 32.0)
- property bounding_box
Bounding box Tuple[min, max] (tuple, default: (array([-3.4028235e+38, -3.4028235e+38, -3.4028235e+38], dtype=float32), array([3.4028235e+38, 3.4028235e+38, 3.4028235e+38], dtype=float32)))
- summary(self: pycolmap.StereoFusionOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.StereoFusionOptions, recursive: bool = True) dict
- pycolmap.stereo_fusion(
- output_path: str,
- workspace_path: str,
- workspace_format: str = 'COLMAP',
- pmvs_option_name: str = 'option-all',
- input_type: str = 'geometric',
- options: pycolmap.StereoFusionOptions = StereoFusionOptions(),
Stereo Fusion
- class pycolmap.PoissonMeshingOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.PoissonMeshingOptions) → None
__init__(self: pycolmap.PoissonMeshingOptions, kwargs: dict) → None
__init__(self: pycolmap.PoissonMeshingOptions, **kwargs) → None
- property point_weight
This floating point value specifies the importance that interpolation ofthe point samples is given in the formulation of the screened Poissonequation. The results of the original (unscreened) Poisson Reconstructioncan be obtained by setting this value to 0. (float, default: 1.0)
- property depth
This integer is the maximum depth of the tree that will be used for surfacereconstruction. Running at depth d corresponds to solving on a voxel gridwhose resolution is no larger than 2^d x 2^d x 2^d. Note that since thereconstructor adapts the octree to the sampling density, the specifiedreconstruction depth is only an upper bound. (int, default: 13)
- property color
If specified, the reconstruction code assumes that the input is equippedwith colors and will extrapolate the color values to the vertices of thereconstructed mesh. The floating point value specifies the relativeimportance of finer color estimates over lower ones. (float, default: 32.0)
- property trim
This floating point values specifies the value for mesh trimming. Thesubset of the mesh with signal value less than the trim value is discarded. (float, default: 10.0)
- property num_threads
The number of threads used for the Poisson reconstruction. (int, default: -1)
- summary(self: pycolmap.PoissonMeshingOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.PoissonMeshingOptions, recursive: bool = True) dict
- class pycolmap.DelaunayMeshingOptions(*args, **kwargs)
Overloaded function.
__init__(self: pycolmap.DelaunayMeshingOptions) → None
__init__(self: pycolmap.DelaunayMeshingOptions, kwargs: dict) → None
__init__(self: pycolmap.DelaunayMeshingOptions, **kwargs) → None
- property max_proj_dist
Unify input points into one cell in the Delaunay triangulation that fallwithin a reprojected radius of the given pixels. (float, default: 20.0)
- property max_depth_dist
Maximum relative depth difference between input point and a vertex of anexisting cell in the Delaunay triangulation, otherwise a new vertex iscreated in the triangulation. (float, default: 0.05)
- property visibility_sigma
The standard deviation of wrt. the number of images seen by each point.Increasing this value decreases the influence of points seen in few images. (float, default: 3.0)
- property distance_sigma_factor
The factor that is applied to the computed distance sigma, which isautomatically computed as the 25th percentile of edge lengths. A highervalue will increase the smoothness of the surface. (float, default: 1.0)
- property quality_regularization
A higher quality regularization leads to a smoother surface. (float, default: 1.0)
- property max_side_length_factor
Filtering thresholds for outlier surface mesh faces. If the longest side ofa mesh face (longest out of 3) exceeds the side lengths of all faces at acertain percentile by the given factor, then it is considered an outliermesh face and discarded. (float, default: 25.0)
- property max_side_length_percentile
Filtering thresholds for outlier surface mesh faces. If the longest side ofa mesh face (longest out of 3) exceeds the side lengths of all faces at acertain percentile by the given factor, then it is considered an outliermesh face and discarded. (float, default: 95.0)
- property num_threads
The number of threads to use for reconstruction. Default is all threads. (int, default: -1)
- summary(self: pycolmap.DelaunayMeshingOptions, write_type: bool = False) str
- mergedict(self: object, kwargs: dict) None
- todict(self: pycolmap.DelaunayMeshingOptions, recursive: bool = True) dict
- pycolmap.poisson_meshing(
- input_path: str,
- output_path: str,
- options: pycolmap.PoissonMeshingOptions = PoissonMeshingOptions(),
Perform Poisson surface reconstruction and return true if successful.
- pycolmap.set_random_seed(seed: int) None
Initialize the PRNG with the given seed.
- class pycolmap.ostream(self: pycolmap.ostream, stdout: bool = True, stderr: bool = True)