rust-cv / cv

Rust CV mono-repo. Contains pure-Rust dependencies which attempt to encapsulate the capability of OpenCV, OpenMVG, and vSLAM frameworks in a cohesive set of APIs.
792 stars 62 forks source link

Remove blas and lapack dependencies #32

Open vadixidav opened 3 years ago

vadixidav commented 3 years ago

We have a dependence on blas and lapack. This stems from our use of argmin with ndarray support in cv-optimize. This pulls in ndarray-linalg, which then requires these linear algebra support libraries written in C. This counters our goal of making an easy-to-build Rust source with no C dependencies. While we do have a Levenberg-Marquardt algorithm as part of the rust-cv organization, since the implementation is not a sparse Levenberg-Marquardt, we are using Nelder-Mead instead for various reasons, including the ability to perform structureless bundle-adjust.

The first attempt to remedy this involved switching to the experimental nalgebra support in argmin, but this was unsuccessful because the implementation produced numerical errors and did not converge.

We can continue to use Nelder-Mead without using argmin, and this may require creating a custom implementation of Nelder-Mead, similar to our implementation of Levenberg-Marquardt.