问题
The latest release of OpenCV shows 2.4.11 Feb,2015 which is more recent then 3.0.0 which is in Beta. What is the difference between them. Should I use OpenCV 2.4.11 over 3.0.0 as I have encountered few bugs in 3.0.0. How do their releases work?
回答1:
3.0.0 should bring a lot of new features but it's currently beta and not the official release (can be unstable). Last official stable release was 2.4.11.
Use the 3.0.0 if there is features you don't retrieve in 2.4.11 or if you are adventurous (3.0.0beta is great and the final release should come soon). If you want security with no additional needs, use 2.4.11.
回答2:
Though there are new features( like text detection, KAZE detector ) in OpenCV 3.0, for most developers, this comparison is not about features. It is about speed. Unless you are immediately into production, I suggest you use OpenCV 3.0. Also, this is far from adventurous.
- The key difference is transparent API in OpenCV 3.0. Almost all OpenCV 3.0 methods are OpenCL accelerated. So, all methods could run on GPU and this could lead to improvement from 10 to 230%. Only change in required in your code is to use
UMat
where you used to useMat
. Samples(1). If you needed this performance in OpenCV 2.4.*, you had to explicitly invokecv::ocl::*
orcv::gpu::*
methods. - If you happen to be a Java developer, it is even better. Java wrappers for classes/methods which were unavailable earlier, are now provided in OpenCV 3.0 ( see widely used KalmanFilter )
- There are changes like internal module restructure, which from a developer point of view, is minor as that could be resolved by changing OpenCV headers in your code.
About the release cycle, a quick look into OpenCV github repo(2) shows, pull request are mostly going into master branch which is for OpenCV 3.0. So I assume, major bug fixes could be backported to 2.4.* branch.
For more, on differences read (3) and (4). About the bugs you encountered in 3.0 beta, it could helpful, if you could raise them with a minimal complete running sample at OpenCV issues page(5).
回答3:
In addition to the answers provided above, another important difference is that SIFT/SURF feature detection has been taken off the default openCV 3.0 package. Since they are patented, openCV has moved 'non-free' algorithms to a different package:
opencv_contrib
来源:https://stackoverflow.com/questions/29579801/what-is-the-difference-between-opencv-2-4-11-and-3-0-0