Ask Your Question

Is c++ better suited than Python for real-time applications?

asked 2015-05-22 02:53:34 -0500

jsa gravatar image


I'm about to beging my end-of-degree project and I was wondering whether I'be better off with Python or C++. My main concern is which one of them is best suited for real-time applications. As far as I know, Python is interpreted and according to what I read here

Written in optimized C/C++, the library can take advantage of multi-core processing

(Don't know if that means that's not the case with other languages)

So, is C++ the right option in my case?


edit retag flag offensive close merge delete


  • there is no support for cuda operations for the python wrappers (if you want that, you have to use c++)
  • apart from that, unless you're trying to write foolishly naive per-pixel loops, you won't see much difference between python/c++ performance. cv2.normalize() calls cv::normalize(), so you get the same sse optimizations than in c++.
berak gravatar imageberak ( 2015-05-22 03:20:51 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-06-08 03:26:14 -0500

hoju gravatar image

I find if the application can be built largely using the existing opencv methods, which wrap the C implementations, then no problem. However if I need to implement my own per pixel algorithms then much faster to drop down to the C interface.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2015-05-22 02:53:03 -0500

Seen: 183 times

Last updated: Jun 08 '15