jyjblrd/Low-Cost-Mocap

Remove cv.sfm dependency

jyjblrd opened this issue · 4 comments

This project depends on the OpenCV SFM (structure from motion) module, which requires you to build OpenCV from source. This is a huge pain, especially since we only use three simple functions from the module: fundamentalFromProjections, essentialFromFundamental, and motionFromEssential.

It should be very easy to reimplement these functions in python by looking at the module source code, and this would remove cv.sfm as a dependancy, making the project a lot more accessible.

@jyjblrd , Could you link where those functions are present in the OpenCV repo , I would like to have a look and start

Hey @SANTHOSH-MAMIDISETTI, you can find the usages of the sfm module in the code base here. It would be amazing if you can do this!

The source code for the sfm module is here. An example of searching up the implementation of the fundimentalFromProjections function is here.

@jyjblrd could you provide test data of camera1_image_points and camera2_image_points like used here?
If possible the output of F and E would also be great. I am not entirely sure what the camera points look like. Additionally the test data would help to compare the openCV implementation of essentialFromFundamental to the python version.

Resolved by #42, which has been pulle into the no-cv-sfm branch. However, this code is currently untested – test cases will need to be written before this issue can be closed.