Giter Site home page Giter Site logo

mapillary / opensfm Goto Github PK

View Code? Open in Web Editor NEW
3.2K 147.0 835.0 90.21 MB

Open source Structure-from-Motion pipeline

Home Page: https://www.opensfm.org/

License: BSD 2-Clause "Simplified" License

Python 38.19% Shell 0.13% C++ 21.55% CMake 2.61% JavaScript 35.16% HTML 2.10% Dockerfile 0.02% CSS 0.21% Batchfile 0.01%
opencv python sfm 3d-reconstruction

opensfm's Introduction

OpenSfM Docker workflow

Overview

OpenSfM is a Structure from Motion library written in Python. The library serves as a processing pipeline for reconstructing camera poses and 3D scenes from multiple images. It consists of basic modules for Structure from Motion (feature detection/matching, minimal solvers) with a focus on building a robust and scalable reconstruction pipeline. It also integrates external sensor (e.g. GPS, accelerometer) measurements for geographical alignment and robustness. A JavaScript viewer is provided to preview the models and debug the pipeline.

Checkout this blog post with more demos

Getting Started

License

OpenSfM is BSD-style licensed, as found in the LICENSE file. See also the Facebook Open Source Terms of Use and Privacy Policy

opensfm's People

Contributors

andreasg123 avatar arash-hacker avatar bdholt1 avatar bensaxby avatar bryanibit avatar dodgyspaniard avatar edgarriba avatar fabianschenk avatar gerhardneuhold avatar gfloros avatar jesolem avatar jonasdlindner avatar kachayev avatar kielnino avatar kolen avatar ktuite avatar mlopezantequera avatar mribbons avatar oscarlorentzon avatar paulinus avatar pierotofy avatar r-barnes avatar russkel avatar saijin-naib avatar summitbri avatar svenkreiss avatar tobias-o avatar yannoun avatar ybkuang avatar zfb132 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opensfm's Issues

Work Flow through these functions in OpenSFM?

Hi,
you did a mazing job. I do want to learn your project, not only about how to use it, but how to build it.
I have learned the basic algorithms in SFM, but more detail I want to understand. Your project give me a good example. Do you have a work flow to show how these functions are connected?

I can see some of them, but not all of them.

Thanks,
realhire

Handle flat scenes

There should be a reconstruction initialization for scenes that are flat. Right now, flat scenes get no reconstruction because the homography test discards all possible starting pairs.

For flat scenes, there should be reconstruction bootstrapper that uses the plane homography and not the 5 point algo to compute the initial two-view reconstruction.

See here OpenDroneMap/ODM#228 for an example of flat scene that fails to build.

Help about the opensfm module can not be found

Hi, @paulinus

I am a new one about the python and I have a problem when I try to run the OpenSfM on Windows.
The command like this

python ./bin/opensfm detect_features data/lund/

and it showed me

ImportError: No module named opensfm
file, path_name, etc = imp.find_module(main_name, dirs)
ImportError: No module named opensfm
Traceback (most recent call last):
File "", line 1, in
File "D:\python27\lib\multiprocessing\forking.py", line 380, in main
Traceback (most recent call last):
prepare(preparation_data)
File "", line 1, in
File "D:\python27\lib\multiprocessing\forking.py", line 503, in prepare
File "D:\python27\lib\multiprocessing\forking.py", line 380, in main
file, path_name, etc = imp.find_module(main_name, dirs)
prepare(preparation_data)
ImportError File "D:\python27\lib\multiprocessing\forking.py", line 503, in pre
pare
: No module named opensfm
forrtl: error (200): program aborting due to control-C event
Image PC Routine Line Source

kernel32.dll 00000000771E4B93 Unknown Unknown Unknown
kernel32.dll 00000000771A59ED Unknown Unknown Unknown
ntdll.dll 00000000773DB371 Unknown Unknown Unknown
file, path_name, etc = imp.find_module(main_name, dirs)
ImportError: No module named opensfm

I have built the csfm.pyd on Windows, and I run
python setup.py build
and
python setup.py install
to install the opensfm to the site-packages
Then I tried to find_module
>>> imp.find_module(cv)

Traceback (most recent call last):
File "", line 1, in
NameError: name 'cv' is not defined

>>> imp.find_module('cv')

(<open file 'D:\python27\DLLs\cv.py', mode 'U' at 0x0000000002362420>, 'D:\p
ython27\DLLs\cv.py', ('.py', 'U', 1))

>>> imp.find_module('opensfm')

(None, 'opensfm', ('', '', 5))

>>> imp.find_module('csfm')

(<open file 'D:\python27\DLLs\csfm.pyd', mode 'rb' at 0x0000000002362420>, 'D
:\python27\DLLs\csfm.pyd', ('.pyd', 'rb', 3))

Issue a release for odm-2 branch

Would you mind creating a release for the odm-2 branch? I'm trying to have better control over the download step here, so having a release for that branch will prevent the need to update the MD5 hash after an update.

Does export_pmvs still work?

Just wondering if export_pmvs is still functioning correctly from the latest master? Should I expect a reasonable result from the Berlin dataset? Perhaps this is a question for @ktuite .

I was able to run it but the resulting pointcloud seemed a bit abstract.

Segfault in "from opensfm import features"

I've tried to run the data/berlin sample set using run_all but python is segfaulting. I've narrowed down the segfault to the bin/detect_features script and the "from opensfm import features" line. Has anyone run into this before? I've tried recompiling boost, boost-python, and python from brew but it hasn't seemed to help. Thanks..

Process: Python [6959]
Path: /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python
Identifier: Python
Version: 2.7.9 (2.7.9)
Code Type: X86-64 (Native)
Parent Process: bash [6948]
Responsible: Terminal [72136]
User ID: 501

Date/Time: 2015-02-01 13:38:40.212 -0500
OS Version: Mac OS X 10.10.2 (14C81h)
Report Version: 11
Anonymous UUID: 452BF5B4-A444-1CDB-099A-7EE699353D69

Sleep/Wake UUID: 1C147409-D276-4DB7-85BC-A0E8E8801C75

Time Awake Since Boot: 130000 seconds
Time Since Wake: 5800 seconds

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000

VM Regions Near 0:
-->
__TEXT 0000000101e84000-0000000101e86000 [ 8K] r-x/rwx SM=COW /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 ??? 000000000000000000 0 + 0
1 org.python.python 0x00000001043310dd PyEval_GetGlobals + 23
2 org.python.python 0x000000010434062b PyImport_Import + 137
3 org.python.python 0x000000010433ed27 PyImport_ImportModule + 31
4 csfm.so 0x00000001041d37b9 init_module_csfm() + 57
5 libboost_python-mt.dylib 0x0000000104250fd1 boost::python::handle_exception_impl(boost::function0) + 81
6 libboost_python-mt.dylib 0x0000000104252016 boost::python::detail::init_module(char const_, void (_)()) + 118
7 org.python.python 0x0000000101f2a2f7 PyImport_LoadDynamicModule + 140
8 org.python.python 0x0000000101f29fdf import_submodule + 270
9 org.python.python 0x0000000101f29ba9 load_next + 280
10 org.python.python 0x0000000101f27db1 PyImport_ImportModuleLevel + 1135
11 org.python.python 0x0000000101f0d403 builtin___import
_ + 135
12 org.python.python 0x0000000101e9819a PyObject_Call + 99
13 org.python.python 0x0000000101f17db3 PyEval_CallObjectWithKeywords + 93
14 org.python.python 0x0000000101f1408d PyEval_EvalFrameEx + 8375
15 org.python.python 0x0000000101f11da2 PyEval_EvalCodeEx + 1409
16 org.python.python 0x0000000101f1181b PyEval_EvalCode + 54
17 org.python.python 0x0000000101f2685e PyImport_ExecCodeModuleEx + 241
18 org.python.python 0x0000000101f2953e load_source_module + 1091
19 org.python.python 0x0000000101f29fdf import_submodule + 270
20 org.python.python 0x0000000101f29e0b ensure_fromlist + 330
21 org.python.python 0x0000000101f27e71 PyImport_ImportModuleLevel + 1327
22 org.python.python 0x0000000101f0d403 builtin___import__ + 135
23 org.python.python 0x0000000101e9819a PyObject_Call + 99
24 org.python.python 0x0000000101f17db3 PyEval_CallObjectWithKeywords + 93
25 org.python.python 0x0000000101f1408d PyEval_EvalFrameEx + 8375
26 org.python.python 0x0000000101f11da2 PyEval_EvalCodeEx + 1409
27 org.python.python 0x0000000101f1181b PyEval_EvalCode + 54
28 org.python.python 0x0000000101f318ca run_mod + 53
29 org.python.python 0x0000000101f3196d PyRun_FileExFlags + 133
30 org.python.python 0x0000000101f3150a PyRun_SimpleFileExFlags + 769
31 org.python.python 0x0000000101f42c83 Py_Main + 3051
32 libdyld.dylib 0x00007fff8fe295c9 start + 1

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x00000001043df2d8 rbx: 0x0000000104843030 rcx: 0x1400a342832a8400 rdx: 0x0000000104846050
rdi: 0x0000000000000000 rsi: 0x00000001043730d7 rbp: 0x00007fff5dd7a7e0 rsp: 0x00007fff5dd7a7d8
r8: 0x0000000000000001 r9: 0x0000000000000000 r10: 0x0000000000000002 r11: 0x00000001048440b4
r12: 0x0000000104843030 r13: 0x00007ff77191fa00 r14: 0x0000000000000000 r15: 0x0000000000000000
rip: 0x0000000000000000 rfl: 0x0000000000010206 cr2: 0x0000000000000000

Logical CPU: 0
Error Code: 0x00000014
Trap Number: 14

Extension to equirectangular images

There are some modules extended for equirectangular images in the source code.
I am really interested in sfm using panoramic images.
Is there any plan to release a whole sfm system for equirectangular images in the future, or is it already possible to perform sfm for equirectangular images?

GPS position prior

OpenSfM seems to load GPS DOP values but as far as I can see, it never actually uses them. In bundle.h the lines that add a GPS position prior to the bundle adjustment objective function are commented out. Here, the DOP is used as the standard deviation which makes sense (lower DOP value -> more reliable GPS -> penalise deviation from GPS more heavily).

Is there any reason why the GPS position prior is commented out? On a dataset with reliable GPS, is it a good idea to uncomment these lines and add the GPS DOP values to the image EXIF data?

When building OpenGV, python cannot be enabled

When building OpenGV, I use the command below:

cmake .. -DBUILD_TESTS=OFF -DBUILD_PYTHON=ON

and it says that the option BUILD_PYTHON is ignored.

I know this is not specifically an OpenSfM problem, but the person in charge of OpenGV won't respond. Has anyone else had trouble getting OpenGV python bindings working? It seems like it's impossible to use OpenSfM without them.

Pixel bearing function is slow

Since the use of OpenGV for geometric solvers, we are converting very often from pixel position to pixel bearings. The current implementation of that conversion (https://github.com/mapillary/OpenSfM/blob/master/opensfm/multiview.py#L422) is pretty slow.

The main reason is that it is extracting the camera parameters from the dictionary for each pixel.

This could be speed up by creating a camera class that stores this parameters and has a pixel_bearing method. The class could implemented in C++ if needed.

Camera Intrinsic

Hello, I wonder to know how to get the camera Intrinsic matrix in reconstruction.json
Thanks!

Is it possible for OpenSFM to be used in image stitching

Hi,
I use OpenCV to obtain mosaic images, and the there is an example module named stitching in OpenCv to mosaic images. But the problem is that the bundle adjustment functions (BundleAdjusterReproj ) used in OpenCV is time-consuming. So, Is it possible for me to used the OpenSFM to replace BundleAdjusterReproj to improve the performance.

By the way, I am one of the Open Drone Map user, but what is need is just an mosaic image without any geolocation information, the speed of the process is the most important factor.

How to get the camara center position?

Thanks for developing this tool,it's awesome. I recently have trouble to get the camera center position
(x, y, z), When I open reconstruction.meshed.json, I couldn't find where it is. Is the position information stored in the json file or something else??

Gpu implementation

Hi,

What do you think about using the GPU during the matching process or BA? That could a nice improvement in terms of speed.

setup.py error - Compiling with SSE2 enabled, but no __SSE2__ defined

I've followed all the steps from the Dockerfile. The final step: python setup.py build/ is giving me this error:
/source/OpenSfM/opensfm/src/third_party/vlfeat/vl/imopv_sse2.c:15:2: error: #error "Compiling with SSE2 enabled, but no SSE2 defined"
#error "Compiling with SSE2 enabled, but no SSE2 defined"
^
In file included from /source/OpenSfM/opensfm/src/third_party/vlfeat/vl/imopv_sse2.c:22:0:
/usr/lib/gcc/i686-linux-gnu/4.8/include/emmintrin.h:31:3: error: #error "SSE2 instruction set not enabled"

error "SSE2 instruction set not enabled"

I've enabled SSE2 and SSE3 by adding a line in the CMakeLists.txt
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse -msse2 -msse3")

Building on OS X 10.9 fails at "python setup.py build_ext --inplace"

running build_ext
building 'opensfm.csfm' extension
/usr/bin/clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/lib/python2.7/site-packages/numpy/core/include -I/usr/local/include/eigen3 -Iopensfm/src/third_party -Iopensfm/src/third_party/akaze/lib -Iopensfm/src/third_party/vlfeat -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c opensfm/src/csfm.cc -o build/temp.macosx-10.6-intel-2.7/opensfm/src/csfm.o -std=c++11
In file included from opensfm/src/csfm.cc:12:
In file included from opensfm/src/bundle.h:12:
In file included from /usr/local/include/ceres/ceres.h:37:
In file included from /usr/local/include/ceres/autodiff_cost_function.h:134:
In file included from /usr/local/include/ceres/sized_cost_function.h:41:
In file included from /usr/local/include/ceres/types.h:42:
/usr/local/include/ceres/internal/port.h:62:7: error: no member named 'shared_ptr' in namespace 'std'; did you mean 'boost::shared_ptr'?
using std::shared_ptr;
^~~~~
/usr/local/include/boost/smart_ptr/shared_ptr.hpp:722:36: note: 'boost::shared_ptr' declared here
template friend class shared_ptr;
^
1 error generated.
error: command '/usr/bin/clang' failed with exit status 1

RuntimeError: module compiled against API version a but this version of numpy is 9

Dear all,

I followed all the instructions to compile and build OpenSfm, but now I'm stuck at the last step.

If I run the command: bin/run_all data/berlin

It gives me the following error:

RuntimeError: module compiled against API version a but this version of numpy is 9
Traceback (most recent call last):
  File "/Applications/XAMPP/htdocs/OpenSfM-master/OpenSfM-master/bin/opensfm", line 10, in <module>
    from opensfm import commands
  File "/Applications/XAMPP/htdocs/OpenSfM-master/OpenSfM-master/opensfm/commands/__init__.py", line 2, in <module>
    import extract_metadata
  File "/Applications/XAMPP/htdocs/OpenSfM-master/OpenSfM-master/opensfm/commands/extract_metadata.py", line 5, in <module>
    from opensfm import dataset
  File "/Applications/XAMPP/htdocs/OpenSfM-master/OpenSfM-master/opensfm/dataset.py", line 10, in <module>
    import cv2
ImportError: numpy.core.multiarray failed to import

I downgraded numpy from 1.11.0 to 1.9.3 but nothing changed.

Any advice is more than welcome ;-)

I'll paste here the python setup.py build log:

Configuring...
-- Try OpenMP C flag = [-fopenmp=libomp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp=libomp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Could NOT find OpenMP (missing:  OpenMP_C_FLAGS OpenMP_CXX_FLAGS) 
-- A library with BLAS API found.
-- A library with LAPACK API found.
-- A library with BLAS API found.
-- Found AMD library: /usr/local/lib/libamd.dylib
-- Found AMD header in: /usr/local/include
-- Found CAMD library: /usr/local/lib/libcamd.dylib
-- Found CAMD header in: /usr/local/include
-- Found COLAMD library: /usr/local/lib/libcolamd.dylib
-- Found COLAMD header in: /usr/local/include
-- Found CCOLAMD library: /usr/local/lib/libccolamd.dylib
-- Found CCOLAMD header in: /usr/local/include
-- Found CHOLMOD library: /usr/local/lib/libcholmod.dylib
-- Found CHOLMOD header in: /usr/local/include
-- Found SuiteSparseQR library: /usr/local/lib/libspqr.dylib
-- Found SuiteSparseQR header in: /usr/local/include
-- Found Intel Thread Building Blocks (TBB) library: /usr/local/lib/libtbb.dylib, assuming SuiteSparseQR was compiled with TBB.
-- Found Intel Thread Building Blocks (TBB) Malloc library: /usr/local/lib/libtbbmalloc.dylib
-- Found SuiteSparse_config library: /usr/local/lib/libsuitesparseconfig.dylib
-- Found SuiteSparse_config header in: /usr/local/include
-- Found METIS library: /usr/local/lib/libmetis.dylib.
-- Boost version: 1.60.0
-- Found the following Boost libraries:
--   python
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   csfm

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Applications/XAMPP/xamppfiles/htdocs/OpenSfM-master/OpenSfM-master/cmake_build
Compiling extension...
[ 11%] Built target akaze
[ 95%] Built target vl
[100%] Built target csfm
Building package
running build
running build_py

here my pip list:

decorator (4.0.9)
ExifRead (2.1.2)
gpxpy (1.1.1)
networkx (1.11)
nose (1.3.7)
numpy (1.9.3)
pip (8.1.1)
py (1.4.31)
pytest (2.9.1)
PyYAML (3.11)
setuptools (19.4)
Shapely (1.5.13)
vboxapi (1.0)
wheel (0.26.0)
xmltodict (0.10.1)

and I'm running on OSX 10.11.4 El Capitan.

Thank you for your support and for any advice.
Best,
Michele

Testing with a set of images. Not sure about result.

I'm testing with 5 images of a mouse:
Here is the result picture: I'm hoping to see the shape of the mouse. I'm using the same config.yaml as the berlin dataset. Should I change the config.yaml to get a better result? Thanks, -michael

screen shot 2015-05-23 at 5 42 30 pm

The 5 images are:
img_0482
img_0483
img_0484
img_0485
img_0486

Suggestion about the export

Hi,
The current version of the OpenSfM can work both on Linux and Windows well, and it's really a nice SfM tool.
However, due to lack of export tools to convert the SfM results to other Multi-View Stereo reconstruction software, such as OpenMVS MVE/MVS texturing, the usability of the OpenSfM is limited. Now, only the CMVS/PMVS interface was developed.
Hence, I suggest that more export tools should be created to make the OpenSfM work with other software well. Thanks.

opensfm vs visualsfm

I recently used visualsfm a little. It's pretty good. It's free but not open source.

Is opensfm geared to compete with visualsfm? or opensfm has a different focus?

Thanks,
-michael

camera_model_overrides

focal_from_exif line 55
from
for key, value in camera_models_overrides:

to
for key, value in camera_models_overrides.items():

Add documentation

Both an overview and a reference should be added

  • Pipeline overview
  • Reference from docstrings

match_features: has_gps_info not reading gps info

I have a photoset that is georeferenced but am getting this warning when trying to run match_features:
WARNING:__main__:Not all images have GPS info. Disabling matching_gps_neighbors.
It comes from this part of the code:
https://github.com/mapillary/OpenSfM/blob/master/bin/match_features#L48

The call all(map(has_gps_info, exifs)) is returning false, even though all the photos have gps exif tags. I can't figure out exactly what is going on, but I think map() is not properly passing the exifs dictionary to has_gps_info

A set of sample images that will produce good results

Do you guys have a set of images that will produce some good results? I have tried some of my images, and it couldn't produce the reconstruction. I really want to try some sample images that will produce good results.

Thanks,
-michael

False robust matching inliers.

I have made an investigation into the epipolar geometry connected to the robust matching and how it affects the final reconstruction. The result suggests that there is a probability for the robust matching to include false inliers which will not be excluded further down the pipeline. The result applies to tracks with a length of two when growing a reconstruction by resection and is therefore certainly an edge case. All tests have been run using the default configuration values and SIFT features for the Berlin data set.

RANSAC Fundamental matrix estimation

When running the RANSAC fundamental matrix estimation any symmetric match satisfying the epipolar geometry will be regarded as an inlier. To get an idea of the probability of false inliers the estimation can be run many times. After each run a homography can be estimated and matches whose mapping error are above a certain threshold can be chosen as false inliers.

The following shows the result when running the fundamental matrix estimation 1000 times for the symmetric matches of images 01.jpg and 03.jpg. Fundamental matrix inliers with homography mapping error larger than a threshold of 0.3 are plotted with red on top of an example set of green inliers. Below, the epipolar lines and epipoles for all estimated fundamental matrices where a false inlier was included are shown. The false inlier observations are also plotted:

figure_1

The homography was calculated using the default config threshold of 0.006. The number of false inliers for 1000 runs where 397 and the number of times at least one false inlier appeared where 354.

The following match was chosen for further studies:

figure_4

Specifically, the results for the feature point in the right image, 03.jpg, will be studied in more detail.

Inlier probability when shifting coordinates

To get an idea of the influence of the position of the match in an area close to the epipolar line the observation coordinates for one of the images can be shifted before fundamental matrix estimation.

The observation coordinates for the image on the left above, 01.jpg, have been kept fixed and the coordinates for the image on the right, 03.jpg, have been moved. For each new point correspondence the fundamental matrix estimation have been run 100 times and the probability for each point correspondence to be an inlier of the estimation can be seen below. Each row consists of 100 points with about 10 pixels between each point. The colors correspond to the following probabilities:

  • Black: < 0.02
  • Blue: < 0.05
  • Magenta < 0.1
  • Red: < 0.15
  • Yellow: < 0.25
  • White: > 0.25

figure_8

The same probabilities as a bar plot without the underlying image:

figure_9

It can be seen that the probability peeks with a probability of almost 1.0 around the true matching point. Along the epipolar line the probability is more uniform and broader without any peaks.

Choosing the row of points containing the original observation the result is shown below:

figure_12

As a ar plot:

figure_13

The original point corresponds to the bar at position 46. It can be seen that the probability is quite stable between bar 30 and 80 with the probability mostly in the interval [0.05, 0.1]. These bars correspond to a width of about 500 pixels.

Reconstruction inlier probability

Continuing with the row containing the original observation point, it is interesting to determine the probability for each point to be included in the final reconstruction given that it has been included in the robust matching and therefore the tracks. To do this a complete matching for all images can be performed in a loop until the chosen correspondence is included. After that a complete reconstruction for the matches (and therefore tracks) including the false inlier match can be performed a number of times. It can then be verified how many times the track were included in the final reconstruction.

To do this the matching was run 100 times for each point. If the correspondence were included for one of the matching iterations, the matching was stopped and 100 reconstructions for that match set were run. If the correspondence were not included after 100 matching iterations no reconstructions were run. When running the reconstruction the image pair 01.jpg - 02.jpg were always chosen as the initial image pair by the bootstrapping which means that the result of the test only apply to growing a reconstruction. No tests have been performed on the false inlier probability for the initial two view reconstruction.

The results are shown below with the colors corresponding to the following probabilites:

  • Black: < 0.01
  • Blue: < 0.1
  • Magenta < 0.2
  • Red: < 0.3
  • Yellow: < 0.4
  • White: > 0.4

figure_16

As a bar plot:

figure_17

It can be seen that the probability is in the interval [0.2, 0.65] for the bars at positions from 30 to 43 which corresponds to a width of 130 pixels. The probability for the original observation (the bar at position 46) is a little less. Most of the points of correspondences with bars at positions 0-20 and 80-100 were not included by the matching and therefore the reconstruction were not run for theses points.

The points with bars at postion 27, 28 and 32 were included in a matching iteration. These points and the peaks for points at positions 61 and 70 suggest that the reconstruction inlier probability is largely affected by the rest of the included matches. The most important factor along the pipeline is the result of the resection algorithm since that determines whether the triangulation of the false match will succeed. The result indicate that the resection is favorable for the points corresponding to bars at poistion 30 - 43 but that the instability mentioned above can cause unexpected peaks and lows.

Visualization of included false inlier

Using a reconstruction where the original observation was included the result can be visualized.

The epipolar geometry for the match based on the reconstruted camera matrices is shown below. It can be noted that the point for image 03.jpg is 57 pixels from the epipolar line whereas the reprojection error is only 1.3 pixels. This suggests that once the match is included in the resection the bundle adjustment will tend to minimize the reprojection error regardless of the actual epipolar geometry.

figure_20_track_293_sift_epipolar_undist_1

The track rays:

figure_25

From another angle:

figure_26

The image below shows the meshed reconstruction for image 01.jpg:

figure_30_01_test

The meshed reconstruction for 03.jpg:

figure_35_03_test

The false inlier match is clearly visible as the conic to the point closest to the camera for 03.jpg in the images above. The result when viewing the image from the position of the camera for 03.jpg is satisfying because of the epipolar geometry:

figure_40_03-opt_center

It is only when navigating to and from the images with the false inlier that the conic is visible and the behavior is non perfect. Below is a transition from 02.jpg to 03.jpg:

figure_45_03_test_transition_marked

Summary

  • This test only applies to tracks of length two. For tracks including a false robust match with more than two connected images the probability of inclusion in the reconstruction will be considerably lower since the epipolar geometry must be satisfied for all correspondences during triangulation.
  • Only false robust matches for images used when growing reconstructions have been tested. When doing large reconstructions, a large part of the images will be included through resection so this is the most probable way and therefor the most important to test.
  • The reconstruction is also very small. No tests have been conducted on a reconstruction with a large amount of images. The statistics for the number of tracks that have a length of two in larger reconstructions is also important.
  • The probabilty of inclusion for points on the row containing the original observation was around 0.05 for a width of 500 pixels. Once included in the matches the probability was shown to be up to 0.6 for an interval of 150 pixels. The combined probability is at most 0.03 for this particular correspondence. While this probability is quite small, with a large amount of images it will certainly happen from time to time.
  • No complete tests have been carried out with other feature types than SIFT but running the initial fundamental matrix estimation test indicates that similar false inliers arises, although not with the same frequence as for SIFT.
  • The test used only a false inlier for which the correspondance was clearly false. False inliers that are closer to the true point correspondence can also exist.

Conclusion

While the robust matches are robust in an epipolar sense they are maybe not robust enough in a general reconstruction sense if having a small probability of false inliers is seen as a problem. The result is an edge case but the knowledge of it can maybe be good for the understanding of certain results.

The code (which is very specific to the chosen correspondence) is available on a branch. It is not intended to be PR-able...

eval_frac function doesn't check for divide by zero

The code is here: https://github.com/mapillary/OpenSfM/blob/odm-2/opensfm/exif.py#L21

One of our users posted an issue in our email list, and while I wait for them to document the issue more thoroughly and post to ODM's issue queue I thought I would jump the gun over here. The user was using ODM via Docker, so maybe the core issue is on our side, but it's still passing 0 to the denominator.

Copy of the email below:


Today was my first experience running ODM with Docker and I ran into the following error:

[DEBUG]   running PYTHONPATH=/code/SuperBuild/install/lib/python2.7/dist-packages /code/SuperBuild/src/opensfm/bin/run_all /images/opensfm
2016-06-21 22:27:08,640 Extracting focal lengths for image DJI_0160.JPG
Traceback (most recent call last):
  File "/code/SuperBuild/src/opensfm/bin/focal_from_exif", line 27, in <module>
    d = exif.extract_exif_from_file(data.load_image(image))
  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 88, in extract_exif_from_file
    d = exif_data.extract_exif()
  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 238, in extract_exif
    focal_35, focal_ratio = self.extract_focal()
  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 169, in extract_focal
    get_frac_tag(self.tags, 'EXIF FocalLength'),
  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 41, in get_frac_tag
    return eval_frac(tags[key].values[0])
  File "/code/SuperBuild/src/opensfm/opensfm/exif.py", line 21, in eval_frac
    return float(value.num) / float(value.den)
ZeroDivisionError: float division by zero
[ERROR]   quitting cause: 
PYTHONPATH=/code/SuperBuild/install/lib/python2.7/dist-packages /code/SuperBuild/src/opensfm/bin/run_all /images/opensfm
returned with code 256.

I was manually forcing the focal and ccd params with the following command:

docker run -v $IMAGES:/images opendronemap:latest --force-focal 3.5 --force-ccd 6.17
Any insight how to get around this? I've run ODM successfully many times on my VM, but Docker seems to have stopped me.

IOError: [Errno 2] No such file or directory: 'data/*/reconstruction.json'

Using the provided Dockerfile, a docker image was created. I then followed the instructions from the main page.

root@7f41108d41c4:/source/OpenSfM# bin/run_all data/DS_2/
2016-04-17 13:37:57,367 Matching 0 image pairs
2016-04-17 13:37:57,800 reading features
2016-04-17 13:37:57,800 Merging features onto tracks
2016-04-17 13:37:57,800 Good tracks: 0
images 0
nonfisheye images 0
0 partial reconstructions in total.
Traceback (most recent call last):
File "/source/OpenSfM/bin/opensfm", line 34, in
command.run(args)
File "/source/OpenSfM/opensfm/commands/mesh.py", line 22, in run
reconstructions = data.load_reconstruction()
File "/source/OpenSfM/opensfm/dataset.py", line 289, in load_reconstruction
with open(self.__reconstruction_file(filename)) as fin:
IOError: [Errno 2] No such file or directory: 'data/DS_2/reconstruction.json'

building OpenSFM on Windows

Hi, I tried to build the full Open Drone Map (ODM) on Windows [https://github.com/OpenDroneMap/ODM/issues/247], and the Meshing, Texture, UTM and ortho modules have been built successful. Besides, pmvs(cmvs) are available on official website. So, the last problem is to build OpenSFM on Windows. I have tried to make OpenSFM works on Windows, but failed.
I wonder is it possible to make the OpenSFM runs on windows without big changes?

make opengv fail

Scanning dependencies of target opengv
[ 0%] Building CXX object CMakeFiles/opengv.dir/src/absolute_pose/modules/main.o
/source/opengv/src/absolute_pose/modules/main.cpp: In function ‘void opengv::absolute_pose::modules::upnp_main_sym(const Eigen::Matrix<double, 10, 10>&, const Eigen::Matrix<double, 1, 10>&, double, std::vector<std::pair<double, Eigen::Matrix<double, 4, 1> >, Eigen::aligned_allocator<std::pair<double, Eigen::Matrix<double, 4, 1> > > >&)’:
/source/opengv/src/absolute_pose/modules/main.cpp:800:10: warning: unused variable ‘imagThreshold’ [-Wunused-variable]
double imagThreshold = 0.01;
^
/source/opengv/src/absolute_pose/modules/main.cpp:803:43: warning: variable ‘D’ set but not used [-Wunused-but-set-variable]
Eigen::Matrixstd::complex<double,8,1> D = Eig.eigenvalues();
^
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See file:///usr/share/doc/gcc-4.8/README.Bugs for instructions.
make[2]: *** [CMakeFiles/opengv.dir/src/absolute_pose/modules/main.o] Error 4
make[1]: *** [CMakeFiles/opengv.dir/all] Error 2
make: *** [all] Error 2

Add Ground Control Points support

There should be an option to use GCP while reconstructing. This should be used when aligning the reconstruction and during bundle adjustment.

Ceres parameter block added with same double pointer

I pulled the head recently and am seeing the following error:

F0930 15:49:03.158898 2057392896 problem_impl.cc:103] Check failed: size == existing_size Tried adding a parameter block with the same double pointer, 0x102980ac8, twice, but with different block sizes. Original size was 5 but new size is 3
*** Check failure stack trace: ***
@ 0x1052c5146 google::LogMessage::Fail()
@ 0x1052c4933 google::LogMessage::SendToLog()
@ 0x1052c4e79 google::LogMessage::Flush()
@ 0x1052c76d5 google::LogMessageFatal::~LogMessageFatal()
@ 0x1052c544d google::LogMessageFatal::~LogMessageFatal()
@ 0x10538e741 ceres::internal::ProblemImpl::InternalAddParameterBlock()
@ 0x105390525 ceres::internal::ProblemImpl::AddResidualBlock()
@ 0x1053911f9 ceres::internal::ProblemImpl::AddResidualBlock()
@ 0x105189242 BundleAdjuster::Run()
@ 0x1051953fd boost::python::objects::caller_py_function_impl<>::operator()()
@ 0x1055e831a boost::python::objects::function::call()
@ 0x1055ea48a boost::detail::function::void_function_ref_invoker0<>::invoke()
@ 0x1055f1391 boost::python::handle_exception_impl()
@ 0x1055e9ef3 boost::python::objects::function_call()
@ 0x10000c7b2 PyObject_Call
@ 0x1000c071d PyEval_EvalFrameEx
@ 0x1000c505b PyEval_EvalFrameEx
@ 0x1000c505b PyEval_EvalFrameEx
@ 0x1000c505b PyEval_EvalFrameEx
@ 0x1000c505b PyEval_EvalFrameEx
@ 0x1000c5ca3 PyEval_EvalCodeEx
@ 0x1000c5dc6 PyEval_EvalCode
@ 0x1000eb17e PyRun_FileExFlags
@ 0x1000eb41a PyRun_SimpleFileExFlags
@ 0x10010248d Py_Main
@ 0x100000f54 start

Has anyone experienced this problem?

Gitter chat room

Is anyone here interested in starting a gitter chat room, mailing list or other, for more informal discussions?

errors running "python setup.py build" on OSX

I got errors at the end for csfm. Here is the full log:
My OSX is Darwin guangs-Mac-mini.local 14.3.0 Darwin Kernel Version 14.3.0: Mon Mar 23 11:59:05 PDT 2015; root:xnu-2782.20.48~5/RELEASE_X86_64 x86_64

Any ideas?
Thanks. -michael

guangs-Mac-mini:openSFM guangli$ python setup.py build
Configuring...
-- The C compiler identification is AppleClang 6.1.0.6020049
-- The CXX compiler identification is AppleClang 6.1.0.6020049
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Try OpenMP C flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP C flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [ ]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [/openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-Qopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-openmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-xopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [+Oopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-qsmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Try OpenMP CXX flag = [-mp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Failed
-- Could NOT find OpenMP (missing: OpenMP_C_FLAGS OpenMP_CXX_FLAGS)
-- Looking for dgemm_
-- Looking for dgemm_ - found
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- A library with BLAS API found.
-- Looking for cheev_
-- Looking for cheev_ - found
-- A library with LAPACK API found.
-- A library with BLAS API found.
-- Found AMD library: /usr/local/lib/libamd.a
-- Found AMD header in: /usr/local/include
-- Found CAMD library: /usr/local/lib/libcamd.a
-- Found CAMD header in: /usr/local/include
-- Found COLAMD library: /usr/local/lib/libcolamd.a
-- Found COLAMD header in: /usr/local/include
-- Found CCOLAMD library: /usr/local/lib/libccolamd.a
-- Found CCOLAMD header in: /usr/local/include
-- Found CHOLMOD library: /usr/local/lib/libcholmod.a
-- Found CHOLMOD header in: /usr/local/include
-- Found SuiteSparseQR library: /usr/local/lib/libspqr.a
-- Found SuiteSparseQR header in: /usr/local/include
-- Found Intel Thread Building Blocks (TBB) library: /usr/local/lib/libtbb.dylib, assuming SuiteSparseQR was compiled with TBB.
-- Found Intel Thread Building Blocks (TBB) Malloc library: /usr/local/lib/libtbbmalloc.dylib
-- Found SuiteSparse_config library: /usr/local/lib/libsuitesparseconfig.a
-- Found SuiteSparse_config header in: /usr/local/include
-- Did not find METIS library (optional SuiteSparse dependency)
-- Found SuiteSparse: TRUE (found version "4.2.1")
-- Found Eigen: /usr/local/include/eigen3 (found version "3.2.4")
-- Found ceres: /usr/local/lib/libceres.dylib
-- Found Gflags: /usr/local/include
-- Found Glog: /usr/local/include
-- Could NOT find Boost
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.6")
-- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.6")
-- Found NumPy: version "1.9.2" /usr/local/lib/python2.7/site-packages/numpy/core/include
-- Configuring done
CMake Warning (dev):
Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
--help-policy CMP0042" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

MACOSX_RPATH is not specified for the following targets:

csfm

This warning is for project developers. Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/guangli/openSFM/cmake_build
Compiling extension...
Scanning dependencies of target mv
Scanning dependencies of target akaze
Scanning dependencies of target vl
[ 2%] [ 4%] Building CXX object CMakeFiles/akaze.dir/third_party/akaze/lib/AKAZE.cpp.o
Building CXX object CMakeFiles/akaze.dir/third_party/akaze/lib/fed.cpp.o
[ 6%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/aib.c.o
[ 8%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/array.c.o
[ 10%] Building CXX object CMakeFiles/akaze.dir/third_party/akaze/lib/nldiffusion_functions.cpp.o
[ 12%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/covdet.c.o
[ 14%] Building CXX object CMakeFiles/mv.dir/third_party/libmv/multiview/fundamental.cc.o
[ 16%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/dsift.c.o
/Users/guangli/openSFM/opensfm/src/third_party/vlfeat/vl/dsift.c:265:26: warning: using floating point absolute value function 'fabsf' when
argument is of integer type [-Wabsolute-value]
kerIter++ = (1.0F - fabsf(x) / binSize) *
^
/Users/guangli/openSFM/opensfm/src/third_party/vlfeat/vl/dsift.c:265:26: note: use function 'abs' instead
*kerIter++ = (1.0F - fabsf(x) / binSize) *
^~~~~
abs
1 warning generated.
[ 18%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/fisher.c.o
[ 20%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/generic.c.o
[ 22%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/getopt_long.c.o
[ 24%] [ 26%] Building CXX object CMakeFiles/mv.dir/third_party/libmv/multiview/projection.cc.o
Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/gmm.c.o
[ 28%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/hikmeans.c.o
[ 30%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/hog.c.o
[ 32%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/homkermap.c.o
[ 34%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/host.c.o
[ 36%] Building CXX object CMakeFiles/akaze.dir/third_party/akaze/lib/utils.cpp.o
[ 38%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/ikmeans.c.o
[ 40%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/imopv.c.o
[ 42%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/imopv_sse2.c.o
[ 44%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/kdtree.c.o
[ 46%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/kmeans.c.o
Linking CXX static library libakaze.a
[ 46%] Built target akaze
[ 48%] Building CXX object CMakeFiles/mv.dir/third_party/libmv/multiview/five_point.cc.o
[ 50%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/lbp.c.o
[ 52%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/liop.c.o
[ 54%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/mathop.c.o
[ 56%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/mathop_avx.c.o
[ 58%] Building CXX object CMakeFiles/mv.dir/third_party/libmv/multiview/robust_five_point.cc.o
[ 60%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/mathop_sse2.c.o
[ 62%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/mser.c.o
[ 64%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/pgm.c.o
/Users/guangli/openSFM/opensfm/src/third_party/vlfeat/vl/pgm.c:236:18: warning: comparison of constant 65536 with boolean expression is
always false [-Wtautological-constant-out-of-range-compare]
if(! max_value >= 65536) {
~~~~~~~~~~~ ^ ~~~~~
1 warning generated.
[ 66%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/quickshift.c.o
[ 68%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/random.c.o
[ 70%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/rodrigues.c.o
[ 72%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/scalespace.c.o
[ 74%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/sift.c.o
[ 76%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/slic.c.o
[ 78%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/stringop.c.o
[ 80%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/svm.c.o
[ 82%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/svmdataset.c.o
[ 84%] Building C object CMakeFiles/vl.dir/third_party/vlfeat/vl/vlad.c.o
[ 86%] Building CXX object CMakeFiles/mv.dir/third_party/libmv/multiview/triangulation.cc.o
Linking C static library libvl.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libvl.a(mathop_avx.c.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libvl.a(mathop_avx.c.o) has no symbols
[ 86%] Built target vl
[ 88%] Building CXX object CMakeFiles/mv.dir/third_party/libmv/multiview/conditioning.cc.o
[ 90%] Building CXX object CMakeFiles/mv.dir/third_party/libmv/multiview/panography.cc.o
[ 92%] Building CXX object CMakeFiles/mv.dir/third_party/libmv/multiview/panography_kernel.cc.o
[ 94%] Building CXX object CMakeFiles/mv.dir/third_party/libmv/multiview/robust_panography.cc.o
[ 96%] Building CXX object CMakeFiles/mv.dir/third_party/libmv/numeric/numeric.cc.o
[ 98%] Building CXX object CMakeFiles/mv.dir/third_party/libmv/numeric/poly.cc.o
Linking CXX static library libmv.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libmv.a(poly.cc.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: libmv.a(poly.cc.o) has no symbols
[ 98%] Built target mv
Scanning dependencies of target csfm
make[2]: *
* No rule to make target /libboost_python.a', needed by/Users/guangli/openSFM/opensfm/csfm.so'. Stop.
make[2]: *** Waiting for unfinished jobs....
[100%] Building CXX object CMakeFiles/csfm.dir/csfm.cc.o
make[1]: *** [CMakeFiles/csfm.dir/all] Error 2
make: *** [all] Error 2
Building package
running build
running build_py

No such file or directory: 'data/lund/tracks.csv'

Hello,

I tried to run the command of "bin/mesh data/lund" after building OpenSfm successfully. But I met the following issue.

Traceback (most recent call last):
File "bin/mesh", line 22, in
graph = data.load_tracks_graph()
File "/Users/fangru/Downloads/OpenSfm-master/opensfm/dataset.py", line 279, in load_tracks_graph
with open(self.__tracks_graph_file()) as fin:
IOError: [Errno 2] No such file or directory: 'data/lund/tracks.csv'

Could you help me to solve it? Thanks a lot.

Jie

returned with code 256.

I am trying to run Open Drone Map on ubuntu 15.10 and getting the following error

ImportError: cannot import name csfm
b

quitting cause:
PYTHONPATH=/home/ahmadusman/opendronemap/lib/python2.7/dist-packages "/home/ahmadusman/opendronemap/src/OpenSfM/bin/import_bundler" opensfm --list list.txt
returned with code 256.

can anyone help me to resolve this issue

Images with no 'date take' exif data throws exception

Extracting focal lengths for image DJI_0241.JPG
Traceback (most recent call last):
  File "/source/OpenSfM/bin/focal_from_exif", line 49, in <module>
    d = exif.extract_exif_from_file(data.load_image(image))
  File "/source/OpenSfM/opensfm/exif.py", line 87, in extract_exif_from_file
    d = exif_data.extract_exif()
  File "/source/OpenSfM/opensfm/exif.py", line 210, in extract_exif
    capture_time = self.extract_capture_time()
  File "/source/OpenSfM/opensfm/exif.py", line 197, in extract_capture_time
    d = datetime.datetime.strptime(s, '%Y:%m:%d %H:%M:%S')
  File "/usr/lib/python2.7/_strptime.py", line 325, in _strptime
    (data_string, format))
ValueError: time data '' does not match format '%Y:%m:%d %H:%M:%S'
Traceback (most recent call last):
  File "/source/OpenSfM/bin/mesh", line 22, in <module>
    graph = data.load_tracks_graph()
  File "/source/OpenSfM/opensfm/dataset.py", line 280, in load_tracks_graph
    with open(self.__tracks_graph_file()) as fin:
IOError: [Errno 2] No such file or directory: '/data/output/tracks.csv'
done

Simple question about OpenSfM algorithm

Hello. I'm one of OpenDroneMap users, and I want to study and understand the OpenSfM's algorithm exactly. I wonder there is the academic paper or algorithm explanation document about it. I'll also thank you if you suggest some adequate documents for my studying.

CMakeLists.txt libboost_python.a

127 target_link_libraries(csfm "${Boost_LIBRARY_DIR}/libboost_python.a")

should be

127 target_link_libraries(csfm "${Boost_LIBRARY_DIRS}/libboost_python.a")

otherwise it will not complete setup.py

segfault when running detect_features (ubuntu, 14.04 x64)

Hi all,
I cloned from the mainline brnach and I was able to get the project to compile successfully!

Unfortunately when I run:
bin/run_all data/berlin

I get the following output:
~/projects/OpenSfM$ bin/run_all data/berlin Extracting focal lengths for image 01.jpg Extracting focal lengths for image 03.jpg Extracting focal lengths for image 02.jpg Extracting SIFT features for image 01.jpg bin/run_all: line 7: 419 Segmentation fault (core dumped) $DIR/detect_features $1

Thank you for any help you may have.

Orthomosiac Generation

Hi there,

I'm considering adding functionality to OpenSfm to create an orthophoto as it doesn't look like this exists. I was wondering if that would be useful? If there is a partial work I'm happy to build of that or take direction on a suggested approach?

Regards,

Nick

build on OS X 10.10.3 error

Hello,

I've followed the steps to install dependencies via brew but cannot get the build step to work. Here is the error message from the terminal:

Configuring... Traceback (most recent call last): File "setup.py", line 21, in <module> subprocess.Popen(['cmake','../opensfm/src'], cwd='cmake_build').wait() File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 709, in __init__ errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1326, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory

Many thanks in advance!

Consecutive images

Is there any function to process consecutive equirectangular images with loop closing? I am interested in large-scale reconstruction using an omnidirectional camera, however, it takes very long time to calculate matches between all frames.

Datasets with altitude

Thanks for open sourcing this code base!

While I can run the example datasets fine, I'm having trouble with a dataset of a vertical wall. It has GPS altitude in the exif but it's geolocating horizontally instead of vertically. I see a number of points in the code where assumptions are being made about altitude e.g.

https://github.com/mapillary/OpenSfM/blob/master/opensfm/dataset.py#L324
https://github.com/mapillary/OpenSfM/blob/master/opensfm/geo.py#L120
etc

I think this issue could also be important for integration into OpenDroneMap.

Are you planning to support datasets with a significant vertical component? If not, are you able to provide any tips on how to get it working?

Corrected metadata for cameras

Hi there,

Opensfm is a great software and I am able to build a 3D point cloud using it. Here I just have a short question: did you guys generate corrected metadata for cameras (like what they did in bundle)? And if yes, is there a way to save those metadata?

Thanks,
S.Yao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.