Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is there an opencv2 folder inside OpenCV 3.x?

Tags:

opencv

Is this just for backwards compatibility, for people who have been developing for years with OpenCV 2 and then want to use OpenCV 3 without having to rewrite all their legacy code? Or is this related to a fundamental design decision the creators of OpenCV 3 opted for? For instance, when I look up imread examples for OpenCV 3, they have #include "opencv2/imgproc.hpp". Is this just the way you refer to certain files/functions in OpenCV 3, or is there an "OpenCV 3 way" out there that many people don't use, because they just prefer the old syntax/style of various operations?

like image 247
mannyglover Avatar asked Sep 16 '25 13:09

mannyglover


1 Answers

The version number in the include path refers to the API version. C-based OpenCV was API v1, C++-based OpenCV is API v2.

The library versions are now 3.x, but they are still using the same C++-based API. Thus OpenCV builds still have their header files in opencv2 folders.

like image 144
w-m Avatar answered Sep 18 '25 08:09

w-m



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!