Ask Your Question

opencv solve linear equation system too slow

asked 2014-05-26 22:52:38 -0600

tidy gravatar image

I used solve function to solve Ax=b problem. The A is large (about 40000*7000). But it is very slow. Even slower than matlab. By the way, I used the SVD method. Any suggestion?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2014-05-27 01:53:20 -0600

AFAIK, OpenCV is not designed for solving matrix related operation like: multiplication, eigenvalue decomposition or SVD, etc., so your result is not surprise to me. For your problem, there two kinds of choice: the first choice is using a dedicated library, lapack or Eigen is recommended, the second one is using a wrapped library, such as Armadillo or CVMlib. I have tested all of them, or you can see more at this, and my choice is lapack, which gives the fastest speed (on Windows, with VS IDE). Hope this help.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-05-26 22:52:38 -0600

Seen: 1,981 times

Last updated: May 27 '14