sispo.reconstruction package¶
Submodules¶
sispo.reconstruction.openmvg module¶
Class to control openMVG behaviour.
-
class
sispo.reconstruction.openmvg.
OpenMVGController
(res_dir, openMVG_dir=None)¶ Controls behaviour of openMVG data processing.
-
analyse_images
(focal=65437, intrinsics=None, cam_model=1, prior=True, p_weights=(1.0, 1.0, 1.0))¶ ImageListing step of reconstruction.
-
compute_features
(force_compute=False, descriptor='SIFT', d_preset='ULTRA', use_upright=True, num_threads=0)¶ Compute features in images.
-
export_MVS
(num_threads=0)¶ Export 3D model to MVS format.
-
match_features
(force_compute=False, ratio=0.8, geo_model='f', num_overlaps=3, pairlist_file=None, method='FASTCASCADEHASHINGL2', guided=False, cache_size=None)¶ Match computed features of images.
-
reconstruct_global
(first_image=None, second_image=None, refine_options='ADJUST_ALL', prior=True, match_file=None)¶ Reconstruct 3D models globally.
-
reconstruct_multi
(first_image=None, second_image=None, cam_model=3, refine_options='ADJUST_ALL', prior=True, match_file=None)¶ Reconstructs using all algorithms provided by OpenMVG.
-
reconstruct_seq1
(first_image=None, second_image=None, cam_model=3, refine_options='ADJUST_ALL', prior=True, match_file=None)¶ Reconstruct 3D models sequentially.
-
reconstruct_seq2
(first_image=None, second_image=None, cam_model=3, refine_options='ADJUST_ALL', prior=True, match_file=None)¶ Reconstruct 3D models sequentially.
-
-
exception
sispo.reconstruction.openmvg.
OpenMVGControllerError
¶ Generic openMVG error.
sispo.reconstruction.openmvs module¶
Class to control openMVS behaviour.
-
class
sispo.reconstruction.openmvs.
OpenMVSController
(res_dir, openMVS_dir=None)¶ Controls behaviour of openMVS data processing.
-
create_mesh
(export_type='obj', p_prio=-1, max_threads=0, const_weight=1, free_space=0, thickness=1, quality=1, decimate=1, remove_spurious=20, remove_spikes=True, close_holes=30, smooth=2)¶ Create a mesh from a 3D point cloud.
-
densify_pointcloud
(p_prio=-1, max_threads=0, res_lvl=1, res_min=640, num_views=0, num_views_fuse=3, est_colors=False, est_normals=False, sample_mesh=0)¶ Increases number of points to make 3D model smoother.
-
refine_mesh
(export_type='obj', p_prio=-1, max_threads=0, res_lvl=0, res_min=640, max_views=8, decimate=1, holes=30, ensure_edge_size=1, max_face_area=64, scales=3, scale_step=0.5, reduce_memory=True, alt_pair=0, reg_weight=0.2, rig_ela_r=0.9, grad_step=45.05, vertex_ratio=0, use_cuda=False)¶ Refine 3D mesh.
Despite being used by default, CUDA is specifically disabled as default since it is known to cause problems. See also https://github.com/cdcseacave/openMVS/issues/378 https://github.com/cdcseacave/openMVS/issues/230
-
texture_mesh
(export_type='obj', p_prio=-1, max_threads=0, res_lvl=0, res_min=640, outlier_thres=0.6, cost_smooth_r=0.1, seam_level_global=1, seam_level_local=1, texture_size_multiple=0, patch_heuristic=3, empty_color=16744231, orthographic_res=0)¶ Add texture to mesh using images.
-
-
exception
sispo.reconstruction.openmvs.
OpenMVSControllerError
¶ Generic openMVS error.
sispo.reconstruction.reconstruction module¶
Reconstruction module to create 3D models from images.
Currently this module uses openMVG and openMVS.
-
class
sispo.reconstruction.reconstruction.
Reconstructor
(res_dir, focal=65437, intrinsics=None, cam_model=1, use_prior=True, prior_weights=(1.0, 1.0, 1.0), force_compute=False, descriptor='SIFT', d_preset='ULTRA', use_upright=True, num_threads=0, neighbour_ratio=0.8, geo_model='f', num_overlaps=3, pairlist_file=None, method='FASTCASCADEHASHINGL2', guided=False, cache_size=None, first_img=None, second_img=None, refine_options='ADJUST_ALL', match_file=None, p_prio=-1, res_lvl=1, res_min=640, num_views=0, num_views_fuse=3, est_colors=False, est_normals=False, sample_mesh=0, const_weight=1, free_space=0, thickness=1, quality=1, decimate=1, remove_spurious=30, remove_spikes=True, close_holes=30, smooth=2, max_views=8, ensure_edge_size=1, max_face_area=64, scales=3, scale_step=0.5, reduce_memory=True, alt_pair=0, reg_weight=0.2, rig_ela_ratio=0.9, grad_step=45.05, vertex_ratio=0, use_cuda=False, export_type='obj', outlier_thres=0.6, cost_smooth_ratio=0.1, seam_level_global=1, seam_level_local=1, texture_size_multiple=0, patch_heuristic=3, empty_color=16744231, orthographic_res=0, openMVG_dir=None, openMVS_dir=None)¶ Reconstruction of a 3D object from images.
-
create_export_pointcloud
()¶ Creates and exports pointcloud to openMVS format.
Includes all reconstruction steps of the openMVG tool.
-
create_pointcloud
()¶ Creates point cloud from images.
-
create_textured_model
()¶ Creates mesh, refines it and applies texture to it.
-
densify_mesh_texture_model
()¶ Densifies pointcloud, creates and refines mesh and testures it.
Includes all reconstruction steps of the openMVS tool.
-
densify_pointcloud
()¶ Create a dense point cloud from images and point cloud.
-
reconstruct
()¶ Applies entire reconstruction pipeline
Going from images over dense point cloud to textured mesh model.
-
sispo.reconstruction.utils module¶
Utils module contains functions possibly used by all modules.
-
sispo.reconstruction.utils.
check_dir
(directory, create=True)¶ Resolves directory and creates it, if it doesn’t existing.
Parameters: - directory (Path or str) – Directory to be created if not existing
- create (bool) – Set to false if directory should not be created and instead an exception shall be raise
-
sispo.reconstruction.utils.
execute
(args, exception)¶ Utility function to execute all terminal programs.