When to use OpenCV and Eigen3 Library

asked 2020-05-30 09:02:42 -0600

rp_sungho gravatar image

updated 2020-05-31 11:19:35 -0600

Hello, I have a question about OpenCV and Eigen Library. Both libraries are powerful tools to calculate matrix and its related work. However, I am confused when I am supposed to use the OpenCV matrix or Eigen library. I am sometimes making meaningless conversion between those two libraries in my code, so I would like to make the criteria more clear.

I read this page, but it only introduces their differences. (https://answers.opencv.org/question/3...)

Thanks

edit retag flag offensive close merge delete

Comments

I would do something like this.

If between two OpenCV calls you need to do some linear algebra that both libraries fit, you can stick with OpenCV.

If you need to do heavy linear algebra, you can use Eigen since the syntax is more expressive.

Normally, with Eigen you can map an array and avoid copy. So conversion between the two should be cheap.

Eduardo gravatar imageEduardo ( 2020-05-31 13:43:00 -0600 )edit