How to determine which version of OpenCV I have installed?
I am most interested in knowing a way of doing it programatically (and cross-platform), but I can't even find a way to determine the installed version from outside the code.
I'm working with C++03, on Fedora.
Use __version__ on cv2 to get its version.
The OpenCV – 4.5. 1 version is released in 2020 with advanced features of the library. The OpenCV 4. x is based on C++ 11 library and the OpenCV – 1.
If you're working with Image Processing,hands down OpenCV 3 is way better(The latest stable version 3.4 was released around Feb 2018). Significant differences that you will find between 3 and 2 are: T-API or Transparent API has been introduced in OpenCV 3. Only thing that you'll need to use is UMat instead of Mat.
You can check the CV_VERSION
macro.
You can check the following macro variables:
CV_MAJOR_VERSION CV_MINOR_VERSION
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With