Ask Your Question
7

Why are OpenCV 3.0 headers in the opencv2 namespace?

asked 2015-04-28 05:24:43 -0600

jakobwilm gravatar image

As we know, OpenCV 3.0RC1 and 2.4.X are not API compatible. Hence, it would be very smart to use a new directory for the headers (e.g. opencv3/core.hpp). The same applies for the opencv.pc for package-config. It leads to all kinds of trouble when installing multiple versions of OpenCV. So what is the argument for not doing this?

Regards, Jakob

edit retag flag offensive close merge delete

Comments

1

Good question :)

StevenPuttemans gravatar imageStevenPuttemans ( 2015-04-28 06:20:00 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
4

answered 2015-04-28 11:46:20 -0600

mshabunin gravatar image

updated 2015-04-29 03:42:11 -0600

This path was retained for compatibility with 2.4. Please, take a look at the Transition Guide for some details about compatibility. It is not 100%, but many simple programs should not need too many changes.

The -DINSTALL_TO_MANGLED_PATHS=ON cmake option allows to install several versions on the same machine. With this option:

  • headers will be put to <install-root>/include/opencv-3.0.0-dev/opencv2 folder
  • pkg-config configuration file will be named <install-root>/lib/pkgconfig/opencv-3.0.0-dev.pc
  • cmake configuration file put into <install-root>/share/OpenCV-3.0.0-dev folder
edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2015-04-28 05:23:57 -0600

Seen: 374 times

Last updated: Apr 29 '15