"Go" Win7 64-bit configuration Bundler-v0.4-source

Source: Internet
Author: User
Tags imagemagick

One. What is Bundler

Bundler is a system developed in C and C + + called SFM (struct-from-motion), which enables the generation of sparse three-dimensional point cloud models based on user-supplied, unordered image sequences. It can reconstruct a 3D model using an unordered collection of pictures, such as a picture from the Web. The earliest version was used on the photo tourism project.

Photo Tourism system allows you to interactively browse and explore large, unstructured scene photo collections. The system has an image-based modeling front end that automatically calculates the angle of each photo and the three-dimensional model of the scene and image of the sparse model.

Figure 1. Photo Tourism

Bundler input is a number of images, image features and image matching information, the output is a scene based on these images of the 3D reconstruction model, accompanied by a small number of recognition of the camera and scene geometry information. The system borrows a modified version of the development package, called the sparse bundle adjustment, provided by Lourakis and Argyros, which rebuilds the image scene incrementally at 1.1 points. Bundler has been successfully used in many Web album systems, especially in some architectural albums.

Two. The process is as follows:

1. Visit http://www.cs.cornell.edu/~snavely/bundler/download Bundler-v0.4-source.zip and unzip.

2. Under Windows platform, open the project file in VC + + directory under the Bundler-v0.4-source directory using Visual studio2010: Bundler.sln;

The dependent libraries required for bundler are then compiled sequentially,

There are: 5point, Ann_1.1_char, Cblas, getopt, imagelib, JPEG, Matrix, sba-1.5, Sfm-driver, f2c, Clapack, Cminpack, etc.

When compiling the f2c , you will be given an error that cannot be found with the # include "Sysdep1.h" file and an error indicating that the # include "arith.h" file could not be found.

Workaround : Enter the F2C directory,

1> Change the Sysdep1.h0 file name to Sysdep1.h;

2> Change the Signal1.h0 file name to Signal1.h;

3> Create a new arith.h file, add the following content to the file:

#define IEEE_8087
#define ARITH_KIND_ASL 1
#define Long INT
#define INTCAST (int) (long)
#define Double_align
#define X64_bit_pointers
#define QNAN0 0x0
#define QNAN1 0xfff80000

At this time, compile the f2c, then succeeded.

Next compile keymatchfull and Bundler project, everything goes well. :-)

To achieve dense measurements reconstruction, use the BUNDLE2PMVS and Radialundistort tools provided by bundler to generate the required parameters for dense rebuild Pmvs software.

An "Unknown identifier mkdir" error appears in the Bundle2PMVS.cpp file when compiling Bundlr2pmvs .

Workaround :

1> Add # include <direct.h> at the beginning of the file;

2> replace mkdir with _mkdir as follows:

mkdir (Output_path, 0770);

_mkdir (Output_path);

At this point, Bundle2pmvs compiled successfully.

When compiling Radialundistort , an "unrecognized identifier index" will appear in the RadialUndistort.cpp file and the jpeglib.h cannot be opened.

The workaround :1> changes the code as follows:

Char *space = index (BUF, ");
if (space) *space = 0;

std::string str (BUF);
int space_pos = Str.find (");
str.at (Space_pos) = 0;

Files.push_back (str);

2> Modify the LoadJPEG.cpp header file to #inlcude "Jpeglib.h", and then add the Jpeglib.h path as follows:

At this point, Radialundistort compiled successfully.

3. before successful execution of bundler, we need to do a few steps to prepare for the job:

(1) Copy the required files to the specified directory

After the bundler generation is complete, you need to bundler-v0.4-source\vc++\debug\ Bundler.exe, Bundle2PMVS.exe, KeyMatchFull.exe, RadialUndistort.exe, Jpeg.dll, ann_1.1_char.dll files are all tested in the bundler-v0.4-source\bin\ directory.

(2) Download and install Cygwin

Cygwin is a collection of many free software that was originally developed by Cygnus Solutions to run UNIX class systems on various versions of Microsoft Windows. Because the bundler default is to start bundler by executing shell scripts in a UNIX environment, you need to install Cygwin in a Windows environment to execute shell scripts.

Cygwin: http://cygwin.com/

Installation process for Cygwin:

Figure 10. Select Next

Figure 11. Select the Install from Internet

Figure 12. Select Download Directory

Figure 13. Select connection mode use Internet Explorer Proxy Settings

Figure 14. The warning that pops up here is sure to select OK

Figure 15: Select the desired installation package

Certainly need to use the Devel component, but do not have to install all, select the inside of the four key package installation, in order to enable our installation of the Cygwin can compile the program, we need to install the GCC compiler, by default, GCC will not be installed, we need to select it to install. In order to install GCC, we use the mouse to click on the "Devel" branch in the component list, where there are many components, we must:

Binutils

Gcc

Gcc-mingw

Gdb

Figure 16: Open Devel Branch

Figure 20: Choosing GDB

However, it is important to note that Perl and Python are used for preprocessing in the Bundler program, so it is necessary to select the Devel, Perl, and Python three component libraries during the installation process. There is also the ImageMagick library, which is used to process pictures.

Figure 21. Select the ImageMagick library, under the graphics branch

Figure 22: Select the Perl, Python component library

Figure 23: Installation Complete (time may be longer)

(3) Download feature detector

Bundler recommends using SIFT for feature extraction and can download his sift demo as our detector on the homepage of Sift's author David Lowe. Download page: http://www.cs.ubc.ca/~lowe/keypoints/or click to download: SIFT Demo program (Version 4, July 2005)

When the download is complete, unzip the document and copy the SiftWin32.exe file from the directory to the Bundler-v0.4-source\bin directory.

Figure 24: Feature Detector

(4) Prepare picture

The images that will be analyzed are placed in a directory, and Bundler itself provides two sets of images, respectively, in Bundler-v0.4-source\examples\et and Bundler-v0.4-source\examples\kermit.

(5) Running bundler

Open CYGWIN,CD to the Base_path directory (the directory where your bundler is located, see the Cygwin directive for the location method), and enter the following command:./runbundler.sh examples/et or:./ Runbundler.sh Examples/kermit

./runbundler.sh examples/et   ./runbundler.sh examples/kermit  

  

Figure 27. Results of bundler output (directory bundle)

4. Follow-up work

Most of the bundler output files are named "Bundle_*.out", which we call "bundle files". By default, bundler will output a corresponding bundle file to hold the current state information after each image is analyzed and registered (register), and named in "Bundle_<n>.out" form. When all the files are registered, Bundler will output a final file "Bundle.out". In addition, at the end of each round, a number of files with suffixes named "ply" are generated, which contain information about the reconstructed camera and points. These ply files can be viewed by using a dedicated viewer scanalyze with the address: http://graphics.stanford.edu/software/scanalyze/. Of course, can also be viewed through MeshLab, as: http://meshlab.sourceforge.net/.

The sparse point Cloud (pointclouds) data can be obtained by using bundler. If you need to get more dense points, you can use Yasutaka Furukawa to write another very powerful package called PMVS2, download: http://grail.cs.washington.edu/software/pmvs/. A more common approach is to use bundler to get camera parameters, then use the BUNDLE2PMVS program to convert the resulting results to PMVS2 input, and then use PMVS2 to get a more dense point cloud. In addition, readers may be interested in another utility--cmvs, also developed by Dr. Furukawa, CMVs is a scene clustering program that can be used for preprocessing before using PMVS2, and download:/http grail.cs.washington.edu/software/cmvs/.

Transferred from: http://m.blog.csdn.net/blog/u010069101/23294019#

"Go" Win7 64-bit configuration Bundler-v0.4-source

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.