Tuesday, March 1, 2011

What's a good matrix manipulation library available for C ?

Hi,

I am doing a lot of image processing in C and I need a good, reasonably lightweight, and above all FAST matrix manipulation library with a permissive license. I am mostly focussing on affine transformations and matrix inversions, so i do not need anything too sophisticated or bloated.

Primarily I would like something that is very fast (using SSE perhaps?), with a clean API and (hopefully) prepackaged by many of the unix package management systems.

Note this is for C not for C++.

Thanks

:)

From stackoverflow
  • I'd say BLAS or LAPACK.

    Here you have some examples.

    banister : this looks great :) but i can't find a precompiled binary of the library anywhere for my (unfortunately right now) windows system. Any idea where i could find it?
    High Performance Mark : Start looking here: http://blogs.msdn.com/hpctrekker/archive/2009/02/24/hpc-math-attacks-blas-lapack-linpack-atlas-dgemm-acml-mkl-cuda.aspx
    Victor Liu : BLAS and LAPACK are generally considered interfaces, in the same way that OpenGL is an interface with many underlying implementations by graphics card vendors. That said, the fastest BLAS out there right now is GotoBLAS2, but its license is restrictive. Intel and AMD provide their own libraries (MKL and ACML) but those are also restrictive. Stick to the netlib reference implementations if you want truly free. You generally need to compile these yourself for your processor to get the best performance.
    stephan : @banister: the other option to downloading an existing binary is to build your own. A good way to do so is to use ATLAS (http://math-atlas.sourceforge.net/), which produces a BLAS tuned to your machine. See http://math-atlas.sourceforge.net/errata.html#WinBuild and http://math-atlas.sourceforge.net/errata.html#winpt for windows-specific info (also read the rest of the errata).
  • OpenCV

    alt text

    banister : no, i want matrix manipulation not image manipulation (im writing my own image manipulation lib) thanks though :)
    TheMachineCharmer : Look there is good MATRIX MATH in it too. Also it simplifies image processing.
    banister : Thanks a lot :) but i really *just* need the matrix manipulation, i am looking for something lightweight that provides just the functionality i need.. :)
    TheMachineCharmer : :D cool. Then BLAS looks good! +Pablo
  • I found this library and it's brilliant: Meschach

0 comments:

Post a Comment