Can someone please do this? @UnaNancyOwen @cenit @patrikhuber
the problem is that OpenCV3 could still be interesting (openCV2 also, from some points of view). In fact I also pushed a port of OpenCV2 but never got merged... shall we add a "new" port, keeping opencv3 at least still available? Removing all the C lib interfaces (many already broken, that's why OCV2 was interesting also) could be a disaster for many people working on "old" projects
C API (old style API) has been deprecated since OpenCV 3.0. It was already five years ago. They removed it in OpenCV 4.0. OpenCV had taken a sufficient transition term for convert to C++ API (modern style API) for users.
I think there is already no need to leave the old version.
OpenCV4 can coexist with OpenCV3 under linux: headers are installed into /usr/local/include/opencv4/opencv2 and config.cmake into /usr/local/lib64/cmake/opencv4. You can switch version between 3 and 4 by find_package(OpenCV 3) and find_package(OpenCV 4). Add a new port opencv4.
I think it is difficult to coexist OpenCV 3.x and OpenCV 4.x under Windows (and Vcpkg) at least. What do you think? (@huangqinjin Thank you for giving me good information. 馃憤)
the coexistance problem can be solved through exclusivity. If you have one installed, others are prohibited, like it is already done for different implementations of the same library.
C API is still used a lot, no matter if it has been deprecated or not. I can't understand why removing thing should be appreciated. If there's one thing I really love from microsoft, it is their dedication towards backwards compatibility. It is difficult to build the future, continuously forgetting the past and rebuilding things again and again...
Apart from the famous VLC problems with OpenCV 3.4.1, when they mistakingly forgot one C API from the release, just think about many projects related to PCL, or even YOLO..... there are many examples, bigger or smaller. All of them, they DEPEND on those C API, and removing OpenCV3 would break all of them in a breeze!
the coexistance problem can be solved through exclusivity. If you have one installed, others are prohibited, like it is already done for different implementations of the same library.
Yes, It is right. It can coexist by exclusive control. I agree.
I think there are several ways to implement exclusive control.
@alexkaratarakis @ras0219-msft Let's ask the administrator's opinion.
Implement OpenCV 4.x (mainstream) and OpenCV 3.4.x (legacy) in one opencv port. It is switch by option. For example, vcpkg install opencv (default) is install OpenCV 4.x, vcpkg install opencv[legacy] is install OpenCV 3.4.x.
Implement OpenCV 4.x (mainstream) and OpenCV 3.4.x (legacy) on different two ports. For example, opencv port is isntall OpenCV 4.x and opencv3 port is install OpenCV 3.4.x. In this case, If different one port is installed, display warning and stop installation.
Other ideas. Do you have any good ideas?
Something on the line of libmysql/libmariadb for me would be perfect...
https://github.com/Microsoft/vcpkg/blob/008c5d8668b9a0b42dee249057bac223a3e3f896/ports/libmysql/portfile.cmake#L2
also, tbh, OpenCV port has been broken with latest update. I am sorry it took me too much time (working too much lately), but I just tried to update and at least the ffmpeg feature is broken #4636 (it has not been updated to the latest port, still the patch has been accepted). Again and again, OpenCV port has been broken just to hurry a patch to update to latest version...
I'd also suggest a flag [legacy] or so (though that might be confusing since normally this is used for OpenCV's modules), or a separate package/portfile. It would be best to move the package opencv to 4.0, and for people who still need 3.x, have them move to an opencv-3 package. In that way, the opencv can always stay the latest version, which is what people would expect from a package without a version number.
OpenCV is an example where this is in my opinion warranted, as unfortunately people are really slow at upgrading and there's a ton of research code out there that depends on opencv-2 or opencv-3 and which will never be updated (or in years).
I feel that this is a basic problem that vcpkg needs to solve as a platform, not specifically for opencv.
For now, I think creating a new port called opencv4 would be the least disruptive.
If someone installs both and there are conflicts that is their problem.
Most helpful comment
C API (old style API) has been deprecated since OpenCV 3.0. It was already five years ago. They removed it in OpenCV 4.0. OpenCV had taken a sufficient transition term for convert to C++ API (modern style API) for users.
I think there is already no need to leave the old version.