|
1 |
| -opencv_contrib |
2 |
| -============== |
| 1 | +## Repository for OpenCV's extra modules |
3 | 2 |
|
4 |
| -Repository for OpenCV's extra modules |
| 3 | +This repository is intended for development of so-called "extra" modules, |
| 4 | +contributed functionality. New modules quite often do not have stable API, |
| 5 | +and they are not well-tested. Thus, they shouldn't be released as a part of |
| 6 | +official OpenCV distribution, since the library maintains binary compatibility, |
| 7 | +and tries to provide decent performance and stability. |
| 8 | + |
| 9 | +So, all the new modules should be developed separately, and published in the |
| 10 | +`opencv_contrib` repository at first. Later, when the module matures and gains |
| 11 | +popularity, it is moved to the central OpenCV repository, and the development team |
| 12 | +provides production quality support for this module. |
| 13 | + |
| 14 | +### How to build OpenCV with extra modules |
| 15 | + |
| 16 | +You can build OpenCV, so it will include the modules from this repository. |
| 17 | +Here is the CMake command for you: |
| 18 | + |
| 19 | +``` |
| 20 | +$ cd <opencv_build_directory> |
| 21 | +$ cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib> <opencv_source_directory> |
| 22 | +$ make -j5 |
| 23 | +``` |
| 24 | + |
| 25 | +As the result, OpenCV will be built in the `<opencv_build_directory>` with all |
| 26 | +modules from `opencv_contrib` repository. If you don't want all of the modules, |
| 27 | +use CMake's `BUILD_opencv_*` options. Like in this example: |
| 28 | + |
| 29 | +``` |
| 30 | +$ cmake -DOPENCV_EXTRA_MODULES_PATH=<opencv_contrib> -DBUILD_opencv_legacy=OFF <opencv_source_directory> |
| 31 | +``` |
0 commit comments