这是本BLOG关于Bundler的第四个帖子,感兴趣的同学可以联系luangss@zju.edu.cn,一起交流。
Photogrammetry
3D reconstruction using Bundler and PMVS2
第一步:Setup 安装
1. Get thesoftware needed
MeshLab from http://downloads.sourceforge.net/meshlab/MeshLab_v123a.exe
BundlerPhotogrammetry Package from http://files.neonascent.net/SFM.zip
2. Install MeshLab
3. Extract SFM.zip to c:\
4. Make sure you really did extract everything to c:\SFM – your examples folder should be at c:\SFM\examples NOT c:\SFM\SFM\ examples
第二步:Sparse Point-Cloud reconstruction 稀疏点云重构
1. Add your images to a new folder in C:\SFM\examples\
2. Copy MakeList.bat into new folder and run to createlist.txt (list of images)
3. Copy sparseRecon64.bat into new folder and run it (if you are using a 32-bit system,copy and use the file “sparseRecon32 - SLOW - only usewithout 64.bat”)
第三步:Camera Type Setup 相机类型安装
Bundler needs to know some details about your camera. It has a database of information for well-known cameras, but you may need to add your to it. If you see the message “[Couldn't find CCD width for camera ...]” when runningBundler, you will need to add your camera CCD width.
1. Add you camera CCD details to \SFM\bin\extract_focal.pl file
%ccd_widths = (
YOUR CAMERA=> X.X,
"SunplusMMSpca1528" => 3.6, #1/4"
"SONYDSLR-A100" => 23.700, #1.8" APS-C CCD
This informationcan be found online.
2. If your images do not have any EXIF data attached (for example if you extracted them from video), you can use the scriptExIFwrite.vbs to add this information. Run EXIFwrite.vbs in your image directory, and enter the detailsEXACTLY as they appear in the extract_focal.pl file, including identical case.
第四步:Dense Point-Cloud reconstruction 密集点云重构
1. Copy denseRecon_batch.bat and denseRecon.vbs into new folder and run denseRecon.vbs
2. Enter theconfiguration values. Use the recommended first time.
The process maytake some time. At the end there should be one or more .ply files in (your imagefolder) \pmvs\models
You can open them in MeshLab and examine them.
第五步:Mesh reconstruction 网状重构
1. Once you have one or more dense point-cloud .ply files, open the first in MeshLab.
2. Open any others as Layers, and select the layer button to view the layer stack.
3. Select the“...” button on the layer tab and select “Flatten Visible Layers”, and makesure “delete layers” is unchecked.
4. Select “Filters→ Sampling → Vertex Attribute Transfer” andtransfer both colour and normals from the layers to the new “Merged Mesh”, withthe Max Distance Search percentage to 0.010
5. Select the“Merged Mesh” in the Layer stack
6. Select “Filters→ Point Set → Surface Reconstruction: Poisson”and use either 6, 6, 1, 1 for a quick test, or 11, 6, 1, 1 for a highlydetailed mesh. Experiment with different values of Octree depth, but bewarethat the larger it is the longer it will take.
7. Save yourmesh as an STL file ready for printing.