PyCOLMAP
PyCOLMAP exposes to Python most capabilities of COLMAP.
Installation
Pre-built wheels for Linux, macOS, and Windows can be installed using pip:
pip install pycolmap
The wheels are automatically built and pushed to PyPI at each release. To benefit from GPU acceleration, wheels built for CUDA 12 (only for Linux - for now) are available under the package pycolmap-cuda12.
To build PyCOLMAP from source, follow these steps:
Install COLMAP from source following Installation.
Build PyCOLMAP:
On Linux and macOS:
python -m pip install .
On Windows, after installing COLMAP via VCPKG, run in powershell:
python -m pip install . ` --cmake.define.CMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` --cmake.define.VCPKG_TARGET_TRIPLET="x64-windows"
Some features, such as cost functions, require that PyCeres is installed in the same manner as PyCOLMAP, so either from PyPI or from source.
API
- pycolmap
DeviceSensorTypesensor_tdata_timage_pair_to_pair_id()pair_id_to_image_pair()swap_image_pair()loggingTimerget_num_cuda_devices()Rotation3dAlignedBox3dRigid3dget_covariance_for_inverse()get_covariance_for_composed_rigid3d()get_covariance_for_relative_rigid3d()average_quaternions()interpolate_camera_poses()Sim3dPosePriorCoordinateSystemPosePriorGPSTransfromEllipsoidGPSTransformpose_from_homography_matrix()homography_decomposition()essential_matrix_from_pose()triangulate_point()calculate_triangulation_angle()TriangulatePoint()CalculateTriangulationAngle()triangulate_mid_point()RANSACOptionsBitmapRigRigMapKeysViewValuesViewItemsViewPoint2DPoint2DListCameraModelIdCameraCameraMapFrameFrameMapImageImageMapTrackElementTrackPoint3DPoint3DMapCorrespondenceCorrespondenceGraphTwoViewGeometryConfigurationTwoViewGeometryDatabaseDatabaseTransactionDatabaseCacheReconstructionReconstructionManagerRigConfigCameraRigConfigread_rig_config()apply_rig_config()SyntheticDatasetMatchConfigSyntheticDatasetOptionssynthesize_dataset()SyntheticNoiseOptionssynthesize_noise()SyntheticImageOptionssynthesize_images()UndistortCameraOptionsundistort_camera()undistort_image()AbsolutePoseEstimationOptionsAbsolutePoseRefinementOptionsestimate_absolute_pose()refine_absolute_pose()estimate_and_refine_absolute_pose()absolute_pose_estimation()estimate_relative_pose()refine_relative_pose()estimate_affine2d()estimate_affine2d_robust()ImageAlignmentErroralign_reconstructions_via_reprojections()align_reconstructions_via_proj_centers()align_reconstructions_via_points()align_reconstruction_to_locations()compare_reconstructions()align_reconstruction_to_orig_rig_scales()BundleAdjustmentGaugeBundleAdjustmentConfigLossFunctionTypeBundleAdjustmentOptionsPosePriorBundleAdjustmentOptionsBundleAdjustercreate_default_bundle_adjuster()create_pose_prior_bundle_adjuster()BACovarianceOptionsParamsExperimentalPoseParamBACovarianceOptionsBACovarianceestimate_ba_covariance_from_problem()estimate_ba_covariance()estimate_essential_matrix()essential_matrix_estimation()estimate_fundamental_matrix()fundamental_matrix_estimation()estimate_generalized_absolute_pose()refine_generalized_absolute_pose()estimate_and_refine_generalized_absolute_pose()rig_absolute_pose_estimation()estimate_generalized_relative_pose()estimate_homography_matrix()homography_matrix_estimation()estimate_rigid3d()estimate_rigid3d_robust()estimate_sim3d()estimate_sim3d_robust()TriangulationResidualTypeEstimateTriangulationOptionsestimate_triangulation()TwoViewGeometryOptionsestimate_calibrated_two_view_geometry()estimate_two_view_geometry()estimate_two_view_geometry_pose()compute_squared_sampson_error()squared_sampson_error()FeatureKeypointFeatureKeypointsFeatureMatchFeatureMatchesNormalizationSiftExtractionOptionsFeatureExtractionOptionsSiftSiftMatchingOptionsFeatureMatchingOptionsImageScoreVisualIndexImagePairStatObservationManagerIncrementalTriangulatorOptionsIncrementalTriangulatorImageSelectionMethodIncrementalMapperOptionsLocalBundleAdjustmentReportIncrementalMapperIncrementalPipelineOptionsIncrementalMapperCallbackIncrementalMapperStatusIncrementalPipelineMVSModelCameraModeImageReaderOptionsCopyTypeimport_images()infer_camera_from_image()undistort_images()extract_features()ExhaustivePairingOptionsSpatialPairingOptionsVocabTreePairingOptionsSequentialPairingOptionsImportedPairingOptionsmatch_exhaustive()match_spatial()match_vocabtree()match_sequential()verify_matches()PairGeneratorExhaustivePairGeneratorVocabTreePairGeneratorSequentialPairGeneratorSpatialPairGeneratorImportedPairGeneratortriangulate_points()incremental_mapping()bundle_adjustment()PatchMatchOptionspatch_match_stereo()StereoFusionOptionsstereo_fusion()PoissonMeshingOptionsDelaunayMeshingOptionspoisson_meshing()sparse_delaunay_meshing()dense_delaunay_meshing()set_random_seed()ostream
- Cost Functions