::These parameters are specific to computer::Store current Directory:setcurrDir=%CD%::get folder name as variableSET"MYDIR=%~p0"setMYDIR1=%MYDIR:~0,-1%for%%fin(%MYDIR1%)dosetmyfolder=%%~nxfsetroot="\path\to\3DReconstruction_release":: Set SFM directorysetcolDir=%root%\software\SFM
:: Set MVS directorysetoMVS=%root%\software\MVS
:: Set Working DirectorysetworkDir=%root%\temp-workspace\%myfolder%\
:: Set System env pathsetpath=%colDir%\lib\;%oMVS%;%path%mkdir%workDir%copy*.jpg %workDir%\
cd/d %workDir%%colDir%\bin\feature_extractor --database_path database.db --image_path .
%colDir%\bin\exhaustive_matcher --database_path database.db
::%colDir%\exhaustive_matcher --database_path database.db --SiftMatching.max_num_matches 10000mkdirsparse%colDir%\bin\mapper --database_path %workDir%\database.db --image_path . --export_path %workDir%\sparse
%colDir%\bin\model_converter --input_path sparse\0 --output_path model.nvm --output_type NVM%oMVS%\InterfaceVisualSFM.exe model.nvm
%oMVS%\DensifyPointCloud.exe model.mvs
%oMVS%\ReconstructMesh.exe model_dense.mvs
::%oMVS%\TextureMesh.exe --export-type obj -o %myfolder%.obj model_dense_mesh.mvs%oMVS%\RefineMesh.exe --resolution-level 1model_dense_mesh.mvs
::%oMVS%\RefineMesh.exe --resolution-level 3 model_dense_mesh.mvs%oMVS%\TextureMesh.exe --export-type obj-o %myfolder%.obj model_dense_mesh_refine.mvs
mkdir%currDir%\model\
copy*.obj %currDir%\model\
copy*.mtl %currDir%\model\
copy*Kd.jpg %currDir%\model\
::cd %currDir%::If you want to automate removal of the working folder, use the following line.::Don't use it if you want to keep intermediate steps.::rmdir /S /Q %workDir%pause