what is the difference between OpenCV 2.4.11 and 3.0.0

Manish Kumar Sharma picture Manish Kumar Sharma · Apr 11, 2015 · Viewed 36.6k times · Source

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?

Answer

Kiran picture Kiran · Apr 12, 2015

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.

  1. 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 use Mat. Samples(1). If you needed this performance in OpenCV 2.4.*, you had to explicitly invoke cv::ocl::* or cv::gpu::* methods.
  2. 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 )
  3. 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).