-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enabled the choice between OpenCV 2.4.x or OpenCV 3.x #1714
Conversation
…mespaces and new API changes do not create problems during the build
@blackibiza I think this PR should be canceled. Your changes are not actually required, CV_LOAD_IMAGE_COLOR exits in 3.0 Offtopic, but fyi: #1667 (at least your linking error is fixed) |
But according to our plans API will diverge extremely in future. Imagine that we will remove STL from OpenCV interface in 3.x :-) |
From other side, It seems now IMHO, better |
But how long will be OpenCV 2.x around? I am of the opinion that OpenCV 3.x will break somehow the API in future. But Travis still uses 2.3.1 version of OpenCV. I believe there's still a need to have both the possibilities implemented, so in this way it's possible to keep them. |
@Nerei Where is CV_LOAD_IMAGE_COLOR in OpenCV 3.0? As far as I can tell, it isn't part of the C++ code anymore. |
@sanchom |
Don't know. For stable commercial products we stick to 2.x. Some of us advocate 3.x Update: Just looked more precisely, it seems Android Manager will be released for 3.0 and and that means even binary compatibility must be supported. It seems removing STL is canseled or postponed till 4.x |
In my opinion the 2.3.x branch of OpenCV is outdated and is not necessary to support, other than for its use by Travis CI. From 2.4.0 and onward into 3.x, the cv::IMREAD_COLOR, etc. constants were available. Including |
Should to remove #include <opencv2/core/version.hpp>
#if CV_MAJOR_VERSION >= 3
... (use 3.x API here) ...
#else
... (use 2.x API here) ...
#endif
|
All required changes are done in #1667. It compiles with OpenCV 3.x (master) update: and with 2.x. This PR to be closed. |
But this change enables both OpenCV 2.x and OpenCV 3.0 to be compiled. 2.3
|
yes. both opencv branches should compile after merging #1667 |
@blackibiza I believe this can be closed. Just take the latest |
no problem! |
Selecting OpenCV version during CMake configuration, defining variable OPENCV_3 for newer OpenCV 3.x and OPENCV_2 for older API (2.4.6+).
Added the fix for imread to solve the compiling error