dune icon indicating copy to clipboard operation
dune copied to clipboard

Cmake: add opencv_videoio, new library in openCV 3.X.X

Open krisgry opened this issue 7 years ago • 4 comments

Should be seen in the context of https://github.com/LSTS/glued/pull/36

krisgry avatar Apr 27 '18 10:04 krisgry

Will leave it to @pmfg to decide on this (he has been working with OpenCV on our side).

zepinto avatar Jul 12 '18 10:07 zepinto

It will require a check for the opencv version used, since version 2.4.x does not have the opencv_videoio library (compatibility with the old opencv version - https://github.com/LSTS/glued/pull/36)

pmfg avatar Jul 16 '18 13:07 pmfg

To clarify: Will the following changes suffice?

  • add a new rule to glued, called opencv3, that is identical to the opencv rule except that it is updated to version 3.X.X (and a different checksum ofc). Or is there a smarter way to keep track of different versions?
  • within the if(HAVE_LIB_OPENCV) in cmake/Libraries/OpenCV.cmake; run something like CHECK_LIBRARY_EXISTS(opencv_videoio open "" HAVE_LIB_OPENCV3). If HAVE_LIB_OPENCV3 is true, we'll add opencv_videoio and do set(DUNE_SYS_HAS_OPENCV3 1 CACHE INTERNAL "OpenCV library") videoio ref
  • Tasks that require OpenCV 3.X.X will need to check DUNE_SYS_HAR_OPENCV3, while older tasks (requiring 2.X.X) do not have to change their cmake.

Please be critical, as I'm no cmake expert!

krisgry avatar Jul 26 '18 11:07 krisgry

For me it seems like a good solution to the incompatibility of opencv versions.

pmfg avatar Aug 07 '18 13:08 pmfg