arrenglover / openfabmap

Open-source C++ code for the FAB-MAP visual place recognition algorithm
Other
218 stars 68 forks source link

Adding Eigen as a dependency. #7

Closed kmactavish closed 9 years ago

kmactavish commented 9 years ago

In an effort to improve efficiency, some of my in-progress code may benefit from using Eigen matrix math vs OpenCV matrix math. A lot of this would be the manipulation of small vectors / matrices of sizes < 5, making OpenCV agonizingly slow.

For discussion

kmactavish commented 9 years ago

After profiling, turns out OpenCV Mat construction / destruction / expressions are taking 85% of the CPU time. I think I'll need to port that code to some other library, and Eigen seems like the best candidate.

kmactavish commented 9 years ago

Using cv::Matx and cv::Vec my runtime is now reasonable.

Unfortunately, these classes are only functional in OpenCV 2.4 and later, so support will need to be dropped for OpenCV < 2.4 when this code is integrated.

I believe this issue can be closed.

arrenglover commented 9 years ago

Good find, great to keep it only openCV dependent. As for the version, I think when we move to openCV3.0 we will probably have to force dependence on 3.0 in any case. Happy to close this issue too.