开发者

OpenCV Image Processing -- C++ vs C vs Python

开发者 https://www.devze.com 2022-12-20 15:12 出处:网络
I was thinking of trying OpenCV for a project and noticed that it had C, C++ and Python. I am trying to figure out whether I should use C++, C or Python -- and would like to use whatever has the best

I was thinking of trying OpenCV for a project and noticed that it had C, C++ and Python.

I am trying to figure out whether I should use C++, C or Python -- and would like to use whatever has the best OpenCV support.

Just from looking at the index page for the various documentation it looks like the C++ bindings might have more features than the others? Is this true?

If C++ has more bindings, it seems that would be a more obvious choice for me, but I was just curious if it really has m开发者_如何学JAVAore features, etc than the others?

Thanks!


Actually Python binding was finished starting with release 2.2. So i would go with python if i were you, because the performance will be almost the same anyway as you are using c libraries in both cases. However python will get you there faster, safely and you will spend more time on your algorithm rather than getting things to build and run not mentioning memory management hassles


The Python interface is still being developed whereas the C++ interface (especially with the new Mat class) is quite mature. If you're comfortable in C++, I would highly recommend using it - else, you can start using Python and contribute back any features you think OpenCV needs :)


I think it depends how proficient you are in C++. The Mat interface does appear more modern than the old IPLImage C interface. The problem I'm having is that most of the examples you'll find on the web, or even here on stackoverflow are for the C interface (e.g. cvCvtColor), not for the C++ interface. So I'm really struggling to port the C examples to C++.


Even if you're very proficient in C or C++, you should use python to speed up your development (I should guess a 4x factor). Performance are really quite the same.

0

精彩评论

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

关注公众号