OpenCV vs VXL vs LTI: Performance Test

I recently read this comparison of four vision libraries: OpenCV, VXL, LTI and OpenCV with IPP. It was in the book Learning Learning OpenCV: Computer Vision with the OpenCV Library, authored by the creators of OpenCV themselves. For those who aren’t familiar with these libraries, here’s a brief introduction.

VXL

VXL stands for Vision something Library. It is a C++ library that implements several common computer vision algorithms and related functionality. The idea is to replace the ‘X’ with one of the several letters:

  • VGL = Vision Geometry Library
  • VIL = Vision Image processing Library
  • VNL = Vision Numerics Library
  • VSL = Vision Streaming Library
  • There are several other libraries as well

LTI

LTI-Lib is another object oriented library for computer vision. It has also been implemented in C++. It also includes classes that encapsulate multithreading, synchronization, serial port access, etc. And it ensures you don’t have to deal with changing operating systems or hardware.

OpenCV

Yet another computer vision library. It includes over 500 functions for various commonly used algorithms. It also comes with a machine learning library and a portable window creation library. With version 2.0, OpenCV comes with a C++ interface as well. Before 2.0, it was only the C interface.

OpenCV + IPP

OpenCV developers were friendly with the Intel Performance Primitives team. So, OpenCV makes use of IPP code (which is hand tuned and extremely optimized code) to speed up execution. And this, as you’ll see, gives a substantial boost to its execution speed.

The comparison

The machine used was a Pentium M 1.7GHz. Four tests were done:

  1. 2D DFT: Forward fourier transform of a 512×512 image
  2. Resize: 512×512 to a 384×384 image, bilinear interpolation. An 8-bit, 3 channeled image was used
  3. Optical flow: 520 points were tracked with a 41×41 window and 4 pyramid levels
  4. Neural net: the mushroom benchmark of FANN

The results were like this (I’ve tried my best to replicate the chart as best as possible):

The OpenCV vs VXL vs LTI comparison chart

Hmm. It can’t get simpler. If you want to do your computer vision thing super fast, you must use OpenCV. If possible, Go for OpenCV+IPP. If something doesn’t work fast enough, there are only two possibilities:

  1. You don’t know how to use it (doing template matching on a 3000×3000 image)
  2. The algorithm itself is slow and current technology can’t make it go faster (like SIFT)

If you can think of other possibilities, please leave a comment and let me know :P Anyway, in either case, the algorithm will work even slower on other vision libraries.

Lesson: Whatever vision task you have, choose OpenCV :D

Note: OpenCV does NOT depend on IPP in any way. But, if it detects IPP on a particular system, it will automatically make use of it.

Back to top

20 Comments

  1. Posted July 14, 2010 at 10:23 pm | Permalink

    Utkarsh, very impressive site man! I just got mine running a few days ago and I ultimately envision my site looking similar to this one, now I have something to wokr for. I have the same book, read the same article and am doing very similar things! I’ll follow your site, keep up the awesome work!

    • Posted July 14, 2010 at 10:41 pm | Permalink

      Thanks! Glad you found AI Shack helpful! And keep me updated about your “experimentation” with computer vision :D

  2. Posted July 30, 2010 at 3:53 am | Permalink

    Can you offer any ways I can conduct my own bench-test? I am looking to quantify the performance gain between OpenCV and OpenCV+IPP. The above chart is great and all, but I’d like to tangibly see the results. Your thoughts?

    • Posted July 30, 2010 at 6:23 am | Permalink

      Hi David! You can run some slow algorithm and time it. You could also check the amount of memory used, number of threads, etc to calculate a total score. Does this help?

  3. akarsh
    Posted August 31, 2010 at 5:52 pm | Permalink

    very good site… a much needed one…!! nice tutorials and all stuff..

  4. Uni
    Posted September 14, 2010 at 1:02 am | Permalink

    Hey. I was wondering one thing. What if we run a SIFT implementation on parallel processors? Won’t that be a major source of speed-up?

    I was thinking of writing a paper on Computer vision tasks on multiprocessors. So I’ve read that common CV algos speed up a lot on multi cores. Hence, that’s one way to get a better and more optimized performance. What do you think?

    • Posted September 20, 2010 at 12:18 am | Permalink

      Yes, several vision algorithm can be run faster with multiple processors. It’s not just multiple processors these days… you can even use the super powerful processor on your video card. Really speeds up things!

  5. RP
    Posted October 30, 2010 at 9:37 am | Permalink

    Very very good web site.
    Keep up!
    Thanks for all these articles. Keep it coming.

  6. Vasant
    Posted January 7, 2011 at 12:39 pm | Permalink

    Neat work. Am impressed by with your hands on experience in OpenCV. You should also check out VLFeat.

    What’s your general background in other interest point detectors?

    Guess, I will see you during the Embryo lecture on Sunday.

    Cheers,
    Vasant

    • Posted January 7, 2011 at 2:36 pm | Permalink

      :) I’ll try using VLFeat! I’ve worked with a few interest point detectors, Harris, Shi-Tomasi, SIFT, and going through SURF these days.

      And I’m looking forward to the lecture!

  7. Jirka
    Posted March 3, 2011 at 12:47 pm | Permalink

    Hi, the result are really impressive, but on the chart I am little bit missing the description, what is on the Y axis… without that it´s quite difficult recognize what is better.

    • Posted March 3, 2011 at 12:52 pm | Permalink

      It’s a score calculated based on various factors – time, memory used, etc. I’m not sure of the exact details.

  8. Posted August 3, 2011 at 6:21 am | Permalink

    vxl is more research oriented than opencv, therefore it wins in certain aspects regarding functionality – many algorithms are only available in vxl. Performance wise, it is no surprise opencv wins on such simple low level tasks. I would say your conclusion is a bit misleading. Interesting article anyways.

    • Posted August 8, 2011 at 11:35 pm | Permalink

      Interesting. Can you tell me some details? I’d really like to know more about vxl!

  9. Posted September 18, 2011 at 5:51 pm | Permalink

    Can i use openCV Lib with C# language or not ?

    • Posted January 10, 2012 at 5:45 am | Permalink

      You can use emgucv – it’s a c# wrapper for OpenCV.

One Trackback

  1. By OpenCV 2.2 Linux install | S U N D R U . N E T on January 10, 2011 at 12:43 am

    [...] framework there is lots of heated debate on which ones better, for a good comparison look at the chart here (Cannot guarantee results).  In short OpenCV seems the the library with most work put into it, [...]

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">