Structure From Motion opencv3.0


anyone playing with opencv’s vs3 Structure From Motion?

ofxOpenCv, ofxCV are still opencv vs2…

any hints for alternatives for simple 3d space estimation from live video feed?

no, ofxPTAM does not work, it uses cuda and would be for mobile targets…



Hi, it is actually super easy to have opencv3 on of. You just need to use openFrameworks recent nightly builds. Download from here, scroll down towards the end you’ll find the download links.


i too am interested in using some of the new openCV3 functions.

i downloaded nightly build of_v20170714_osx_release
add ofxCv
and was hoping to using this line


as documented here:

but i am not 100% sure if this OF version has opencv3 because addons/ofxOpenCv/libs/opencv
only contains opencv and opencv2 folder.

thanks for any advice


As far as I know OpenCv 3.1 is in the master branch of OF … see here. OpenCv 3.x still uses the opencv2 namespaces though … see here.

Might be about time to finally integrate ofxCv into core :wink:


thanks for the input.

would you know why this line is not complying?


it does not get auto completed either.


Most certainly because the ximgproc namespace is not included in the opencv build for ofxOpenCv?!
At least if you look into the opencv header files provided with ofxOpenCv there is no such namespace available.

Maybe @arturo can clear things up here?! As far as I remember we already had this discussion once about using opencv and cuda … (back then the not working) solution was to use apothecary to compile opencv with the appropriate flags.

p.s.: you working in nightshift right now? :wink:
p.p.s: in case you’re running on windows (ok I know you most certainly use macos) you can just ripoff the compiled opencv 3.2 library from Elliot’s ofxCvMin


Ok, just had a quick look through the opencv3 documentation … the ximgproc namespace clearly belongs to the “extra modules” so you’ll need to install the opencv_contrib package. I am not sure if you can do that with apothecary?! Worst case scenario would be that you need to compile opencv3 by hand using cmake and make and then add the appropriate -DOPENCV_EXTRA_MODULES_PATH flag.

By the way, the current homebrew formula removed most of the configuration flags. So using the mirade of tutorials of how to install opencv3 for osx won’t work … at least not if you wanna have static libraries build. I would recommend to follow this tutorial here and then just add the “BUILD_SHARED_LIBS=OFF” and all the other flags you need (for example I would install all the python and java bindings and stuff like that). You also might use the cmake gui which makes things a lot easier :wink:


we got opencv 3.3.0 compiled which now gives us access to the 3rd party modules.
we can also use it to run their DNN functions.