Image Convolution - NI IMAQ Vision vs OpenCV vs Intel IPP

Sunday, February 03, 2008

In this article  I would like to show how it possible to call imageprocessing functions from other libraries (OpenCV or Intel IPP) and compare the performance of the convolution function:

In general its possible to call functions directly from LabVIEW, but in some cases most easiest way is to create wrapper-DLL.
See how I will do it for calling OpenCV function:

In the example above I have used cvFilter2D convolution function. This wrapper DLL can be called from LabVIEW by following:

Now how to do exactly the same with Intel IPP:

Original LabVIEW code for convolution looks like this:

Now we can compare performance of three methods above. On my P4 1.6 GHz I've got following results:

As you can see, Intel IPP is fastest: 6.7 milliseconds. OpenCV 1 ms slow - 7,8 ms. NI IMAQ Convolute is slowest - 12,87 ms. IntelIPP twice faster in comparison with NI Vision.

You can download the source code used for this benchmark here.