1menuconfig BR2_PACKAGE_OPENCV4 2 bool "opencv4" 3 depends on BR2_TOOLCHAIN_HAS_ATOMIC 4 depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL 5 depends on BR2_INSTALL_LIBSTDCPP 6 depends on BR2_USE_WCHAR 7 depends on !BR2_STATIC_LIBS # include dlfcn.h 8 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 # C++11 9 depends on !BR2_PACKAGE_OPENCV3 10 select BR2_PACKAGE_ZLIB 11 help 12 OpenCV (Open Source Computer Vision) is a library of 13 programming functions for real time computer vision. 14 15 Note that the opencv_core module and the opencv_hal library 16 are always built and installed, not matter which other 17 modules are enabled below. 18 19 http://opencv.org/ 20 21if BR2_PACKAGE_OPENCV4 22 23comment "OpenCV modules" 24 25config BR2_PACKAGE_OPENCV4_LIB_CALIB3D 26 bool "calib3d" 27 select BR2_PACKAGE_OPENCV4_LIB_FEATURES2D 28 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 29 help 30 Include opencv_calib3d (camera calibration and 3d 31 reconstruction) module into the OpenCV build. 32 33config BR2_PACKAGE_OPENCV4_LIB_DNN 34 bool "dnn" 35 # dnn needs fenv.h which is not provided by uclibc 36 depends on !BR2_TOOLCHAIN_USES_UCLIBC 37 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS 38 select BR2_PACKAGE_OPENCV4_WITH_PROTOBUF 39 help 40 Include opencv_dnn (Deep Neural Networks) module into the 41 OpenCV build. 42 43comment "dnn needs a glibc or musl toolchain" 44 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS 45 depends on BR2_TOOLCHAIN_USES_UCLIBC 46 47config BR2_PACKAGE_OPENCV4_LIB_FEATURES2D 48 bool "features2d" 49 select BR2_PACKAGE_OPENCV4_LIB_FLANN 50 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 51 select BR2_PACKAGE_OPENCV4_LIB_ML 52 help 53 Include opencv_features2d (2d features framework) module 54 into the OpenCV build. 55 56config BR2_PACKAGE_OPENCV4_LIB_FLANN 57 bool "flann" 58 # opencv_core dependency is already enabled 59 help 60 Include opencv_flann (clustering and search in 61 multi-dimensional spaces) module into the OpenCV build. 62 63config BR2_PACKAGE_OPENCV4_LIB_HIGHGUI 64 bool "highgui" 65 select BR2_PACKAGE_OPENCV4_LIB_IMGCODECS 66 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 67 select BR2_PACKAGE_OPENCV4_LIB_VIDEOIO 68 help 69 Include opencv_highgui (high-level gui and media i/o) module 70 into the OpenCV build. 71 72if BR2_PACKAGE_OPENCV4_LIB_HIGHGUI 73 74choice 75 prompt "gui toolkit" 76 help 77 GUI toolkit to be used by the opencv_highgui module. 78 79config BR2_PACKAGE_OPENCV4_GUI_NONE 80 bool "none" 81 82config BR2_PACKAGE_OPENCV4_WITH_GTK 83 bool "gtk2" 84 depends on BR2_PACKAGE_LIBGTK2 85 86comment "gtk2 support needs libgtk2" 87 depends on BR2_USE_MMU # libgtk2 -> glib2 88 depends on BR2_TOOLCHAIN_HAS_SYNC_4 89 depends on !BR2_PACKAGE_LIBGTK2 90 91config BR2_PACKAGE_OPENCV4_WITH_GTK3 92 bool "gtk3" 93 depends on BR2_PACKAGE_LIBGTK3 94 95comment "gtk3 support needs libgtk3" 96 depends on BR2_USE_MMU # libgtk3 -> glib2 97 depends on BR2_TOOLCHAIN_HAS_SYNC_4 98 depends on !BR2_PACKAGE_LIBGTK3 99 100config BR2_PACKAGE_OPENCV4_WITH_QT5 101 bool "qt5" 102 depends on BR2_PACKAGE_QT5 103 select BR2_PACKAGE_QT5BASE_CONCURRENT 104 select BR2_PACKAGE_QT5BASE_GUI 105 select BR2_PACKAGE_QT5BASE_WIDGETS 106 help 107 Use Qt5 with base, concurrent, test, gui and widgets 108 components, as GUI toolkit. 109 110comment "qt5 support needs qt5" 111 depends on !BR2_PACKAGE_QT5 112 113endchoice 114 115config BR2_PACKAGE_OPENCV4_WITH_OPENGL 116 bool "opengl support" 117 # OpenGL support done using Qt5OpenGL, so depends on WITH_QT5 118 depends on BR2_PACKAGE_OPENCV4_WITH_QT5 119 # OpenGL support requires Qt5OpenGL with GL support, not GLES 120 depends on BR2_PACKAGE_QT5_GL_AVAILABLE 121 depends on BR2_PACKAGE_HAS_LIBGL 122 select BR2_PACKAGE_QT5BASE_OPENGL 123 help 124 Enable OpenGL for UI. 125 126comment "opengl support needs an OpenGL provider" 127 depends on BR2_PACKAGE_OPENCV4_WITH_QT5 128 depends on !BR2_PACKAGE_QT5_GL_AVAILABLE || \ 129 !BR2_PACKAGE_HAS_LIBGL 130 131endif # BR2_PACKAGE_OPENCV4_LIB_HIGHGUI 132 133config BR2_PACKAGE_OPENCV4_LIB_IMGCODECS 134 bool "imgcodecs" 135 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 136 help 137 Include opencv_imgcodecs (image codecs) module into the 138 OpenCV build. 139 140config BR2_PACKAGE_OPENCV4_LIB_IMGPROC 141 bool "imgproc" 142 # opencv_core dependency is already enabled 143 help 144 Include opencv_imgproc (image processing) module into the 145 OpenCV build. 146 147config BR2_PACKAGE_OPENCV4_LIB_ML 148 bool "ml" 149 # opencv_core dependency is already enabled 150 help 151 Include opencv_ml (machine learning) module into the OpenCV 152 build. 153 154config BR2_PACKAGE_OPENCV4_LIB_OBJDETECT 155 bool "objdetect" 156 depends on !BR2_TOOLCHAIN_USES_UCLIBC # dnn support 157 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # dnn support 158 # opencv_core dependency is already enabled 159 select BR2_PACKAGE_OPENCV4_LIB_CALIB3D 160 select BR2_PACKAGE_OPENCV4_LIB_DNN 161 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 162 select BR2_PACKAGE_OPENCV4_LIB_ML 163 help 164 Include opencv_objdetect (object detection) module into the 165 OpenCV build. 166 167comment "objdetect needs a glibc or musl toolchain" 168 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS 169 depends on BR2_TOOLCHAIN_USES_UCLIBC 170 171config BR2_PACKAGE_OPENCV4_LIB_PHOTO 172 bool "photo" 173 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 174 help 175 Include opencv_photo (computational photography) module into 176 the OpenCV build. 177 178config BR2_PACKAGE_OPENCV4_LIB_PYTHON 179 bool "python" 180 depends on BR2_PACKAGE_PYTHON3 181 depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS 182 depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # python-numpy 183 depends on BR2_TOOLCHAIN_GCC_AT_LEAST_9 # python-numpy 184 select BR2_PACKAGE_PYTHON_NUMPY 185 help 186 Include opencv_python module into the OpenCV build. No 187 python example is installed. 188 189comment "python support needs a glibc or musl toolchain w/ gcc >= 9" 190 depends on BR2_PACKAGE_PYTHON3 191 depends on BR2_PACKAGE_PYTHON_NUMPY_ARCH_SUPPORTS 192 depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_9 ||\ 193 !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL) 194 195config BR2_PACKAGE_OPENCV4_LIB_SHAPE 196 bool "shape" 197 # opencv_core dependency is already enabled 198 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 199 select BR2_PACKAGE_OPENCV4_LIB_VIDEO 200 help 201 Include opencv_shape (shape descriptors and matchers) module 202 into the OpenCV build. 203 204config BR2_PACKAGE_OPENCV4_LIB_STITCHING 205 bool "stitching" 206 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # objdetect 207 depends on !BR2_TOOLCHAIN_USES_UCLIBC # objdetect 208 select BR2_PACKAGE_OPENCV4_LIB_CALIB3D 209 select BR2_PACKAGE_OPENCV4_LIB_FEATURES2D 210 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 211 select BR2_PACKAGE_OPENCV4_LIB_OBJDETECT 212 help 213 Include opencv_stitching (images stitching) module into the 214 OpenCV build. 215 216comment "stitching needs a glibc or musl toolchain" 217 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS 218 depends on BR2_TOOLCHAIN_USES_UCLIBC 219 220config BR2_PACKAGE_OPENCV4_LIB_SUPERRES 221 bool "superres" 222 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 223 select BR2_PACKAGE_OPENCV4_LIB_VIDEO 224 help 225 Include opencv_superres (super resolution) module into the 226 OpenCV build. 227 228config BR2_PACKAGE_OPENCV4_LIB_TS 229 bool "ts" 230 # opencv_core dependency is already enabled 231 select BR2_PACKAGE_OPENCV4_LIB_HIGHGUI 232 select BR2_PACKAGE_OPENCV4_LIB_IMGCODECS 233 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 234 select BR2_PACKAGE_OPENCV4_LIB_VIDEOIO 235 help 236 Include opencv_ts (test) module into the OpenCV build. 237 238config BR2_PACKAGE_OPENCV4_LIB_VIDEOIO 239 bool "videoio" 240 select BR2_PACKAGE_OPENCV4_LIB_IMGCODECS 241 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 242 help 243 Include opencv_videoio (media i/o) module into the OpenCV 244 build. 245 246config BR2_PACKAGE_OPENCV4_LIB_VIDEO 247 bool "video" 248 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 249 help 250 Include opencv_video (video analysis) module into the OpenCV 251 build. 252 253config BR2_PACKAGE_OPENCV4_LIB_VIDEOSTAB 254 bool "videostab" 255 select BR2_PACKAGE_OPENCV4_LIB_CALIB3D 256 select BR2_PACKAGE_OPENCV4_LIB_FEATURES2D 257 select BR2_PACKAGE_OPENCV4_LIB_IMGPROC 258 select BR2_PACKAGE_OPENCV4_LIB_PHOTO 259 select BR2_PACKAGE_OPENCV4_LIB_VIDEO 260 help 261 Include opencv_videostab (video stabilization) module into 262 the OpenCV build. 263 264comment "Test sets" 265config BR2_PACKAGE_OPENCV4_BUILD_TESTS 266 bool "build tests" 267 268config BR2_PACKAGE_OPENCV4_BUILD_PERF_TESTS 269 bool "build performance tests" 270 271comment "3rd party support" 272 273config BR2_PACKAGE_OPENCV4_WITH_FFMPEG 274 bool "ffmpeg support" 275 depends on BR2_PACKAGE_FFMPEG_ARCH_SUPPORTS 276 select BR2_PACKAGE_BZIP2 277 select BR2_PACKAGE_FFMPEG 278 select BR2_PACKAGE_FFMPEG_SWSCALE 279 help 280 Use ffmpeg from the target system. 281 282config BR2_PACKAGE_OPENCV4_WITH_GSTREAMER1 283 bool "gstreamer-1.x" 284 depends on BR2_USE_MMU # gstreamer1 -> libglib2 285 select BR2_PACKAGE_GSTREAMER1 286 select BR2_PACKAGE_GST1_PLUGINS_BASE 287 select BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP 288 help 289 Enable gstreamer support. 290 291choice 292 prompt "jpeg2000 support" 293 help 294 Select the desired jpeg2000 library provider. 295 296config BR2_PACKAGE_OPENCV4_JPEG2000_NONE 297 bool "none" 298 299config BR2_PACKAGE_OPENCV4_JPEG2000_WITH_JASPER 300 bool "jasper" 301 select BR2_PACKAGE_JASPER 302 help 303 Enable jpeg2000 support through jasper. 304 305 Note: this does not use the libjasper bundled with opencv, 306 but uses the libjasper package installed system-wide by 307 Buildroot. 308 309config BR2_PACKAGE_OPENCV4_JPEG2000_WITH_OPENJPEG 310 bool "openjpeg" 311 select BR2_PACKAGE_OPENJPEG 312 help 313 Enable jpeg2000 support through openjpeg. 314 315 Note: this does not use the openjpeg bundled with opencv, 316 but uses the openjpeg package installed system-wide by 317 Buildroot. 318 319endchoice 320 321config BR2_PACKAGE_OPENCV4_WITH_JPEG 322 bool "jpeg support" 323 select BR2_PACKAGE_JPEG 324 help 325 Use shared libjpeg from the target system. 326 327config BR2_PACKAGE_OPENCV4_WITH_PNG 328 bool "png support" 329 select BR2_PACKAGE_LIBPNG 330 help 331 Use shared libpng from the target system. 332 333config BR2_PACKAGE_OPENCV4_WITH_PROTOBUF 334 bool "protobuf support" 335 depends on BR2_PACKAGE_PROTOBUF_ARCH_SUPPORTS # protobuf 336 select BR2_PACKAGE_PROTOBUF 337 help 338 Use shared protobuf from the target system. 339 340config BR2_PACKAGE_OPENCV4_WITH_TBB 341 bool "tbb support" 342 depends on !BR2_TOOLCHAIN_USES_UCLIBC # tbb 343 depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735 # tbb 344 select BR2_PACKAGE_TBB 345 help 346 Use shared tbb from the target system. 347 348comment "tbb needs a glibc or musl toolchain" 349 depends on BR2_TOOLCHAIN_USES_UCLIBC 350 351comment "tbb needs exception_ptr" 352 depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735 353 354config BR2_PACKAGE_OPENCV4_WITH_TIFF 355 bool "tiff support" 356 select BR2_PACKAGE_TIFF 357 help 358 Use shared libtiff from the target system. 359 360config BR2_PACKAGE_OPENCV4_WITH_V4L 361 bool "v4l support" 362 help 363 Enable Video 4 Linux support. 364 365 If the package libv4l is enabled, its support is 366 automatically enabled. 367 368config BR2_PACKAGE_OPENCV4_WITH_WEBP 369 bool "webp support" 370 select BR2_PACKAGE_WEBP 371 help 372 Enable WebP support. 373 374 Use shared libwebp from the target system. 375 376comment "Install options" 377 378config BR2_PACKAGE_OPENCV4_INSTALL_DATA 379 bool "install extra data" 380 help 381 Install various data that is used by cv libraries and/or 382 demo applications, specifically for haarcascades and 383 lbpcascades features. 384 385 For further information: see OpenCV documentation. 386 387endif # BR2_PACKAGE_OPENCV4 388 389comment "opencv4 needs a toolchain w/ C++, NPTL, wchar, dynamic library, gcc >= 4.8" 390 depends on BR2_TOOLCHAIN_HAS_ATOMIC 391 depends on !BR2_INSTALL_LIBSTDCPP || \ 392 !BR2_USE_WCHAR || \ 393 !BR2_TOOLCHAIN_HAS_THREADS_NPTL || \ 394 BR2_STATIC_LIBS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_8 395