Skip to content

Commit

Permalink
Merge commit 'c1f2b420a236a993ee068124548985c7d29e6d7c'
Browse files Browse the repository at this point in the history
  • Loading branch information
paulinus committed Mar 18, 2015
2 parents e3dda45 + c1f2b42 commit 54565e8
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Be sure to update your `PYTHONPATH` to include `/usr/local/lib/python2.7/site-pa

1. [OpenCV][] - Install by following the steps in the Ubuntu OpenCV [installation guide](https://help.ubuntu.com/community/OpenCV). An alternative instruction tested for Ubuntu 10.04 can be found at [OpenCV Docs](http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html). OpenCV requires [GCC](https://gcc.gnu.org/) and [CMake](http://www.cmake.org/) among other things.

2. [Ceres solver][] - Build Ceres according the [documentation](http://ceres-solver.org/building.html). Make sure to read the Linux note, follow the shared library instructions and compile Ceres with the -fPIC option. Install Ceres from the ceres-bin directory after `make` by:
2. [Ceres solver][] - Build Ceres according the [documentation](http://ceres-solver.org/building.html). Make sure to read the Linux note, follow the **shared library** instructions and compile Ceres with the -fPIC option. Install Ceres from the ceres-bin directory after `make` by:

sudo make install

Expand All @@ -49,7 +49,7 @@ Be sure to update your `PYTHONPATH` to include `/usr/local/lib/python2.7/site-pa

## Building

python setup.py build
python2 setup.py build


## Running
Expand Down
2 changes: 1 addition & 1 deletion bin/detect_features
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
import os.path, sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))

Expand Down
2 changes: 1 addition & 1 deletion bin/focal_from_exif
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python2
import os.path, sys
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))

Expand Down
11 changes: 10 additions & 1 deletion opensfm/src/csfm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,22 @@
#include "akaze.cc"
#include "bundle.h"

#if (PY_VERSION_HEX < 0x03000000)
static void numpy_import_array_wrapper()
#else
static int* numpy_import_array_wrapper()
#endif
{
/* Initialise numpy API and use 2/3 compatible return */
import_array();
}

BOOST_PYTHON_MODULE(csfm) {
using namespace boost::python;

google::InitGoogleLogging("csfm");
boost::python::numeric::array::set_module_and_type("numpy", "ndarray");
import_array();
numpy_import_array_wrapper();


enum_<DESCRIPTOR_TYPE>("AkazeDescriptorType")
Expand Down
4 changes: 2 additions & 2 deletions opensfm/src/third_party/libmv/tools/tool.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ namespace libmv {

inline void Init(const char *usage, int *argc, char ***argv) {
google::InitGoogleLogging((*argv)[0]);
google::SetUsageMessage(std::string(usage));
google::ParseCommandLineFlags(argc, argv, true);
gflags::SetUsageMessage(std::string(usage));
gflags::ParseCommandLineFlags(argc, argv, true);
}

} // namespace libmv
Expand Down

0 comments on commit 54565e8

Please sign in to comment.