Skip to content
OpenMVS Hands-on Experience

OpenMVS Hands-on Experience

Environment Preparation

  1. Install Docker (Windows platform will be used as an example below)

  2. Pull images

1
2
docker pull colmap/colmap
docker pull openmvs/openmvs-ubuntu
  1. Prepare several photos (You can use https://github.com/cdcseacave/openMVS_sample/tree/master/images)
  2. Create a project folder
      • 00000.jpg
      • 00001.jpg

Steps

  1. Use COLMAP to generate sparse point clouds
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Start Docker container
docker run -it --rm \
	--gpus=all \ # Mount GPU, optional
	-v C:\Users\mioyi\project:/data \ # Mount project folder
	colmap/colmap # colmap container

# Reconstruction
cd /data
colmap automatic_reconstructor \
	--workspace_path . \
	--image_path ./images \
	--sparse 1 --dense 0

# Run undistortion (to adapt for OpenMVS)
mkdir dense
colmap image_undistorter \
    --image_path /data/images \
    --input_path /data/sparse/0 \
    --output_path /data/dense \
    --output_type COLMAP \
    --max_image_size 2000

# Convert to TXT format (to adapt for OpenMVS)
colmap model_converter \
    --input_path /data/dense/sparse \
    --output_path /data/dense/sparse \
    --output_type TXT

# Exit container
exit
  1. Use OpenMVS to generate textures
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Start Docker container
docker run -it --rm \
	-v C:\Users\mioyi\project:/data \ # Mount project folder
	openmvs/openmvs-ubuntu

cd /data/dense
# Convert to OpenMVS format
/openMVS_build/bin/InterfaceCOLMAP -i . -o scene.mvs --image-folder images
# 1. Densify point cloud
/openMVS_build/bin/DensifyPointCloud scene.mvs
# 2. Reconstruct mesh
/openMVS_build/bin/ReconstructMesh scene_dense.mvs
# 3. Refine mesh (optional)
/openMVS_build/bin/RefineMesh scene_dense_mesh.mvs
# 4. Texture mesh
/openMVS_build/bin/TextureMesh scene_dense_mesh.mvs

# Exit container
exit

The texture result is located at C:\Users\mioyi\project\dense\scene_dense_mesh_texture.png

Last updated on