常见开源多视图立体算法运行脚本记录
2021-05-06 07:28
标签:inf main ssr limit code max camera hal HCL 1. MVE 项目主页 https://www.gcc.tu-darmstadt.de/home/proj/mve/ Github地址 https://github.com/simonfuhrmann/mve 2. SMVS 项目主页 https://www.gcc.tu-darmstadt.de/home/proj/smvs/smvs.en.jsp Github地址 https://github.com/flanggut/smvs 3. openMVG+openMVS 多视图立体几何基础库 openMVG https://github.com/openMVG/openMVG 稠密重建库 openMVS https://github.com/cdcseacave/openMVS 4. COLMAP 项目主页 https://demuc.de/colmap/ Github地址 https://github.com/colmap/colmap colmap recon script(from tanks and temples) 上述几个脚本都放到了我的github上,地址是:https://github.com/philleer/program_test/tree/mvs_script Ubuntu 18.04 LTS 亲自测试有效,欢迎补充 常见开源多视图立体算法运行脚本记录 标签:inf main ssr limit code max camera hal HCL 原文地址:https://www.cnblogs.com/phillee/p/13094478.html#!/bin/bash
workspace_path=/root/test_result/mve_result
image_dir=${workspace_path}/${1}
scene_dir=${workspace_path}/${2}
mve=/root/misc_codes/mve/apps
maxpixel=20000000
intrinsic_fp="2759.48,0,0,0.4950,0.4916,0.9983" # fountain-p11
intrinsic_tp="1520.40,0,0,0.4724,0.5143,0.9964" # temple
intrinsic_eth_pipe="3430.27,0,0,0.5015,0.4969,1.0003" # eth3d pipes
intrinsic_dtu="2892.33,0,0,0.5145,0.5159,1.0032" # dtu dataset
intrinsic_tanks=""
intrinsic=${intrinsic_tanks}
# --init-intrinsics=${intrinsic} ${mve}/makescene/makescene --original --images-only ${image_dir} --max-pixels=${maxpixel} ${scene_dir} &&
# --fixed-intrinsics ${mve}/sfmrecon/sfmrecon --max-pixels=${maxpixel} --verbose-ba ${scene_dir} &&
${mve}/dmrecon/dmrecon --neighbors=9 --scale=0 --max-pixels=${maxpixel} --local-neighbors=6 --keep-dz --progress=fancy ${scene_dir} &&
${mve}/scene2pset/scene2pset -F0 ${scene_dir} ${scene_dir}/pset-L0.ply &&
${mve}/fssrecon/fssrecon ${scene_dir}/pset-L0.ply ${scene_dir}/surface-L0.ply &&
${mve}/meshclean/meshclean --threshold=8.0 --delete-scale ${scene_dir}/surface-L0.ply ${scene_dir}/surface-clean.ply
#!/bin/bash
workspace_path=/root/test_result/smvs_result
image_dir=${workspace_path}/${1}
scene_dir=${workspace_path}/${2}
mve=/root/misc_codes/mve/apps
smvs=/root/misc_codes/smvs/smvsrecon
maxpixel=2000000
intrinsic_fp="2759.48,0,0,0.4950,0.4916,0.9983" # fountain-p11
intrinsic_tp="1520.40,0,0,0.4724,0.5143,0.9964" # temple
intrinsic_eth_pipe="3430.27,0,0,0.5015,0.4969,1.0003" # eth3d pipes
intrinsic_dtu="2892.33,0,0,0.5145,0.5159,1.0032" # dtu dataset
intrinsic_tanks="2304.00,0,0,0.5,0.5,1.0000" # Manually set intrinsic
intrinsic=${intrinsic_fp}
${mve}/makescene/makescene --original --images-only ${image_dir} --max-pixels=${maxpixel} --init-intrinsics=${intrinsic} ${scene_dir} &&
${mve}/sfmrecon/sfmrecon --max-pixels=${maxpixel} --fixed-intrinsics --verbose-ba ${scene_dir} &&
${smvs} ${scene_dir} &&
${mve}/fssrecon/fssrecon ${scene_dir}/pset-L0.ply ${scene_dir}/surface-L0.ply &&
${mve}/meshclean/meshclean --threshold=8.0 --delete-scale ${scene_dir}/surface-L0.ply ${scene_dir}/surface-clean.ply
#!/bin/bash
workspace_path=/root/test_result/openmvs_result/${1}
image_dir=${workspace_path}/images
recon_dir=${workspace_path}/reconstruct
match_dir=${recon_dir}/matches
openmvg=/root/misc_codes/openMVG/openmvg-bin/bin
openmvs=/root/misc_codes/openMVS/openmvs-build/bin
maxres=6400
minres=480
intrinsic_fp="2759.48;0;1520.69;0;2764.16;1006.81;0;0;1" # fountain-p11
intrinsic_tp="1520.40;0;302.32;0;1525.90;246.87;0;0;1" # temple
intrinsic_eth_pipe="3430.27;0;3119.2;0;3429.23;2057.75;0;0;1" # eth3d pipes
intrinsic_dtu="2892.33;0;823.21;0;2883.17;619.07;0;0;1" # for all dtu datasets
intrinsic_tanks="2304.00;0;960;0;2304.00;540;0;0;1" # Manually set intrinsic
intrinsic=${intrinsic_dtu}
mkdir ${recon_dir} && mkdir ${match_dir}
${openmvg}/openMVG_main_SfMInit_ImageListing -i ${image_dir} -o ${match_dir} --camera_model 1 --intrinsics ${intrinsic} --group_camera_model 1
${openmvg}/openMVG_main_ComputeFeatures -i ${match_dir}/sfm_data.json --outdir ${match_dir} --describerPreset HIGH
${openmvg}/openMVG_main_ComputeMatches -i ${match_dir}/sfm_data.json --out_dir ${match_dir} --nearest_matching_method ANNL2
${openmvg}/openMVG_main_IncrementalSfM -i ${match_dir}/sfm_data.json --matchdir ${match_dir} --outdir ${recon_dir} --camera_model 1 --refineIntrinsics NONE
# --refineIntrinsics "ADJUST_FOCAL_LENGTH|ADJUST_PRINCIPAL_POINT"
${openmvg}/openMVG_main_ComputeSfM_DataColor -i ${recon_dir}/sfm_data.bin -o ${recon_dir}/colorized.ply
${openmvg}/openMVG_main_ComputeStructureFromKnownPoses -i ${recon_dir}/sfm_data.bin --match_dir ${match_dir} --match_file ${match_dir}/matches.f.bin --output_file ${recon_dir}/robust.bin
${openmvg}/openMVG_main_ComputeSfM_DataColor -i ${recon_dir}/robust.bin -o ${recon_dir}/robust_colorized.ply
# outfile is the file name to save converted result
# outdir is the path to save undistorted images
${openmvg}/openMVG_main_openMVG2openMVS --sfmdata ${recon_dir}/sfm_data.bin --outfile ${recon_dir}/scene.mvs --outdir ${recon_dir}
${openmvs}/DensifyPointCloud --working-folder ${recon_dir} -i ${recon_dir}/scene.mvs --max-resolution=${maxres} --min-resolution=${minres} --number-views=6
# free-space-support is for textureless region
${openmvs}/ReconstructMesh --working-folder ${recon_dir} -i ${recon_dir}/scene_dense.mvs --free-space-support 1
${openmvs}/RefineMesh --working-folder ${recon_dir} -i ${recon_dir}/scene_dense_mesh.mvs --min-resolution ${minres} --max-views 9 --scales 5 --planar-vertex-ratio 5
${openmvs}/TextureMesh --working-folder ${recon_dir} -i ${recon_dir}/scene_dense_mesh.mvs --min-resolution ${minres} --cost-smoothness-ratio 0.3
#!/bin/bash
colmap=/root/misc_codes/colmap/colmap-bin/bin/colmap
workspace=/root/test_result/colmap_result/${1}
images=${workspace}/images
database_path=${workspace}/database.db
sparse_path=${workspace}/sparse
dense_path=${workspace}/dense
maxsize=2000
maxfeature=8192
intrinsic_fp="2759.48,2764.16,1520.69,1006.81" # fountain-p11
intrinsic_tp="1520.40,1525.90,302.32,246.87" # temple
intrinsic_dtu="2892.33,2883.17,823.21,619.07" # all dtu dataset
intrinsic_tanks=""
intrinsic=${intrinsic_dtu}
# --ImageReader.camera_params ${intrinsic} ${colmap} feature_extractor --database_path ${database_path} --image_path ${images} --ImageReader.camera_model PINHOLE --ImageReader.camera_params ${intrinsic} --ImageReader.single_camera 1 --SiftExtraction.max_image_size ${maxsize} --SiftExtraction.max_num_features ${maxfeature}
${colmap} exhaustive_matcher --database_path ${database_path} --SiftMatching.guided_matching 0
mkdir ${sparse_path}
${colmap} mapper --database_path ${database_path} --image_path ${images} --output_path ${sparse_path} --Mapper.ba_refine_principal_point false
mkdir ${dense_path} &&
${colmap} image_undistorter --image_path ${images} --input_path ${sparse_path}/0 --output_path ${dense_path} --output_type COLMAP --max_image_size ${maxsize} &&
${colmap} patch_match_stereo --workspace_path ${dense_path} --workspace_format COLMAP --PatchMatchStereo.max_image_size ${maxsize} --PatchMatchStereo.window_radius 9 --PatchMatchStereo.geom_consistency 1 --PatchMatchStereo.filter_min_ncc 0.07 &&
${colmap} stereo_fusion --workspace_path ${dense_path} --input_type geometric --output_path ${dense_path}/fused.ply &&
${colmap} poisson_mesher --input_path ${dense_path}/fused.ply --output_path ${dense_path}/meshed-poisson.ply
${colmap} delaunay_mesher --input_path ${dense_path} --input_type dense --output_path ${dense_path}/meshed-delaunay.ply
#!/bin/bash
# ----------------------------------------------------------------------------
# - TanksAndTemples Website Toolbox -
# - http://www.tanksandtemples.org -
# ----------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2017
# Arno Knapitsch
# Jaesik Park
下一篇:nested exception is java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/util/DefaultIndenter