SHARE
TWEET

Automated photogrammetry bash - colmap and openMVS

a guest Oct 3rd, 2017 233 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2. CURRDIR=$PWD
  3. COLDIR=/home/YourUserName/colmap/build/src/exe
  4. OMVS=/home/YourUserName/Dokumente/openMVS_build/bin
  5. WORKDIR=/home/YourUserName/Reconstruct/tempWorkspace
  6.  
  7. #Make the work directory
  8. mkdir $WORKDIR
  9. cp -R *.JPG $WORKDIR
  10. cp -R *.jpg $WORKDIR
  11.  
  12. cd $WORKDIR
  13. $COLDIR/feature_extractor --database_path database.db --image_path .
  14. $COLDIR/exhaustive_matcher --database_path database.db
  15. mkdir sparse
  16. $COLDIR/mapper --database_path $WORKDIR/database.db --image_path . --export_path $WORKDIR/sparse
  17. $COLDIR/model_converter --input_path sparse/0 --output_path model.nvm --output_type NVM
  18. $OMVS/InterfaceVisualSFM $WORKDIR/model.nvm
  19. echo CALLING DENSIFY POINT CLOUD
  20. $OMVS/DensifyPointCloud $WORKDIR/model.mvs
  21. echo CALLING RECONSTRUCT MESH
  22. $OMVS/ReconstructMesh model_dense.mvs
  23. echo CALLING REFINE MESH
  24. $OMVS/RefineMesh model_dense_mesh.mvs --use-cuda 0
  25. echo CALLING TEXTURE MESH
  26. $OMVS/TextureMesh model_dense_mesh_refine.mvs
  27. #$OMVS/TextureMesh model_dense_mesh.mvs
  28.  
  29. meshlabserver -i model_dense_mesh_refine_texture.ply -o model.obj -m wt
  30.  
  31. mkdir $CURRDIR/model
  32. cp *.obj $CURRDIR/model
  33. cp *.mtl $CURRDIR/model
  34. cp *.png $CURRDIR/model
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top