Structure From Motion opencv3.0


#1

anyone playing with opencv’s vs3 Structure From Motion?
http://docs.opencv.org/3.1.0/de/d7c/tutorial_table_of_content_sfm.html

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…

cheers


#2

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.
best!.


#3

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

  cv::ximgproc::createSuperpixelSLIC(cv::Mat,0,0,10.0);

as documented here:
http://docs.opencv.org/trunk/d3/da9/classcv_1_1ximgproc_1_1SuperpixelSLIC.html

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


#4

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:


#5

thanks for the input.

would you know why this line is not complying?

cv::ximgproc::createSuperpixelSLIC(cv::Mat,0,0,10.0);

it does not get auto completed either.


#6

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


#7

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:


#8

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.


#9

@as1er any updates on this? did you solve this structure thingy? i would need it for a project yesterday…


#10

hey @unicatcorn. sorry but no.

i had to bypass opencv,

managed to hack a great piece of 119 lines oldschool code,

and now i can have rgbd images without kinects and such,

it’s glitchy, and it’s very fun. i hacked around a polar thingy

to make it more robust, but i’ve been teaching all day long,

why don’t you drop by the studio? we could hit some waves

this weekend, and you still have work to do, don’t you?

i tried git push origin remote, but the network glitched,

and ended up released in a fb post last week, go figure


#11

that’s sounds great!!

saturday morning?