Ask Your Question

Revision history [back]

I prefer C++ mainly because the OpenCV library itself has been written in C++.

I have found, from my personal experiences, that for OpenCV code written in C++, it is much easier to track what is going wrong and where because your application code is "closer" to the library implementation (by virtue of using the same programming language).

In addition to that, a lot of API documentation is only available for C++.

The Python documentation, on account of being comparatively recent, is not as extensive/mature as the C++ counterpart.

It is also easier to interface with and try out the newest additions to the library (though in experimental phase) because they are added in the form of C++ code.

The only scenario where I found the OpenCV Python API to be preferable is when you want to use OpenCV as part of a web-based application because it becomes easier to integrate the OpenCV code with frameworks such as Django.