Ask Your Question
3

Why there are two versions of OpenCV 3.x and 2.4.xx ?

asked 2016-04-12 12:07:05 -0600

essamzaky gravatar image

Why there are two versions of openCV 3.x and 2.4.xx ? I 'm still confused , which one should I select , the two versions seems to be active , is there any plan to stop one of them , what is the rule used to select which version is suitable for my application.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
9

answered 2016-04-13 06:58:31 -0600

It has some historical reasons why both systems exist.

  • In the past you had OpenCV 1.x and OpenCV 2.x. The OpenCV 1.x interface was the C based API, which was the historical starting language for OpenCV. When C++ became more popular OpenCV 2.x API was released, using the possibilities of C++ over the C language.
  • For a long time both versions where supported, since many embedded systems still contained only C support. However since about 2010, that changed drastically and thus OpenCV decided to focus on its C++ API, keeping the old C-API as a sort of backup, but not longer supported and updated frequently.
  • About a year and half ago, OpenCV did a complete overhaul of its backend interface. This in order to support various multithreading interfaces (which are more easily accessible now), hardware support layers, ... the differences are discussed in the transition guide.
  • However the transition forced users to change some structural things in the way they embedded OpenCV in their code. Therefore the OpenCV 2.4.x was maintained, with only allowing bug fixes and efficiency fixes, but no longer new functionality. This allows users to gradually move on to the OpenCV 3.x interface.

So basically

  • If you are starting OpenCV from scratch just now, use OpenCV 3.x.
  • If you got old OpenCV based software depending on heavily changed modules, you either update those or stick to OpenCV 2.x.
  • At all times, stay aways of the OpenCV 1.x C-API. Since the release of OpenCV 3.x it has been seen as obsolete and no longer supported. In the future OpenCV devs might investigate a way to auto generate a C-interface from the existing C++ source code, since there are still some systems (but not many of them) out there only support C.

Good luck!

edit flag offensive delete link more

Comments

Thanks @StevenPuttemans , very good answer , sorry I want ask you another question, I want build module to be easy ported from OS to another , I will start to build the module as dll for windows , then I will port it to linux , ios, android , so what is OpenCV version will be used ?

essamzaky gravatar imageessamzaky ( 2016-04-13 08:45:31 -0600 )edit

The OS is no parameter in selecting the right version in my opinion, since OpenCV can be build on most systems without problems.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-04-14 02:42:00 -0600 )edit

Thanks @StevenPuttemans , as I know that ios uses objective C , and as you said in the answer OpenCV 3.x uses c++ , so is it possible from objective c call c++ module ?

essamzaky gravatar imageessamzaky ( 2016-04-14 12:51:20 -0600 )edit

With that I have no exp ... I did a single project in objective C once and left the platform after that ... it just amazes me that people seem the be using it. It is about the most user unfriendly interface you can imagine with all those extra apple directives :D

StevenPuttemans gravatar imageStevenPuttemans ( 2016-04-15 02:43:09 -0600 )edit

I found the following link OpenCV 3.0 introduction the link is complemtary to @StevenPuttemans answer.

essamzaky gravatar imageessamzaky ( 2016-04-16 16:19:51 -0600 )edit

Hi @StevenPuttemans , your answer is perfect and if I have more voting I will give it for your answer, but the link in my answers describes difference more explanation , the link and your answer are complamntary to each other , I will remove my comment on the link answer .

essamzaky gravatar imageessamzaky ( 2016-04-18 04:28:54 -0600 )edit
1

Finally a good explanation!

Overmind735 gravatar imageOvermind735 ( 2018-08-09 07:27:21 -0600 )edit

Keep in mind that since I wrote this topic, we basically took a step further. 2.x is now in somehow a freezed state, and only gets critical fixes. 3.x is the main branch for now, having latest functionality. However there is a 4.x development branch, which took the switch to C++11 and has a lot of new and exciting things. In the next couple of months this will be the new official main branch my guess.

StevenPuttemans gravatar imageStevenPuttemans ( 2018-08-17 03:40:23 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-04-12 12:07:05 -0600

Seen: 14,798 times

Last updated: Apr 18 '16