开发者

OpenCV performance in different languages

开发者 https://www.devze.com 2022-12-22 22:26 出处:网络
I\'m doing some prototyping with OpenCV f开发者_如何转开发or 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 ha

I'm doing some prototyping with OpenCV f开发者_如何转开发or 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.


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号