I'm doing some prototyping with OpenCV for a hobby project involving processing of real time camera data. I wonder if it is worth the effort to reimplement this in C or C++ when I have it all figured out or if no significant performance boost can be expected. The program basically chains OpenCV functions, so the main part of the work should be done in native code anyway.
+4
A:
You've answered your own question pretty well. Most of the expensive computations should be within the OpenCV library, and thus independent of the language you use.
If you're really concerned about efficiency, you could profile your code and confirm that this is indeed the case. If need be, your custom processing functions, if any, could be coded in C/C++ and exposed in python through the method of your choice (eg: boost-python), to follow the same approach.
But in my experience, python works just fine as a "composition" tool for such a use.
Kena
2010-03-12 15:12:51
A:
OpenCV used to utilize IPP, which is very fast. However, OpenCV 2.0 does not. You might customize your OpenCV using IPP, for example color conversion routines.
rcen
2010-03-18 14:20:27
IPP is not free and OpenCV 2.0 includes IPP support.
Jacob
2010-03-18 14:22:14