diff --git a/package/opencv4/Config.in b/package/opencv4/Config.in index 23d34a9d22..a61a106952 100644 --- a/package/opencv4/Config.in +++ b/package/opencv4/Config.in @@ -30,6 +30,17 @@ config BR2_PACKAGE_OPENCV4_LIB_CALIB3D Include opencv_calib3d (camera calibration and 3d reconstruction) module into the OpenCV build. +config BR2_PACKAGE_OPENCV4_LIB_DNN + bool "dnn" + # dnn needs fenv.h which is not provided by uclibc + depends on !BR2_TOOLCHAIN_USES_UCLIBC + help + Include opencv_dnn (Deep Neural Networks) module into the + OpenCV build. + +comment "dnn needs a glibc or musl toolchain" + depends on BR2_TOOLCHAIN_USES_UCLIBC + config BR2_PACKAGE_OPENCV4_LIB_FEATURES2D bool "features2d" select BR2_PACKAGE_OPENCV4_LIB_FLANN diff --git a/package/opencv4/opencv4.mk b/package/opencv4/opencv4.mk index 0563026b18..84e0487dc4 100644 --- a/package/opencv4/opencv4.mk +++ b/package/opencv4/opencv4.mk @@ -92,6 +92,7 @@ OPENCV4_CONF_OPTS += \ -DBUILD_opencv_apps=OFF \ -DBUILD_opencv_calib3d=$(if $(BR2_PACKAGE_OPENCV4_LIB_CALIB3D),ON,OFF) \ -DBUILD_opencv_core=ON \ + -DBUILD_opencv_dnn=$(if $(BR2_PACKAGE_OPENCV4_LIB_DNN),ON,OFF) \ -DBUILD_opencv_features2d=$(if $(BR2_PACKAGE_OPENCV4_LIB_FEATURES2D),ON,OFF) \ -DBUILD_opencv_flann=$(if $(BR2_PACKAGE_OPENCV4_LIB_FLANN),ON,OFF) \ -DBUILD_opencv_highgui=$(if $(BR2_PACKAGE_OPENCV4_LIB_HIGHGUI),ON,OFF) \