forked from mapillary/OpenSfM
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Pull Request resolved: mapillary#795 Hello ✋ This PR gets OpenSfM to compile and run on Windows! The main points that have been addressed: - [x] Rewrote the memory functions in `context.py` to work on all three platforms (Windows, Mac, Linux). This adds a new small dependency (`vmem`). - [x] Added a `bin/opensfm.bat` script for invoking the program. - [x] Some minor compilation issues related to Visual Studio are addressed. The definition of `M_PI` is a bit.. hackish, but the alternative is to include: ``` #define _USE_MATH_DEFINES #include <cmath> ``` In a lot of places where M_PI is referenced. I'm not sure that's better (but I can change it if you want). I'm also unsure of what side effects the `_USE_MATH_DEFINES` macro might do. 💣 - [x] Updated the docs with build instructions for Windows. - [x] Installs `opencv-python` as a pip dependency on Windows only; this is because vcpkg builds of OpenCV don't provide a version with OpenCV's Python bindings. This only affects Windows environments (it won't install on Mac or Linux). I hope this can be useful to others. Pull Request resolved: mapillary#735 Reviewed By: paulinus Differential Revision: D29959025 Pulled By: YanNoun fbshipit-source-id: 7016c642091e95323beb04bda7cb48a9f4e5c156
- Loading branch information
1 parent
54d3605
commit 13b0b65
Showing
11 changed files
with
159 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@echo off | ||
|
||
setlocal | ||
set OSFMBASE=%~dp0 | ||
|
||
python "%OSFMBASE%\opensfm_main.py" %* | ||
|
||
endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,3 +16,4 @@ Sphinx==3.4.3 | |
six | ||
xmltodict==0.10.2 | ||
wheel | ||
opencv-python==4.5.1.48 ; sys_platform == "win32" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters