* [Buildroot] [PATCH v3 0/8] OpenCV improvement
@ 2014-08-31 20:09 Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 1/8] opencv: rework V4L/libv4l support Samuel Martin
` (7 more replies)
0 siblings, 8 replies; 12+ messages in thread
From: Samuel Martin @ 2014-08-31 20:09 UTC (permalink / raw)
To: buildroot
[series formerly named "scientific packages"]
Hi all,
Here is a couple of improvement in OpenCV package and its reverse
dependencies.
Except the last patch (which fixes an autobuilder failure) , all the
others patches were originally issued within the "scientific packages"
series, but now only concerns OpenCV; hence the renaming of the series.
Cheers,
Samuel Martin (8):
opencv: rework V4L/libv4l support
opencv: add Qt5 support
opencv: add python/numpy support
opencv: define modules inter-dependencies
opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
vlc: add opencv support
gst1-plugins-bad: rework opencv plugin dependencies
package/opencv: fix ts module missing dependency to highgui
package/gstreamer1/gst1-plugins-bad/Config.in | 10 +-
package/opencv/Config.in | 146 ++++++++++++++++-----
...01-fix-cross-compilation-issue-with-Numpy.patch | 74 +++++++++++
...-ts-add-missing-opencv_highgui-dependency.patch | 26 ++++
package/opencv/opencv.mk | 32 ++++-
package/vlc/Config.in | 1 +
package/vlc/vlc.mk | 7 +
7 files changed, 247 insertions(+), 49 deletions(-)
create mode 100644 package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch
create mode 100644 package/opencv/opencv-0002-modules-ts-add-missing-opencv_highgui-dependency.patch
--
2.1.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 1/8] opencv: rework V4L/libv4l support
2014-08-31 20:09 [Buildroot] [PATCH v3 0/8] OpenCV improvement Samuel Martin
@ 2014-08-31 20:09 ` Samuel Martin
2014-09-14 22:15 ` Yann E. MORIN
2014-09-21 20:47 ` Thomas Petazzoni
2014-08-31 20:09 ` [Buildroot] [PATCH v3 2/8] opencv: add Qt5 support Samuel Martin
` (6 subsequent siblings)
7 siblings, 2 replies; 12+ messages in thread
From: Samuel Martin @ 2014-08-31 20:09 UTC (permalink / raw)
To: buildroot
Starting with the 2.4.7 release, for V4L support, OpenCV does not
requires a libv4l dependency for its V4L support.
So, it now provides 2 distincts knobs for this: WITH_V4L and a new
one: WITH_LIBV4L.
This patch takes advantage of this new knob and libv4l support is
now automatically enabled only if the libv4l package is enabled.
In OpenCV, the logic behind this is:
- using libv4l if available,
- otherwise, use v4l2 or v4l API from the kernel if available.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
chnages v2 -> v3:
- rebase
- remove comments about libv4l use (Yann)
changes v1 -> v2:
- rebase
- extend commit message
---
package/opencv/Config.in | 8 +-------
package/opencv/opencv.mk | 10 +++++++---
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 3f5051e..24f540e 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -205,16 +205,10 @@ config BR2_PACKAGE_OPENCV_WITH_TIFF
config BR2_PACKAGE_OPENCV_WITH_V4L
bool "v4l support"
- depends on BR2_LARGEFILE
- depends on BR2_TOOLCHAIN_HAS_THREADS
- depends on BR2_USE_MMU # libv4l fork
- select BR2_PACKAGE_LIBV4L
help
Enable Video 4 Linux support.
-comment "v4l support needs a toolchain w/ largefile, threads"
- depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
- depends on BR2_USE_MMU
+ If the package libv4l is enabled, its support is automatically enabled.
comment "Install options"
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 1341d32..2b649ff 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -220,10 +220,14 @@ OPENCV_CONF_OPT += -DWITH_TIFF=OFF
endif
ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y)
-OPENCV_CONF_OPT += -DWITH_V4L=ON -DWITH_LIBV4L=ON
-OPENCV_DEPENDENCIES += libv4l
+OPENCV_CONF_OPT += \
+ -DWITH_V4L=ON \
+ -DWITH_LIBV4L=$(if $(BR2_PACKAGE_LIBV4L),ON,OFF)
+OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBV4L),libv4l)
else
-OPENCV_CONF_OPT += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
+OPENCV_CONF_OPT += \
+ -DWITH_V4L=OFF \
+ -DWITH_LIBV4L=OFF
endif
# Installation hooks:
--
2.1.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 2/8] opencv: add Qt5 support
2014-08-31 20:09 [Buildroot] [PATCH v3 0/8] OpenCV improvement Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 1/8] opencv: rework V4L/libv4l support Samuel Martin
@ 2014-08-31 20:09 ` Samuel Martin
2014-09-14 22:40 ` Yann E. MORIN
2014-08-31 20:09 ` [Buildroot] [PATCH v3 3/8] opencv: add python/numpy support Samuel Martin
` (5 subsequent siblings)
7 siblings, 1 reply; 12+ messages in thread
From: Samuel Martin @ 2014-08-31 20:09 UTC (permalink / raw)
To: buildroot
Starting with the 2.4.6 release, OpenCV supports both Qt4 and Qt5,
but only one can be enable at the same time.
Since Buildroot does not support Qt4/Qt5 co-existence, we keep the Qt
support knob as a boolean, but make it depend on BR2_PACKAGE_QT or
BR2_PACKAGE_QT5, and automatically uses the enabled one.
Note that we usually use 'select ...' to express the dependencies
between packages, but in this case, we cannot since the Qt4/Qt5
co-existence exclusion is not handled by a simple choice, but by a
dependency. This makes impossible using 'select ...' for the Qt
support knob without triggering a circular dependency at the kconfig
level.
Besides, we already use 'depends on ...' to express the dependencies
with some "big" packages (like xorg or libgtk2). qt or qt5* packages
are fairly big. So, I don't think it will hurt that much to use a
'depends on ...' statement in this case.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v2 -> v3:
- rebase
- remove duplicate qt/qt5 dependencies (Yann)
- add missing 'depends on' to the comment about qt4
changes v1 -> v2:
- rebase
- update threads support dependency for qt5
---
package/opencv/Config.in | 42 +++++++++++++++++++++++++++++++-----------
package/opencv/opencv.mk | 4 ++--
2 files changed, 33 insertions(+), 13 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 24f540e..571309f 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -185,17 +185,37 @@ config BR2_PACKAGE_OPENCV_WITH_PNG
Use shared libpng from the target system.
config BR2_PACKAGE_OPENCV_WITH_QT
- bool "qt backend support"
- depends on BR2_INSTALL_LIBSTDCPP
- depends on !BR2_avr32 # qt
- depends on BR2_USE_MMU # qt
- depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
- select BR2_PACKAGE_QT
- select BR2_PACKAGE_QT_STL
- select BR2_PACKAGE_QT_GUI_MODULE
- select BR2_PACKAGE_QT_TEST
- help
- Use Qt with QtTest module and STL support
+ bool "qt support"
+ depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5
+ select BR2_PACKAGE_QT_STL if BR2_PACKAGE_QT
+ select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_QT && \
+ BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+ select BR2_PACKAGE_QT_TEST if BR2_PACKAGE_QT && \
+ BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+ select BR2_PACKAGE_QT5BASE if BR2_PACKAGE_QT5
+ select BR2_PACKAGE_QT5BASE_CONCURRENT if BR2_PACKAGE_QT5
+ select BR2_PACKAGE_QT5BASE_TEST if BR2_PACKAGE_QT5
+ select BR2_PACKAGE_QT5BASE_GUI if BR2_PACKAGE_QT5
+ select BR2_PACKAGE_QT5BASE_WIDGETS if BR2_PACKAGE_QT5
+ help
+ Enable Qt support for OpenCV.
+
+ If Qt4 is already enabled, then use Qt4 with QtTest and QtGui modules
+ and STL support.
+
+ If Qt5 is already enabled, then use Qt5 with the following components:
+ base, concurrent, test, gui and widgets.
+
+if !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
+comment "qt support with Qt4 needs qt"
+ depends on !BR2_avr32
+
+comment "qt support with Qt5 needs qt5"
+ depends on BR2_USE_MMU && BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS
+
+comment "qt support with Qt5 needs a toolchain w/ wchar, IPv6, theads"
+ depends on !BR2_USE_MMU || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL
+endif
config BR2_PACKAGE_OPENCV_WITH_TIFF
bool "tiff support"
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 2b649ff..00a9e22 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -206,8 +206,8 @@ OPENCV_CONF_OPT += -DWITH_PNG=OFF
endif
ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
-OPENCV_CONF_OPT += -DWITH_QT=4
-OPENCV_DEPENDENCIES += qt
+OPENCV_CONF_OPT += -DWITH_QT=$(if $(BR2_PACKAGE_QT),4,5)
+OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_QT),qt,qt5base)
else
OPENCV_CONF_OPT += -DWITH_QT=OFF
endif
--
2.1.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 3/8] opencv: add python/numpy support
2014-08-31 20:09 [Buildroot] [PATCH v3 0/8] OpenCV improvement Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 1/8] opencv: rework V4L/libv4l support Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 2/8] opencv: add Qt5 support Samuel Martin
@ 2014-08-31 20:09 ` Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 4/8] opencv: define modules inter-dependencies Samuel Martin
` (4 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Samuel Martin @ 2014-08-31 20:09 UTC (permalink / raw)
To: buildroot
opencv_python module needs python-numpy because it uses some numpy
headers in this wrapper.
A patch in the OpenCV's build-system is also needed to prevent it from
trying to run python for numpy detection. This patch has already been
integrated upstream.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v2 -> v3:
- rebase
- add fetch uri in the opencv's patch (Yann)
- move pyhton module knob under the multi-line if block about python deps
(Yann)
changes v1 -> v2:
- rebase
- use patch merged upstream
---
package/opencv/Config.in | 7 +-
...01-fix-cross-compilation-issue-with-Numpy.patch | 74 ++++++++++++++++++++++
package/opencv/opencv.mk | 18 +++++-
3 files changed, 96 insertions(+), 3 deletions(-)
create mode 100644 package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 571309f..d725d44 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -84,7 +84,12 @@ config BR2_PACKAGE_OPENCV_LIB_PHOTO
help
Include opencv_photo module into the OpenCV build.
-comment "opencv_python module requires numpy which is not yet available."
+config BR2_PACKAGE_OPENCV_LIB_PYTHON
+ bool "python"
+ depends on BR2_PACKAGE_PYTHON
+ help
+ Include opencv_python module into the OpenCV build.
+ No python example is installed.
config BR2_PACKAGE_OPENCV_LIB_STITCHING
bool "stitching"
diff --git a/package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch b/package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch
new file mode 100644
index 0000000..b661a32
--- /dev/null
+++ b/package/opencv/opencv-0001-fix-cross-compilation-issue-with-Numpy.patch
@@ -0,0 +1,74 @@
+Fetch from:
+ https://github.com/Itseez/opencv/commit/6cb90c0e976ff24af85167e71d88c9d9b2ed06c7
+---
+From 6cb90c0e976ff24af85167e71d88c9d9b2ed06c7 Mon Sep 17 00:00:00 2001
+From: Vincent Rabaud <vrabaud@aldebaran-robotics.com>
+Date: Mon, 20 Jan 2014 10:23:46 +0100
+Subject: [PATCH] fix cross-compilation issue with Numpy
+
+---
+ cmake/OpenCVDetectPython.cmake | 37 +++++++++++++++++++++++++++++--------
+ 1 file changed, 29 insertions(+), 8 deletions(-)
+
+diff --git a/cmake/OpenCVDetectPython.cmake b/cmake/OpenCVDetectPython.cmake
+index 3326bcd..8c488e6 100644
+--- a/cmake/OpenCVDetectPython.cmake
++++ b/cmake/OpenCVDetectPython.cmake
+@@ -80,14 +80,29 @@ if(PYTHON_EXECUTABLE)
+ endif()
+ SET(PYTHON_PACKAGES_PATH "${_PYTHON_PACKAGES_PATH}" CACHE PATH "Where to install the python packages.")
+
+- if(NOT PYTHON_NUMPY_INCLUDE_DIR)
+- # Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy
+- execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print numpy.distutils.misc_util.get_numpy_include_dirs()[0]"
+- RESULT_VARIABLE PYTHON_NUMPY_PROCESS
+- OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR
+- OUTPUT_STRIP_TRAILING_WHITESPACE)
++ if(NOT CMAKE_CROSSCOMPILING)
++ if(NOT PYTHON_NUMPY_INCLUDE_DIR)
++ # Attempt to discover the NumPy include directory. If this succeeds, then build python API with NumPy
++ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import os; os.environ['DISTUTILS_USE_SDK']='1'; import numpy.distutils; print numpy.distutils.misc_util.get_numpy_include_dirs()[0]"
++ RESULT_VARIABLE PYTHON_NUMPY_PROCESS
++ OUTPUT_VARIABLE PYTHON_NUMPY_INCLUDE_DIR
++ OUTPUT_STRIP_TRAILING_WHITESPACE)
+
+- if(PYTHON_NUMPY_PROCESS EQUAL 0)
++ if(PYTHON_NUMPY_PROCESS EQUAL 0)
++ file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" _PYTHON_NUMPY_INCLUDE_DIR)
++ set(PYTHON_NUMPY_INCLUDE_DIR ${_PYTHON_NUMPY_INCLUDE_DIR} CACHE PATH "Path to numpy headers")
++ endif()
++ endif()
++ else()
++ if(NOT PYTHON_NUMPY_INCLUDE_DIR)
++ message(STATUS "Cannot probe for Python/Numpy support (because we are cross-compiling OpenCV)")
++ message(STATUS "If you want to enable Python/Numpy support, set the following variables:")
++ message(STATUS " PYTHON_EXECUTABLE")
++ message(STATUS " PYTHON_INCLUDE_DIR")
++ message(STATUS " PYTHON_LIBRARY")
++ message(STATUS " PYTHON_NUMPY_INCLUDE_DIR")
++ message(STATUS " PYTHON_NUMPY_VERSION")
++ else()
+ file(TO_CMAKE_PATH "${PYTHON_NUMPY_INCLUDE_DIR}" _PYTHON_NUMPY_INCLUDE_DIR)
+ set(PYTHON_NUMPY_INCLUDE_DIR ${_PYTHON_NUMPY_INCLUDE_DIR} CACHE PATH "Path to numpy headers")
+ endif()
+@@ -95,10 +110,16 @@ if(PYTHON_EXECUTABLE)
+
+ if(PYTHON_NUMPY_INCLUDE_DIR)
+ set(PYTHON_USE_NUMPY TRUE)
+- execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.version.version"
++ if(NOT CMAKE_CROSSCOMPILING)
++ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.version.version"
+ RESULT_VARIABLE PYTHON_NUMPY_PROCESS
+ OUTPUT_VARIABLE PYTHON_NUMPY_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
++ else()
++ if(NOT PYTHON_NUMPY_VERSION)
++ set(PYTHON_NUMPY_VERSION "undefined - cannot be probed because of the cross-compilation")
++ endif()
++ endif()
+ endif()
+ endif(NOT ANDROID AND NOT IOS)
+
+--
+1.9.0
+
diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
index 00a9e22..807b7d8 100644
--- a/package/opencv/opencv.mk
+++ b/package/opencv/opencv.mk
@@ -60,7 +60,6 @@ OPENCV_CONF_OPT += \
-DBUILD_opencv_objdetect=$(if $(BR2_PACKAGE_OPENCV_LIB_OBJDETECT),ON,OFF) \
-DBUILD_opencv_ocl=OFF \
-DBUILD_opencv_photo=$(if $(BR2_PACKAGE_OPENCV_LIB_PHOTO),ON,OFF) \
- -DBUILD_opencv_python=OFF \
-DBUILD_opencv_stitching=$(if $(BR2_PACKAGE_OPENCV_LIB_STITCHING),ON,OFF) \
-DBUILD_opencv_superres=$(if $(BR2_PACKAGE_OPENCV_LIB_SUPERRES),ON,OFF) \
-DBUILD_opencv_ts=$(if $(BR2_PACKAGE_OPENCV_LIB_TS),ON,OFF) \
@@ -142,7 +141,6 @@ OPENCV_CONF_OPT += \
-DBUILD_PNG=OFF \
-DBUILD_TIFF=OFF \
-DBUILD_ZLIB=OFF \
- -DBUILD_NEW_PYTHON_SUPPORT=OFF \
-DINSTALL_C_EXAMPLES=OFF \
-DINSTALL_PYTHON_EXAMPLES=OFF \
-DINSTALL_TO_MANGLED_PATHS=OFF
@@ -230,6 +228,22 @@ OPENCV_CONF_OPT += \
-DWITH_LIBV4L=OFF
endif
+ifeq ($(BR2_PACKAGE_OPENCV_LIB_PYTHON),y)
+OPENCV_CONF_OPT += \
+ -DBUILD_opencv_python=ON \
+ -DBUILD_NEW_PYTHON_SUPPORT=ON \
+ -DPYTHON_EXECUTABLE=$(HOST_DIR)/usr/bin/python2 \
+ -DPYTHON_INCLUDE_DIR=$(STAGING_DIR)/usr/include/python$(PYTHON_VERSION_MAJOR) \
+ -DPYTHON_LIBRARY=$(STAGING_DIR)/usr/lib/libpython$(PYTHON_VERSION_MAJOR).so \
+ -DPYTHON_NUMPY_INCLUDE_DIR=$(STAGING_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages/numpy/core/include \
+ -DPYTHON_NUMPY_VERSION=$(PYTHON_NUMPY_VERSION)
+OPENCV_DEPENDENCIES += python python-numpy
+else
+OPENCV_CONF_OPT += \
+ -DBUILD_opencv_python=ON \
+ -DBUILD_NEW_PYTHON_SUPPORT=OFF
+endif
+
# Installation hooks:
define OPENCV_CLEAN_INSTALL_DOC
$(RM) -fr $(TARGET_DIR)/usr/share/OpenCV/doc
--
2.1.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 4/8] opencv: define modules inter-dependencies
2014-08-31 20:09 [Buildroot] [PATCH v3 0/8] OpenCV improvement Samuel Martin
` (2 preceding siblings ...)
2014-08-31 20:09 ` [Buildroot] [PATCH v3 3/8] opencv: add python/numpy support Samuel Martin
@ 2014-08-31 20:09 ` Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 5/8] opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS Samuel Martin
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Samuel Martin @ 2014-08-31 20:09 UTC (permalink / raw)
To: buildroot
OpenCV allows to enable/disable the selection of modules (a.k.a.
opencv libraries). These modules depend one on the others; these
dependencies are already handled by the build-system (CMake).
However, the way we handled them in Buildroot was not really clean.
For each opencv module, there is a kconfig option, but we forced the
corresponding cmake config option without checking for module
dependencies.
This patch replicates the modules' dependency relations in the
Config.in, so that the selection of the user will actually be built.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v2 -> v3:
- rebase
- fix typo in commit log (Yann)
- update A/R/T tags
changes v1 -> v2:
- rebase
---
package/opencv/Config.in | 75 ++++++++++++++++++++++++++++++++++++++----------
1 file changed, 60 insertions(+), 15 deletions(-)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index d725d44..7c2b964 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -8,6 +8,8 @@ menuconfig BR2_PACKAGE_OPENCV
OpenCV (Open Source Computer Vision) is a library of programming
functions for real time computer vision.
+ Note that the opencv_core module is automatically enabled.
+
http://opencv.org/
if BR2_PACKAGE_OPENCV
@@ -16,109 +18,152 @@ comment "OpenCV modules"
config BR2_PACKAGE_OPENCV_LIB_CALIB3D
bool "calib3d"
- default y
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+ select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
help
Include opencv_calib3d module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_CONTRIB
bool "contrib"
- default y
+ select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+ select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+ select BR2_PACKAGE_OPENCV_LIB_ML
+ select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
+ select BR2_PACKAGE_OPENCV_LIB_VIDEO
help
Include opencv_contrib module into the OpenCV build.
+# opencv_core module is automatically enabled when OpenCV package is selected
+
config BR2_PACKAGE_OPENCV_LIB_FEATURES2D
bool "features2d"
- default y
+ select BR2_PACKAGE_OPENCV_LIB_FLANN
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
help
Include opencv_features2d module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_FLANN
bool "flann"
- default y
+ # opencv_core dependency is already enabled
help
Include opencv_flann module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_GPU
bool "gpu"
+ select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+ select BR2_PACKAGE_OPENCV_LIB_LEGACY
+ select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
+ select BR2_PACKAGE_OPENCV_LIB_PHOTO
+ select BR2_PACKAGE_OPENCV_LIB_VIDEO
help
Include opencv_gpu module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_HIGHGUI
bool "highgui"
- default y
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
help
Include opencv_highgui module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_IMGPROC
bool "imgproc"
- default y
+ # opencv_core dependency is already enabled
help
Include opencv_imgproc module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_LEGACY
bool "legacy"
- default y
+ select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+ select BR2_PACKAGE_OPENCV_LIB_ML
+ select BR2_PACKAGE_OPENCV_LIB_VIDEO
help
Include opencv_legacy module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_ML
bool "ml (machine learning)"
- default y
+ # opencv_core dependency is already enabled
help
Include opencv_ml module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_NONFREE
bool "nonfree"
+ select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+ select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
help
Include opencv_nonfree module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_OBJDETECT
bool "objdetect"
- default y
+ # opencv_core dependency is already enabled
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
help
Include opencv_objdetect module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_PHOTO
bool "photo"
- default y
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
help
Include opencv_photo module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_PYTHON
bool "python"
depends on BR2_PACKAGE_PYTHON
+ # opencv_core dependency is already enabled
+ 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_HIGHGUI
+ 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_PHOTO
+ select BR2_PACKAGE_OPENCV_LIB_VIDEO
help
Include opencv_python module into the OpenCV build.
No python example is installed.
config BR2_PACKAGE_OPENCV_LIB_STITCHING
bool "stitching"
- default y
+ select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+ select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+ select BR2_PACKAGE_OPENCV_LIB_OBJDETECT
help
Include opencv_stitching module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_SUPERRES
bool "superres"
- default y
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+ select BR2_PACKAGE_OPENCV_LIB_VIDEO
help
Include opencv_superres "super resolution" - module into the OpenCV
build.
config BR2_PACKAGE_OPENCV_LIB_TS
bool "ts (touchscreen)"
- default y
+ # opencv_core dependency is already enabled
+ select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
help
Include opencv_ts module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_VIDEO
bool "video"
- default y
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
help
Include opencv_video module into the OpenCV build.
config BR2_PACKAGE_OPENCV_LIB_VIDEOSTAB
bool "videostab"
- default y
+ select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+ select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+ select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+ select BR2_PACKAGE_OPENCV_LIB_IMGPROC
+ select BR2_PACKAGE_OPENCV_LIB_PHOTO
+ select BR2_PACKAGE_OPENCV_LIB_VIDEO
help
Include opencv_videostab module into the OpenCV build.
--
2.1.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 5/8] opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
2014-08-31 20:09 [Buildroot] [PATCH v3 0/8] OpenCV improvement Samuel Martin
` (3 preceding siblings ...)
2014-08-31 20:09 ` [Buildroot] [PATCH v3 4/8] opencv: define modules inter-dependencies Samuel Martin
@ 2014-08-31 20:09 ` Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 6/8] vlc: add opencv support Samuel Martin
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: Samuel Martin @ 2014-08-31 20:09 UTC (permalink / raw)
To: buildroot
This new hidden symbol aims to automatically select all OpenCV modules
required when another package use the deprecated OpenCV 'cv.h' headers.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v2 -> v3:
- rebase
- update A/R/T tags
changes v1 -> v2:
- new patch
---
package/opencv/Config.in | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 7c2b964..83771d4 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -14,6 +14,21 @@ menuconfig BR2_PACKAGE_OPENCV
if BR2_PACKAGE_OPENCV
+config BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
+ bool
+ select BR2_PACKAGE_OPENCV_LIB_CALIB3D
+ select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+ select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
+ 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_PHOTO
+ select BR2_PACKAGE_OPENCV_LIB_VIDEO
+ help
+ Select all required modules needed by the deprecated OpenCV API
+ (cv.h, cvaux.h, cxcore.h, etc).
+
comment "OpenCV modules"
config BR2_PACKAGE_OPENCV_LIB_CALIB3D
--
2.1.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 6/8] vlc: add opencv support
2014-08-31 20:09 [Buildroot] [PATCH v3 0/8] OpenCV improvement Samuel Martin
` (4 preceding siblings ...)
2014-08-31 20:09 ` [Buildroot] [PATCH v3 5/8] opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS Samuel Martin
@ 2014-08-31 20:09 ` Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 7/8] gst1-plugins-bad: rework opencv plugin dependencies Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 8/8] package/opencv: fix ts module missing dependency to highgui Samuel Martin
7 siblings, 0 replies; 12+ messages in thread
From: Samuel Martin @ 2014-08-31 20:09 UTC (permalink / raw)
To: buildroot
Add OpenCV support for video filter in vlc.
vlc source code still includes the headers from the deprecated OpenCV
API.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v2 -> v3:
- rebase
- update A/R/T tags
changes v1 -> v2:
- new patch
---
package/vlc/Config.in | 1 +
package/vlc/vlc.mk | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/package/vlc/Config.in b/package/vlc/Config.in
index cdb0d16..ede9269 100644
--- a/package/vlc/Config.in
+++ b/package/vlc/Config.in
@@ -11,6 +11,7 @@ config BR2_PACKAGE_VLC
depends on BR2_USE_WCHAR
depends on BR2_TOOLCHAIN_HAS_THREADS
select BR2_PACKAGE_LIBVORBIS if BR2_PACKAGE_OPUS
+ select BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS if BR2_PACKAGE_OPENCV
help
VLC is a free and open source cross-platform multimedia player
and framework that plays most multimedia files as well as DVD,
diff --git a/package/vlc/vlc.mk b/package/vlc/vlc.mk
index ad9f485..f46de3f 100644
--- a/package/vlc/vlc.mk
+++ b/package/vlc/vlc.mk
@@ -124,6 +124,13 @@ else
VLC_CONF_OPT += --disable-glx
endif
+ifeq ($(BR2_PACKAGE_OPENCV),y)
+VCL_CONF_OPT += --with-opencv
+VLC_DEPENDENCIES += opencv
+else
+VLC_CONF_OPT += --without-opencv
+endif
+
ifeq ($(BR2_PACKAGE_OPUS),y)
VLC_CONF_OPT += --enable-opus
VLC_DEPENDENCIES += libvorbis opus
--
2.1.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 7/8] gst1-plugins-bad: rework opencv plugin dependencies
2014-08-31 20:09 [Buildroot] [PATCH v3 0/8] OpenCV improvement Samuel Martin
` (5 preceding siblings ...)
2014-08-31 20:09 ` [Buildroot] [PATCH v3 6/8] vlc: add opencv support Samuel Martin
@ 2014-08-31 20:09 ` Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 8/8] package/opencv: fix ts module missing dependency to highgui Samuel Martin
7 siblings, 0 replies; 12+ messages in thread
From: Samuel Martin @ 2014-08-31 20:09 UTC (permalink / raw)
To: buildroot
gst1 opencv plugin source code still include OpenCV's headers from its
deprecated API.
Use the newly introduced BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS to
select all required OpenCV module dependencies.
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
---
changes v2 -> v3:
- rebase
- update A/R/T tags
changes v1 -> v2:
- new patch
---
package/gstreamer1/gst1-plugins-bad/Config.in | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/package/gstreamer1/gst1-plugins-bad/Config.in b/package/gstreamer1/gst1-plugins-bad/Config.in
index 054ed87..c1433f1 100644
--- a/package/gstreamer1/gst1-plugins-bad/Config.in
+++ b/package/gstreamer1/gst1-plugins-bad/Config.in
@@ -430,15 +430,7 @@ config BR2_PACKAGE_GST1_PLUGINS_BAD_PLUGIN_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
+ select BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS
help
GStreamer OpenCV Plugins
--
2.1.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 8/8] package/opencv: fix ts module missing dependency to highgui
2014-08-31 20:09 [Buildroot] [PATCH v3 0/8] OpenCV improvement Samuel Martin
` (6 preceding siblings ...)
2014-08-31 20:09 ` [Buildroot] [PATCH v3 7/8] gst1-plugins-bad: rework opencv plugin dependencies Samuel Martin
@ 2014-08-31 20:09 ` Samuel Martin
7 siblings, 0 replies; 12+ messages in thread
From: Samuel Martin @ 2014-08-31 20:09 UTC (permalink / raw)
To: buildroot
Fixes:
http://autobuild.buildroot.net/results/3dc/3dc3e10e412d87937adae4d20a67cc4557bb328b/
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
---
changes v2 -> v3:
- new patch
---
package/opencv/Config.in | 1 +
...-ts-add-missing-opencv_highgui-dependency.patch | 26 ++++++++++++++++++++++
2 files changed, 27 insertions(+)
create mode 100644 package/opencv/opencv-0002-modules-ts-add-missing-opencv_highgui-dependency.patch
diff --git a/package/opencv/Config.in b/package/opencv/Config.in
index 83771d4..7b59e6c 100644
--- a/package/opencv/Config.in
+++ b/package/opencv/Config.in
@@ -162,6 +162,7 @@ config BR2_PACKAGE_OPENCV_LIB_TS
bool "ts (touchscreen)"
# opencv_core dependency is already enabled
select BR2_PACKAGE_OPENCV_LIB_FEATURES2D
+ select BR2_PACKAGE_OPENCV_LIB_HIGHGUI
help
Include opencv_ts module into the OpenCV build.
diff --git a/package/opencv/opencv-0002-modules-ts-add-missing-opencv_highgui-dependency.patch b/package/opencv/opencv-0002-modules-ts-add-missing-opencv_highgui-dependency.patch
new file mode 100644
index 0000000..1238703
--- /dev/null
+++ b/package/opencv/opencv-0002-modules-ts-add-missing-opencv_highgui-dependency.patch
@@ -0,0 +1,26 @@
+From 1ac234b4a5d4e6c562daa5f17193403f59a9a3a0 Mon Sep 17 00:00:00 2001
+From: Samuel Martin <s.martin49@gmail.com>
+Date: Sat, 30 Aug 2014 14:09:44 +0200
+Subject: [PATCH] modules/ts: add missing opencv_highgui dependency
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+---
+ modules/ts/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/modules/ts/CMakeLists.txt b/modules/ts/CMakeLists.txt
+index bb56da2..8fa8a58 100644
+--- a/modules/ts/CMakeLists.txt
++++ b/modules/ts/CMakeLists.txt
+@@ -9,7 +9,7 @@ set(OPENCV_MODULE_IS_PART_OF_WORLD FALSE)
+
+ ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef)
+
+-ocv_add_module(ts opencv_core opencv_features2d)
++ocv_add_module(ts opencv_core opencv_features2d opencv_highgui)
+
+ ocv_glob_module_sources()
+ ocv_module_include_directories()
+--
+2.1.0
+
--
2.1.0
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 1/8] opencv: rework V4L/libv4l support
2014-08-31 20:09 ` [Buildroot] [PATCH v3 1/8] opencv: rework V4L/libv4l support Samuel Martin
@ 2014-09-14 22:15 ` Yann E. MORIN
2014-09-21 20:47 ` Thomas Petazzoni
1 sibling, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-09-14 22:15 UTC (permalink / raw)
To: buildroot
Samuel, All,
On 2014-08-31 22:09 +0200, Samuel Martin spake thusly:
> Starting with the 2.4.7 release, for V4L support, OpenCV does not
> requires a libv4l dependency for its V4L support.
>
> So, it now provides 2 distincts knobs for this: WITH_V4L and a new
> one: WITH_LIBV4L.
>
> This patch takes advantage of this new knob and libv4l support is
> now automatically enabled only if the libv4l package is enabled.
>
> In OpenCV, the logic behind this is:
> - using libv4l if available,
> - otherwise, use v4l2 or v4l API from the kernel if available.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
>
> ---
> chnages v2 -> v3:
> - rebase
> - remove comments about libv4l use (Yann)
>
> changes v1 -> v2:
> - rebase
> - extend commit message
> ---
> package/opencv/Config.in | 8 +-------
> package/opencv/opencv.mk | 10 +++++++---
> 2 files changed, 8 insertions(+), 10 deletions(-)
>
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 3f5051e..24f540e 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -205,16 +205,10 @@ config BR2_PACKAGE_OPENCV_WITH_TIFF
>
> config BR2_PACKAGE_OPENCV_WITH_V4L
> bool "v4l support"
> - depends on BR2_LARGEFILE
> - depends on BR2_TOOLCHAIN_HAS_THREADS
> - depends on BR2_USE_MMU # libv4l fork
> - select BR2_PACKAGE_LIBV4L
> help
> Enable Video 4 Linux support.
>
> -comment "v4l support needs a toolchain w/ largefile, threads"
> - depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS
> - depends on BR2_USE_MMU
> + If the package libv4l is enabled, its support is automatically enabled.
>
> comment "Install options"
>
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 1341d32..2b649ff 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -220,10 +220,14 @@ OPENCV_CONF_OPT += -DWITH_TIFF=OFF
> endif
>
> ifeq ($(BR2_PACKAGE_OPENCV_WITH_V4L),y)
> -OPENCV_CONF_OPT += -DWITH_V4L=ON -DWITH_LIBV4L=ON
> -OPENCV_DEPENDENCIES += libv4l
> +OPENCV_CONF_OPT += \
> + -DWITH_V4L=ON \
> + -DWITH_LIBV4L=$(if $(BR2_PACKAGE_LIBV4L),ON,OFF)
> +OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_LIBV4L),libv4l)
> else
> -OPENCV_CONF_OPT += -DWITH_V4L=OFF -DWITH_LIBV4L=OFF
> +OPENCV_CONF_OPT += \
> + -DWITH_V4L=OFF \
> + -DWITH_LIBV4L=OFF
Gratuituous reformating. Besides, the previous line fit in 80-chars, so
there is no real reason to reformat it.
With that fixed:
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> endif
>
> # Installation hooks:
> --
> 2.1.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 2/8] opencv: add Qt5 support
2014-08-31 20:09 ` [Buildroot] [PATCH v3 2/8] opencv: add Qt5 support Samuel Martin
@ 2014-09-14 22:40 ` Yann E. MORIN
0 siblings, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2014-09-14 22:40 UTC (permalink / raw)
To: buildroot
Samuel, All,
On 2014-08-31 22:09 +0200, Samuel Martin spake thusly:
> Starting with the 2.4.6 release, OpenCV supports both Qt4 and Qt5,
> but only one can be enable at the same time.
[--SNIP--]
> diff --git a/package/opencv/Config.in b/package/opencv/Config.in
> index 24f540e..571309f 100644
> --- a/package/opencv/Config.in
> +++ b/package/opencv/Config.in
> @@ -185,17 +185,37 @@ config BR2_PACKAGE_OPENCV_WITH_PNG
> Use shared libpng from the target system.
>
> config BR2_PACKAGE_OPENCV_WITH_QT
> - bool "qt backend support"
> - depends on BR2_INSTALL_LIBSTDCPP
> - depends on !BR2_avr32 # qt
> - depends on BR2_USE_MMU # qt
> - depends on BR2_PACKAGE_OPENCV_LIB_HIGHGUI
> - select BR2_PACKAGE_QT
> - select BR2_PACKAGE_QT_STL
> - select BR2_PACKAGE_QT_GUI_MODULE
> - select BR2_PACKAGE_QT_TEST
> - help
> - Use Qt with QtTest module and STL support
> + bool "qt support"
> + depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5
> + select BR2_PACKAGE_QT_STL if BR2_PACKAGE_QT
> + select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_QT && \
> + BR2_PACKAGE_OPENCV_LIB_HIGHGUI
> + select BR2_PACKAGE_QT_TEST if BR2_PACKAGE_QT && \
> + BR2_PACKAGE_OPENCV_LIB_HIGHGUI
> + select BR2_PACKAGE_QT5BASE if BR2_PACKAGE_QT5
> + select BR2_PACKAGE_QT5BASE_CONCURRENT if BR2_PACKAGE_QT5
> + select BR2_PACKAGE_QT5BASE_TEST if BR2_PACKAGE_QT5
> + select BR2_PACKAGE_QT5BASE_GUI if BR2_PACKAGE_QT5
> + select BR2_PACKAGE_QT5BASE_WIDGETS if BR2_PACKAGE_QT5
I think all those select are ugly. Did you give a thought at my proposal
in my previous review:
http://lists.busybox.net/pipermail/buildroot/2014-May/095737.html
where I suggested something like:
---8<---
config BR2_PACKAGE_OPENCV_WITH_QT
bool "Qt backend"
depends on BR2_PACKAGE_QT || BR2_PACKAGE_QT5
select BR2_PACKAGE_OPENCV_QT4_BACKEND if BR2_PACKAGE_QT
select BR2_PACKAGE_OPENCV_QT5_BACKEND if BR2_PACKAGE_QT5
help
Enable Qt support for OpenCV.
This uses whatever Qt version you enabled: Qt4 or Qt5.
config BR2_PACKAGE_OPENCV_QT4_BACKEND
bool
select BR2_PACKAGE_QT_STL
select BR2_PACKAGE_QT_GUI_MODULE if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
select BR2_PACKAGE_QT_TEST if BR2_PACKAGE_OPENCV_LIB_HIGHGUI
config BR2_PACKAGE_OPENCV_QT5_BACKEND
bool
select BR2_PACKAGE_QT5BASE
select BR2_PACKAGE_QT5BASE_CONCURRENT
select BR2_PACKAGE_QT5BASE_TEST
select BR2_PACKAGE_QT5BASE_GUI
select BR2_PACKAGE_QT5BASE_WIDGETS
comment "Qt backend needs either Qt4 or Qt5"
depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
Then, as soon as one or the other is selected, the comment disapears,
and the option becomes visible.
---8<---
> + help
> + Enable Qt support for OpenCV.
> +
> + If Qt4 is already enabled, then use Qt4 with QtTest and QtGui modules
> + and STL support.
> +
> + If Qt5 is already enabled, then use Qt5 with the following components:
> + base, concurrent, test, gui and widgets.
> +
> +if !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
> +comment "qt support with Qt4 needs qt"
> + depends on !BR2_avr32
> +
> +comment "qt support with Qt5 needs qt5"
> + depends on BR2_USE_MMU && BR2_INET_IPV6 && BR2_TOOLCHAIN_HAS_THREADS
> +
> +comment "qt support with Qt5 needs a toolchain w/ wchar, IPv6, theads"
> + depends on !BR2_USE_MMU || !BR2_INET_IPV6 || !BR2_TOOLCHAIN_HAS_THREADS_NPTL
> +endif
Something lokks fichy with those comments. What about not trying to be
smart, and just say that Qt support requires eithe Qt or Qt5 to be
enabled:
comment "Qt support needs either Qt or Qt5 to be enabled"
depends on !BR2_PACKAGE_QT && !BR2_PACKAGE_QT5
and let the user do his work by enabling either.
Of course, it requires extra depends to be applied, so as to hide the
comment when neither Qt nor Qt5 are available (MMU, arch...)
Regards,
Yann E. MORIN.
> config BR2_PACKAGE_OPENCV_WITH_TIFF
> bool "tiff support"
> diff --git a/package/opencv/opencv.mk b/package/opencv/opencv.mk
> index 2b649ff..00a9e22 100644
> --- a/package/opencv/opencv.mk
> +++ b/package/opencv/opencv.mk
> @@ -206,8 +206,8 @@ OPENCV_CONF_OPT += -DWITH_PNG=OFF
> endif
>
> ifeq ($(BR2_PACKAGE_OPENCV_WITH_QT),y)
> -OPENCV_CONF_OPT += -DWITH_QT=4
> -OPENCV_DEPENDENCIES += qt
> +OPENCV_CONF_OPT += -DWITH_QT=$(if $(BR2_PACKAGE_QT),4,5)
> +OPENCV_DEPENDENCIES += $(if $(BR2_PACKAGE_QT),qt,qt5base)
> else
> OPENCV_CONF_OPT += -DWITH_QT=OFF
> endif
> --
> 2.1.0
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| 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. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Buildroot] [PATCH v3 1/8] opencv: rework V4L/libv4l support
2014-08-31 20:09 ` [Buildroot] [PATCH v3 1/8] opencv: rework V4L/libv4l support Samuel Martin
2014-09-14 22:15 ` Yann E. MORIN
@ 2014-09-21 20:47 ` Thomas Petazzoni
1 sibling, 0 replies; 12+ messages in thread
From: Thomas Petazzoni @ 2014-09-21 20:47 UTC (permalink / raw)
To: buildroot
Dear Samuel Martin,
On Sun, 31 Aug 2014 22:09:03 +0200, Samuel Martin wrote:
> Starting with the 2.4.7 release, for V4L support, OpenCV does not
> requires a libv4l dependency for its V4L support.
>
> So, it now provides 2 distincts knobs for this: WITH_V4L and a new
> one: WITH_LIBV4L.
>
> This patch takes advantage of this new knob and libv4l support is
> now automatically enabled only if the libv4l package is enabled.
>
> In OpenCV, the logic behind this is:
> - using libv4l if available,
> - otherwise, use v4l2 or v4l API from the kernel if available.
>
> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Thanks, applied, after tweaking the commit as suggested by Yann (do not
do a gratuitous reformatting).
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-09-21 20:47 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-31 20:09 [Buildroot] [PATCH v3 0/8] OpenCV improvement Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 1/8] opencv: rework V4L/libv4l support Samuel Martin
2014-09-14 22:15 ` Yann E. MORIN
2014-09-21 20:47 ` Thomas Petazzoni
2014-08-31 20:09 ` [Buildroot] [PATCH v3 2/8] opencv: add Qt5 support Samuel Martin
2014-09-14 22:40 ` Yann E. MORIN
2014-08-31 20:09 ` [Buildroot] [PATCH v3 3/8] opencv: add python/numpy support Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 4/8] opencv: define modules inter-dependencies Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 5/8] opencv: add hidden symbol BR2_PACKAGE_OPENCV_USE_DEPRECATED_HEADERS Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 6/8] vlc: add opencv support Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 7/8] gst1-plugins-bad: rework opencv plugin dependencies Samuel Martin
2014-08-31 20:09 ` [Buildroot] [PATCH v3 8/8] package/opencv: fix ts module missing dependency to highgui Samuel Martin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox