package/opencv: re-introduce opencv24
Hello All!
As reported by Jonathan [0], some packages use the legacy OpenCV-2.4 API and have not yet been ported over to the new and incompatible OpenCV-3.
So, this series;
- renames the OpenCV-3 package from opencv to opencv3
- reintroduces OpenCV-2.4 as opencv
- makes opencv and opencv3 mutually exclusive (with a preference toward opencv, thus OpenCV-2.4)
- restores the Gstreamer-1 plugin support for OpenCV-2.4
- updates vlc to support both opencv and opencv3
[0] http://lists.busybox.net/pipermail/buildroot/2015-August/135270.html
Regards,
Yann E. MORIN.
The following changes since commit 7deaa277fd4c89c67de39ea21b4cd081ab85366f:
arch/arm: add missing arm1136j-s variant (2015-08-24 00:43:12 +0200)
are available in the git repository at:
git://git.busybox.net/~ymorin/git/buildroot yem/opencv3-opencv24
for you to fetch changes up to 1425d9f346c52e716c02b09c21b377e93033db94:
package/vlc: update opencv support (2015-08-24 10:33:51 +0200)
----------------------------------------------------------------
Samuel Martin (4):
package: rename opencv -> opencv3
package/opencv: re-introduce opencv for opencv-2.4
Revert "package/gstreamer1/gst1-plugins-bad: disable opencv plugin with opencv-3" package/vlc: update opencv support
Config.in.legacy | 32 --
package/Config.in | 1 +
package/gstreamer1/gst1-plugins-bad/Config.in | 20 +-
.../0001-core-fix-x86-PIC-code-compilation.patch | 49 +++
...ix-return-type-value-VideoFrameSource_GPU.patch | 40 +++
...VGenPkgconfig.cmake-rework-opencv.pc-gene.patch | 156 +++++++++
package/opencv/Config.in | 278 +++++-----------
package/opencv/opencv.mk | 151 ++-------
...pthread-based-parallel_for-with-gcc-4.4.3.patch | 0
...002-fix-support-for-pthreads-parallel_for.patch | 0
package/opencv3/Config.in | 344 +++++++++++++++++++
package/opencv3/opencv3.mk | 363 +++++++++++++++++++++
package/vlc/Config.in | 14 +-
package/vlc/vlc.mk | 6 +-
14 files changed, 1083 insertions(+), 371 deletions(-)
create mode 100644 package/opencv/0001-core-fix-x86-PIC-code-compilation.patch
create mode 100644 package/opencv/0002-superres-Fix-return-type-value-VideoFrameSource_GPU.patch
create mode 100644 package/opencv/0003-cmake-OpenCVGenPkgconfig.cmake-rework-opencv.pc-gene.patch
rename package/{opencv => opencv3}/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch (100%)
rename package/{opencv => opencv3}/0002-fix-support-for-pthreads-parallel_for.patch (100%)
create mode 100644 package/opencv3/Config.in
create mode 100644 package/opencv3/opencv3.mkSignature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/4 package: rename opencv -> opencv3
From: Samuel Martin <[email protected]>
Since there is a couple of API breaks between OpenCV 2.4 and 3.0, two distinct packages mutually exclusive will be integrated in the package tree.
So, this change prepares the re-introduction of the OpenCV-2.4 package by renaming the current opencv package (which provides OpenCV-3.0) to opencv3.
Reverse dependencies (vlc) is fixed to use the new symbols.
[yann.morin.1998 at free.fr:
- fix missed usage in vlc.mk
- don't remove legacy OpenCV symbols
- fix 'endif' comment
- slightly reword commit log (reverse deps)
]
---
package/Config.in | 2 +-
...pthread-based-parallel_for-with-gcc-4.4.3.patch | 0
...002-fix-support-for-pthreads-parallel_for.patch | 0
package/{opencv => opencv3}/Config.in | 152 +++++++-------
package/{opencv/opencv.mk => opencv3/opencv3.mk} | 230 ++++++++++-----------
package/vlc/Config.in | 4 +-
package/vlc/vlc.mk | 4 +-
7 files changed, 196 insertions(+), 196 deletions(-)
rename package/{opencv => opencv3}/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch (100%)
rename package/{opencv => opencv3}/0002-fix-support-for-pthreads-parallel_for.patch (100%)
rename package/{opencv => opencv3}/Config.in (69%)
rename package/{opencv/opencv.mk => opencv3/opencv3.mk} (55%)package/Config.in +1 -1
@@ -825,7 +825,7 @@ menu "Graphics" source "package/libva-intel-driver/Config.in" source "package/libvips/Config.in" source "package/menu-cache/Config.in" - source "package/opencv/Config.in" + source "package/opencv3/Config.in" source "package/opengl/Config.in" source "package/openjpeg/Config.in" source "package/pango/Config.in"
package/opencv3/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch renamed from package/opencv/0001-Fixed-compilation-of-pthread-based-parallel_for-with-gcc-4.4.3.patch +0 -0
package/opencv3/0002-fix-support-for-pthreads-parallel_for.patch renamed from package/opencv/0002-fix-support-for-pthreads-parallel_for.patch +0 -0
package/opencv3/Config.in renamed from package/opencv/Config.in +76 -76
353 lines not on this page · raw message
package/opencv3/opencv3.mk renamed from package/opencv/opencv.mk +115 -115
411 lines not on this page · raw message
package/vlc/Config.in +2 -2
@@ -11,8 +11,8 @@ config BR2_PACKAGE_VLC depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 select BR2_PACKAGE_LIBVORBIS if BR2_PACKAGE_OPUS - select BR2_PACKAGE_OPENCV_LIB_IMGPROC if BR2_PACKAGE_OPENCV - select BR2_PACKAGE_OPENCV_LIB_OBJDETECT if BR2_PACKAGE_OPENCV + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC if BR2_PACKAGE_OPENCV3 + select BR2_PACKAGE_OPENCV3_LIB_OBJDETECT if BR2_PACKAGE_OPENCV3 help VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVD,
package/vlc/vlc.mk +2 -2
@@ -153,9 +153,9 @@ else VLC_CONF_OPTS += --disable-gles2 endif -ifeq ($(BR2_PACKAGE_OPENCV),y) +ifeq ($(BR2_PACKAGE_OPENCV3),y) VLC_CONF_OPTS += --enable-opencv -VLC_DEPENDENCIES += opencv +VLC_DEPENDENCIES += opencv3 else VLC_CONF_OPTS += --disable-opencv endif
Signature · 1 line
1.9.1
PATCH 2/4 package/opencv: re-introduce opencv for opencv-2.4
In reply to Yann E. MORINFrom: Samuel Martin <[email protected]>
As Jonathan noticed in [1], users' applications may depend on opencv-2.4 APIs removed in opencv-3.0.
So, re-introduce opencv package as it was right before the bump to opencv-3.0 (i.e.: commit bf00b5a9ea1ab4189fe5c7dea05f40d0bbbf2082).
We do not support both OpenCV-2.4 and OpenCV-3 at the same time, so make OpenCV-3 depend on !OpenCV-2.4.
[1] http://lists.busybox.net/pipermail/buildroot/2015-August/135270.html
[yann.morin.1998 at free.fr:
- remove legacy symbols, now
- make opencv3 depends on !opencv, not the other way around
- slitghly reword the commit log (opencv/opencv3 dependency)
]
---
Jonathan: feel free to apply any patch on this package to bump opencv to the latest release on the 2.4 branch.
--- Config.in.legacy | 32 --- package/Config.in | 1 + .../0001-core-fix-x86-PIC-code-compilation.patch | 49 ++++ ...ix-return-type-value-VideoFrameSource_GPU.patch | 40 ++++ ...VGenPkgconfig.cmake-rework-opencv.pc-gene.patch | 156 +++++++++++++ package/opencv/Config.in | 223 ++++++++++++++++++ package/opencv/opencv.mk | 250 +++++++++++++++++++++ package/opencv3/Config.in | 1 + 8 files changed, 720 insertions(+), 32 deletions(-) create mode 100644 package/opencv/0001-core-fix-x86-PIC-code-compilation.patch create mode 100644 package/opencv/0002-superres-Fix-return-type-value-VideoFrameSource_GPU.patch create mode 100644 package/opencv/0003-cmake-OpenCVGenPkgconfig.cmake-rework-opencv.pc-gene.patch create mode 100644 package/opencv/Config.in create mode 100644 package/opencv/opencv.mk
Config.in.legacy +0 -32
@@ -194,38 +194,6 @@ config BR2_TARGET_UBOOT_NETWORK help U-Boot's custom network settings options have been removed. -config BR2_PACKAGE_OPENCV_LIB_CONTRIB - bool "opencv contrib module no longer exists" - select BR2_LEGACY - help - OpenCV >=3.0 does not come with in-tree contrib modules. - - They have been moved out of the OpenCV base tree, into the opencv_contrib - repository: - https://github.com/Itseez/opencv_contrib - -config BR2_PACKAGE_OPENCV_LIB_GPU - bool "opencv gpu module no longer exists" - select BR2_LEGACY - help - opencv_gpu module no longer exists as is in OpenCV >=3.0. - - It has been split into several modules prefixed with "cuda" that require - Cuda programming toolkit, which is not available in Buildroot. So cuda - modules are forcibly disabled in Buildroot. - -config BR2_PACKAGE_OPENCV_LIB_LEGACY - bool "opencv legacy module no longer exists" - select BR2_LEGACY - help - opencv_legacy module no longer exists in OpenCV >=3.0. - -config BR2_PACKAGE_OPENCV_LIB_NONFREE - bool "opencv nonfree module no longer exists" - select BR2_LEGACY - help - opencv_nonfree module no longer exists in OpenCV >=3.0. - ############################################################################### comment "Legacy options removed in 2015.05"
package/Config.in +1 -0
@@ -825,6 +825,7 @@ menu "Graphics" source "package/libva-intel-driver/Config.in" source "package/libvips/Config.in" source "package/menu-cache/Config.in" + source "package/opencv/Config.in" source "package/opencv3/Config.in" source "package/opengl/Config.in" source "package/openjpeg/Config.in"
package/opencv/0001-core-fix-x86-PIC-code-compilation.patch new file +49 -0
49 lines not on this page · raw message
package/opencv/0002-superres-Fix-return-type-value-VideoFrameSource_GPU.patch new file +40 -0
@@ -0,0 +1,40 @@ +superres: Fix return value VideoFrameSource_GPU + +Signed-off-by: Vicente Olivert Riera <[email protected]> + +From 2e393ab83362743ba1825ad4b31d4a2925c606b4 Mon Sep 17 00:00:00 2001 +From: Vicente Olivert Riera <[email protected]> +Date: Mon, 27 Oct 2014 13:39:35 +0000 +Subject: [PATCH] superres: Fix return value VideoFrameSource_GPU + +superres module fails to compile with the following error messages: + +[100%] Building CXX object modules/superres/CMakeFiles/opencv_superres.dir/src/super_resolution.cpp.o +/opencv-2.4.10/modules/superres/src/frame_source.cpp: In function 'cv::Ptr<cv::superres::FrameSource> cv::superres::createFrameSource_Video_GPU(const string&)': +/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: expected type-specifier before 'VideoFrameSource' +/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: could not convert '(int*)operator new(4ul)' from 'int*' to 'cv::Ptr<cv::superres::FrameSource>' +/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:16: error: expected ';' before 'VideoFrameSource' +/opencv-2.4.10/modules/superres/src/frame_source.cpp:263:41: error: 'VideoFrameSource' was not declared in this scope +/opencv-2.4.10/modules/superres/src/frame_source.cpp:264:1: error: control reaches end of non-void function [-Werror=return-type] +cc1plus: some warnings being treated as errors +make[3]: *** [modules/superres/CMakeFiles/opencv_superres.dir/src/frame_source.cpp.o] Error 1 +make[3]: *** Waiting for unfinished jobs.... + +This is caused because the return value of the createFrameSource_Video_GPU function should be a VideoFrameSource_GPU object. +--- + modules/superres/src/frame_source.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/modules/superres/src/frame_source.cpp b/modules/superres/src/frame_source.cpp +index 5f59a98..c5b2e76 100644 +--- a/modules/superres/src/frame_source.cpp ++++ b/modules/superres/src/frame_source.cpp +@@ -260,7 +260,7 @@ namespace + + Ptr<FrameSource> cv::superres::createFrameSource_Video_GPU(const string& fileName) + { +- return new VideoFrameSource(fileName); ++ return new VideoFrameSource_GPU(fileName); + } + + #endif // HAVE_OPENCV_GPU
package/opencv/0003-cmake-OpenCVGenPkgconfig.cmake-rework-opencv.pc-gene.patch new file +156 -0
156 lines not on this page · raw message
package/opencv/Config.in new file +223 -0
223 lines not on this page · raw message
package/opencv/opencv.mk new file +250 -0
250 lines not on this page · raw message
package/opencv3/Config.in +1 -0
@@ -7,6 +7,7 @@ menuconfig BR2_PACKAGE_OPENCV3 depends on !BR2_STATIC_LIBS # include dlfcn.h # Causes some toolchain failures on Xtensa depends on !BR2_xtensa + depends on !BR2_PACKAGE_OPENCV help OpenCV (Open Source Computer Vision) is a library of programming functions for real time computer vision.
Signature · 1 line
1.9.1
PATCH 3/4 Revert "package/gstreamer1/gst1-plugins-bad: disable opencv plugin with opencv-3"
In reply to Yann E. MORINFrom: Samuel Martin <[email protected]>
This (partially) reverts commit 5e238a87eacf2a0c62736c4123961651afb1ba87.
The dependency is changed from a 'select' to a 'depends on' to avoid a circular dependency caused by the introduction of OpenCV-3. This means we can also drop the threads and C++ dependencies, since they are now inherited via the depends on OpenCV.
---
Changes v2 -> v3;
- used 'depends on' instead of 'select' to avoid circular deps (Samuel)
--- package/gstreamer1/gst1-plugins-bad/Config.in | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-)
package/gstreamer1/gst1-plugins-bad/Config.in +15 -5
@@ -557,14 +557,24 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_NEON config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPENCV bool "opencv" - depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL - depends on BROKEN # gst1-plugin-opencv does not (yet) support opencv >=3.x + depends on BR2_PACKAGE_OPENCV + # Remove the following opencv modules when gstreamer fixes the + # problem of including the old "cv.h" header + # bug: https://bugzilla.gnome.org/show_bug.cgi?id=725163 + select BR2_PACKAGE_OPENCV_LIB_CALIB3D + select BR2_PACKAGE_OPENCV_LIB_CONTRIB + select BR2_PACKAGE_OPENCV_LIB_FEATURES2D + select BR2_PACKAGE_OPENCV_LIB_FLANN + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_LEGACY + select BR2_PACKAGE_OPENCV_LIB_ML + select BR2_PACKAGE_OPENCV_LIB_OBJDETECT + select BR2_PACKAGE_OPENCV_LIB_VIDEO help GStreamer OpenCV Plugins -comment "opencv plugin needs a toolchain w/ C++, NPTL" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS_NPTL +comment "opencv plugin needs OpenCV-2.4" + depends on !BR2_PACKAGE_OPENCV config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_OPUS bool "opus"
Signature · 1 line
1.9.1
PATCH 4/4 package/vlc: update opencv support
In reply to Yann E. MORINFrom: Samuel Martin <[email protected]>
vlc supports both opencv-2.4 and opencv-3, so adjust the vlc package to reflect this.
--- package/vlc/Config.in | 14 ++++++++++++-- package/vlc/vlc.mk | 6 +++++- 2 files changed, 17 insertions(+), 3 deletions(-)
package/vlc/Config.in +12 -2
@@ -11,8 +11,8 @@ config BR2_PACKAGE_VLC depends on BR2_TOOLCHAIN_HAS_THREADS depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_7 select BR2_PACKAGE_LIBVORBIS if BR2_PACKAGE_OPUS - select BR2_PACKAGE_OPENCV3_LIB_IMGPROC if BR2_PACKAGE_OPENCV3 - select BR2_PACKAGE_OPENCV3_LIB_OBJDETECT if BR2_PACKAGE_OPENCV3 + select BR2_PACKAGE_VLC_OPENCV_BACKEND if BR2_PACKAGE_OPENCV + select BR2_PACKAGE_VLC_OPENCV3_BACKEND if BR2_PACKAGE_OPENCV3 help VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVD,
@@ -20,6 +20,16 @@ config BR2_PACKAGE_VLC http://www.videolan.org/vlc/ +config BR2_PACKAGE_VLC_OPENCV_BACKEND + bool + select BR2_PACKAGE_OPENCV_LIB_IMGPROC + select BR2_PACKAGE_OPENCV_LIB_OBJDETECT + +config BR2_PACKAGE_VLC_OPENCV3_BACKEND + bool + select BR2_PACKAGE_OPENCV3_LIB_IMGPROC + select BR2_PACKAGE_OPENCV3_LIB_OBJDETECT + comment "vlc needs a uclibc snapshot, uclibc-ng or (e)glibc toolchain w/ C++, wchar, threads, headers >= 3.7" depends on !(BR2_UCLIBC_VERSION_SNAPSHOT || BR2_UCLIBC_VERSION_NG || BR2_TOOLCHAIN_USES_GLIBC) \ || !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR \
package/vlc/vlc.mk +5 -1
@@ -153,9 +153,13 @@ else VLC_CONF_OPTS += --disable-gles2 endif -ifeq ($(BR2_PACKAGE_OPENCV3),y) +ifeq ($(BR2_PACKAGE_OPENCV)$(BR2_PACKAGE_OPENCV3),y) VLC_CONF_OPTS += --enable-opencv +ifeq ($(BR2_PACKAGE_OPENCV),y) +VLC_DEPENDENCIES += opencv +else VLC_DEPENDENCIES += opencv3 +endif else VLC_CONF_OPTS += --disable-opencv endif
Signature · 1 line
1.9.1
Yann,
Quoted 5 lines · Yann E. MORIN
Samuel Martin (4):
package: rename opencv -> opencv3
package/opencv: re-introduce opencv for opencv-2.4
Revert "package/gstreamer1/gst1-plugins-bad: disable opencv plugin with opencv-3" package/vlc: update opencv support
Series applied to master, so that 2015.08 isn't introducing a regression in the OpenCV support.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com