Error when trying to run tutorial.py (or SfM_SequentialPipeline.py) on OSX. Python 2.7.9.
meekohi ~/openMVG_Build/software/SfM$ python tutorial_demo.py
('Using input dir : ', '/Users/meekohi/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images')
(' output_dir : ', '/Users/meekohi/openMVG_Build/software/SfM/tutorial_out')
1. Intrisics analysis
Traceback (most recent call last):
File "tutorial_demo.py", line 48, in <module>
pIntrisics = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_SfMInit_ImageListing"), "-i", input_dir, "-o", matches_dir, "-d", camera_file_params, "-c", "3"] )
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
I think it's just because applications are not build in the same directory on Linux/Mac...
Can you check if OPENMVG_SFM_BIN is pointing to a valid directory and if there is some application inside it?
Looks empty.
meekohi ~/openMVG_Build$ echo $OPENMVG_SFM_BIN
meekohi ~/openMVG_Build$
Looks like I must export on MAC and Windows platform
IF(MSVC OR APPLE)
SET(OPENMVG_SOFTWARE_SFM_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}+${CMAKE_BUILD_TYPE})
ELSE()
SET(OPENMVG_SOFTWARE_SFM_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
ENDIF()
for this line
https://github.com/openMVG/openMVG/blob/master/src/software/SfM/CMakeLists.txt#L202
IF(MSVC OR APPLE)
SET(OPENMVG_SOFTWARE_SFM_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
ELSE()
SET(OPENMVG_SOFTWARE_SFM_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
ENDIF()
Seems to have done the trick :)
Windows seems prefer
IF(MSVC OR APPLE)
SET(OPENMVG_SOFTWARE_SFM_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}")
ELSE()
SET(OPENMVG_SOFTWARE_SFM_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
ENDIF()
i believe i'm still having the same issue...
i'm on OSX 10.11.6 (El Captain). Python 2.7.14.
if i run:
python software/OpenMVG/openMVG_Build/software/SfM/tutorial_demo.py
i get:
Cloning into 'ImageDataset_SceauxCastle'...
remote: Counting objects: 17, done.
remote: Total 17 (delta 0), reused 0 (delta 0), pack-reused 17
Unpacking objects: 100% (17/17), done.
('Using input dir : ', '/software/OpenMVG/openMVG_Build/software/SfM/ImageDataset_SceauxCastle/images')
(' output_dir : ', '/software/OpenMVG/openMVG_Build/software/SfM/tutorial_out')
1. Intrinsics analysis
Traceback (most recent call last):
File "/software/OpenMVG/openMVG_Build/software/SfM/tutorial_demo.py", line 49, in <module>
pIntrisics = subprocess.Popen( [os.path.join(OPENMVG_SFM_BIN, "openMVG_main_SfMInit_ImageListing"), "-i", input_dir, "-o", matches_dir, "-d", camera_file_params, "-c", "3"] )
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 390, in __init__
errread, errwrite)
File "/usr/local/Cellar/python@2/2.7.14_3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1025, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
@jango-fx Since depending of how you build OpenMVG on mac you can have a different output binary dir (XCode build or command line build with clang)
So, according this I did not find a generic way to put the OPENMVG_SFM_BIN = to the good value.
Here a fix you can do by hand:
OPENMVG_SFM_BIN =. It should do the trick.hah, trying to set the right folder, i realised my build was somehow incomplete. built it again, (this time with xcode?) now it runs smoothly!
thanks, though! super quick reply :D