Merge branch 4.x
@@ -28,7 +28,7 @@ If you need help with anything of the above, you may refer to our @ref tutorial_
|
||||
|
||||
If you encounter any error after thoroughly following these steps, feel free to contact us via
|
||||
[OpenCV4Android](https://groups.google.com/group/android-opencv/) discussion group or OpenCV [Q&A
|
||||
forum](http://answers.opencv.org). We'll do our best to help you out.
|
||||
forum](https://forum.opencv.org). We'll do our best to help you out.
|
||||
|
||||
General info
|
||||
------------
|
||||
|
||||
@@ -19,7 +19,7 @@ working environment quickly. It was written with Windows 7 in mind, though it wo
|
||||
|
||||
If you encounter any error after thoroughly following these steps, feel free to contact us via
|
||||
[OpenCV4Android](https://groups.google.com/group/android-opencv/) discussion group or OpenCV [Q&A
|
||||
forum](http://answers.opencv.org). We'll do our best to help you out.
|
||||
forum](https://forum.opencv.org). We'll do our best to help you out.
|
||||
|
||||
Preface
|
||||
-------
|
||||
|
||||
@@ -32,7 +32,7 @@ may consult our @ref tutorial_O4A_SDK tutorial.
|
||||
|
||||
If you encounter any error after thoroughly following these steps, feel free to contact us via
|
||||
[OpenCV4Android](https://groups.google.com/group/android-opencv/) discussion group or OpenCV [Q&A
|
||||
forum](http://answers.opencv.org) . We'll do our best to help you out.
|
||||
forum](https://forum.opencv.org) . We'll do our best to help you out.
|
||||
|
||||
Using OpenCV Library Within Your Android Project
|
||||
------------------------------------------------
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
OpenCV configuration options reference {#tutorial_config_reference}
|
||||
======================================
|
||||
|
||||
@prev_tutorial{tutorial_general_install}
|
||||
@next_tutorial{tutorial_linux_install}
|
||||
|
||||
@tableofcontents
|
||||
|
||||
# Introduction {#tutorial_config_reference_intro}
|
||||
@@ -411,9 +414,9 @@ Some of OpenCV algorithms can use multithreading to accelerate processing. OpenC
|
||||
| pthreads | `WITH_PTHREADS_PF` | _ON_ | Unix-like | Default backend based on [pthreads](https://en.wikipedia.org/wiki/POSIX_Threads) library is available on Linux, Android and other Unix-like platforms. Thread pool is implemented in OpenCV and can be controlled with environment variables `OPENCV_THREAD_POOL_*`. Please check sources in _modules/core/src/parallel_impl.cpp_ file for details. |
|
||||
| Concurrency | N/A | _ON_ | Windows | [Concurrency runtime](https://docs.microsoft.com/en-us/cpp/parallel/concrt/concurrency-runtime) is available on Windows and will be turned _ON_ on supported platforms unless other backend is enabled. |
|
||||
| GCD | N/A | _ON_ | Apple | [Grand Central Dispatch](https://en.wikipedia.org/wiki/Grand_Central_Dispatch) is available on Apple platforms and will be turned _ON_ automatically unless other backend is enabled. Uses global system thread pool. |
|
||||
| TBB | `WITH_TBB` | Multiple | _OFF_ | [Threading Building Blocks](https://en.wikipedia.org/wiki/Threading_Building_Blocks) is a cross-platform library for parallel programming. |
|
||||
| OpenMP | `WITH_OPENMP` | Multiple | _OFF_ | [OpenMP](https://en.wikipedia.org/wiki/OpenMP) API relies on compiler support. |
|
||||
| HPX | `WITH_HPX` | Multiple | _OFF_ | [High Performance ParallelX](https://en.wikipedia.org/wiki/HPX) is an experimental backend which is more suitable for multiprocessor environments. |
|
||||
| TBB | `WITH_TBB` | _OFF_ | Multiple | [Threading Building Blocks](https://en.wikipedia.org/wiki/Threading_Building_Blocks) is a cross-platform library for parallel programming. |
|
||||
| OpenMP | `WITH_OPENMP` | _OFF_ | Multiple | [OpenMP](https://en.wikipedia.org/wiki/OpenMP) API relies on compiler support. |
|
||||
| HPX | `WITH_HPX` | _OFF_ | Multiple | [High Performance ParallelX](https://en.wikipedia.org/wiki/HPX) is an experimental backend which is more suitable for multiprocessor environments. |
|
||||
|
||||
@note OpenCV can download and build TBB library from GitHub, this functionality can be enabled with the `BUILD_TBB` option.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Cross compilation for ARM based Linux systems {#tutorial_arm_crosscompile_with_cmake}
|
||||
=============================================
|
||||
|
||||
@prev_tutorial{tutorial_ios_install}
|
||||
@prev_tutorial{tutorial_macos_install}
|
||||
@next_tutorial{tutorial_building_tegra_cuda}
|
||||
|
||||
| | |
|
||||
|
||||
@@ -667,20 +667,9 @@ Write the tutorial {#tutorial_documentation_steps_tutorial}
|
||||
6. Add newly created tutorial to the corresponding table of contents. Just find
|
||||
<em>"table_of_content_*.markdown"</em> file with the needed table and place new record in it
|
||||
similar to existing ones.
|
||||
@verbatim
|
||||
- @subpage tutorial_windows_visual_studio_image_watch
|
||||
|
||||
_Languages:_ C++, Java, Python
|
||||
|
||||
_Compatibility:_ \>= OpenCV 2.4
|
||||
|
||||
_Author:_ Wolf Kienzle
|
||||
|
||||
You will learn how to visualize OpenCV matrices and images within Visual Studio 2012.
|
||||
@endverbatim
|
||||
As you can see it is just a list item with special _subpage_ command which marks your page as a
|
||||
child and places it into the existing pages hierarchy. Add compatibility information,
|
||||
authors list and short description. Also note the list item indent, empty lines between
|
||||
It is simply a list item with special _subpage_ command which marks your page as a
|
||||
child and places it into the existing pages hierarchy. Also note the list item indent, empty lines between
|
||||
paragraphs and special _italic_ markers.
|
||||
|
||||
7. Generate doxygen documentation and verify results.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
OpenCV installation overview {#tutorial_general_install}
|
||||
============================
|
||||
|
||||
@next_tutorial{tutorial_config_reference}
|
||||
|
||||
@tableofcontents
|
||||
|
||||
There are two ways of installing OpenCV on your machine: download prebuilt version for your platform or compile from sources.
|
||||
|
||||
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 41 KiB |
|
Before Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 6.6 KiB |
|
Before Width: | Height: | Size: 606 KiB |
|
Before Width: | Height: | Size: 8.1 KiB |
|
Before Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 4.5 KiB |
|
Before Width: | Height: | Size: 18 KiB |
|
Before Width: | Height: | Size: 3.2 KiB |
@@ -1,78 +0,0 @@
|
||||
Installation in iOS {#tutorial_ios_install}
|
||||
===================
|
||||
|
||||
@prev_tutorial{tutorial_macos_install}
|
||||
@next_tutorial{tutorial_arm_crosscompile_with_cmake}
|
||||
|
||||
| | |
|
||||
| -: | :- |
|
||||
| Original author | Artem Myagkov, Eduard Feicho, Steve Nicholson |
|
||||
| Compatibility | OpenCV >= 3.0 |
|
||||
|
||||
@warning
|
||||
This tutorial can contain obsolete information.
|
||||
|
||||
Required Packages
|
||||
-----------------
|
||||
|
||||
- CMake 2.8.8 or higher
|
||||
- Xcode 4.2 or higher
|
||||
|
||||
### Getting the Cutting-edge OpenCV from Git Repository
|
||||
|
||||
Launch Git client and clone OpenCV repository from [GitHub](http://github.com/opencv/opencv).
|
||||
|
||||
In MacOS it can be done using the following command in Terminal:
|
||||
|
||||
@code{.bash}
|
||||
cd ~/<my_working _directory>
|
||||
git clone https://github.com/opencv/opencv.git
|
||||
@endcode
|
||||
|
||||
If you want to install OpenCV’s extra modules, clone the opencv_contrib repository as well:
|
||||
|
||||
@code{.bash}
|
||||
cd ~/<my_working _directory>
|
||||
git clone https://github.com/opencv/opencv_contrib.git
|
||||
@endcode
|
||||
|
||||
|
||||
Building OpenCV from Source, using CMake and Command Line
|
||||
---------------------------------------------------------
|
||||
|
||||
1. Make sure the xcode command line tools are installed:
|
||||
@code{.bash}
|
||||
xcode-select --install
|
||||
@endcode
|
||||
|
||||
2. Build OpenCV framework:
|
||||
@code{.bash}
|
||||
cd ~/<my_working_directory>
|
||||
python opencv/platforms/ios/build_framework.py ios
|
||||
@endcode
|
||||
|
||||
3. To install OpenCV’s extra modules, append `--contrib opencv_contrib` to the python command above. **Note:** the extra modules are not included in the iOS Pack download at [OpenCV Releases](https://opencv.org/releases/). If you want to use the extra modules (e.g. aruco), you must build OpenCV yourself and include this option:
|
||||
@code{.bash}
|
||||
cd ~/<my_working_directory>
|
||||
python opencv/platforms/ios/build_framework.py ios --contrib opencv_contrib
|
||||
@endcode
|
||||
|
||||
4. To exclude a specific module, append `--without <module_name>`. For example, to exclude the "optflow" module from opencv_contrib:
|
||||
@code{.bash}
|
||||
cd ~/<my_working_directory>
|
||||
python opencv/platforms/ios/build_framework.py ios --contrib opencv_contrib --without optflow
|
||||
@endcode
|
||||
|
||||
5. The build process can take a significant amount of time. Currently (OpenCV 3.4 and 4.1), five separate architectures are built: armv7, armv7s, and arm64 for iOS plus i386 and x86_64 for the iPhone simulator. If you want to specify the architectures to include in the framework, use the `--iphoneos_archs` and/or `--iphonesimulator_archs` options. For example, to only build arm64 for iOS and x86_64 for the simulator:
|
||||
@code{.bash}
|
||||
cd ~/<my_working_directory>
|
||||
python opencv/platforms/ios/build_framework.py ios --contrib opencv_contrib --iphoneos_archs arm64 --iphonesimulator_archs x86_64
|
||||
@endcode
|
||||
|
||||
If everything’s fine, the build process will create
|
||||
`~/<my_working_directory>/ios/opencv2.framework`. You can add this framework to your Xcode projects.
|
||||
|
||||
Further Reading
|
||||
---------------
|
||||
|
||||
You can find several OpenCV+iOS tutorials here @ref tutorial_table_of_content_ios.
|
||||
@@ -2,7 +2,7 @@ Installation in MacOS {#tutorial_macos_install}
|
||||
=====================
|
||||
|
||||
@prev_tutorial{tutorial_android_ocl_intro}
|
||||
@next_tutorial{tutorial_ios_install}
|
||||
@next_tutorial{tutorial_arm_crosscompile_with_cmake}
|
||||
|
||||
| | |
|
||||
| -: | :- |
|
||||
|
||||
@@ -25,9 +25,9 @@ Introduction to OpenCV {#tutorial_table_of_content_introduction}
|
||||
|
||||
##### Other platforms
|
||||
- @subpage tutorial_macos_install
|
||||
- @subpage tutorial_ios_install
|
||||
- @subpage tutorial_arm_crosscompile_with_cmake
|
||||
- @subpage tutorial_building_tegra_cuda
|
||||
- @ref tutorial_ios_install
|
||||
|
||||
##### Usage basics
|
||||
- @subpage tutorial_display_image - We will learn how to load an image from file and display it using OpenCV
|
||||
|
||||
@@ -14,7 +14,7 @@ This tutorial can contain obsolete information.
|
||||
|
||||
The description here was tested on Windows 7 SP1. Nevertheless, it should also work on any other
|
||||
relatively modern version of Windows OS. If you encounter errors after following the steps described
|
||||
below, feel free to contact us via our [OpenCV Q&A forum](http://answers.opencv.org). We'll do our
|
||||
below, feel free to contact us via our [OpenCV Q&A forum](https://forum.opencv.org). We'll do our
|
||||
best to help you out.
|
||||
|
||||
@note To use the OpenCV library you have two options: @ref tutorial_windows_install_prebuilt or
|
||||
@@ -55,12 +55,12 @@ cd /c/lib
|
||||
@code{.bash}
|
||||
#!/bin/bash -e
|
||||
myRepo=$(pwd)
|
||||
CMAKE_CONFIG_GENERATOR="Visual Studio 14 2015 Win64"
|
||||
CMAKE_GENERATOR_OPTIONS=-G"Visual Studio 16 2019"
|
||||
#CMAKE_GENERATOR_OPTIONS=-G"Visual Studio 15 2017 Win64"
|
||||
#CMAKE_GENERATOR_OPTIONS=(-G"Visual Studio 16 2019" -A x64) # CMake 3.14+ is required
|
||||
if [ ! -d "$myRepo/opencv" ]; then
|
||||
echo "cloning opencv"
|
||||
git clone https://github.com/opencv/opencv.git
|
||||
mkdir -p Build/opencv
|
||||
mkdir -p Install/opencv
|
||||
else
|
||||
cd opencv
|
||||
git pull --rebase
|
||||
@@ -69,16 +69,17 @@ fi
|
||||
if [ ! -d "$myRepo/opencv_contrib" ]; then
|
||||
echo "cloning opencv_contrib"
|
||||
git clone https://github.com/opencv/opencv_contrib.git
|
||||
mkdir -p Build/opencv_contrib
|
||||
else
|
||||
cd opencv_contrib
|
||||
git pull --rebase
|
||||
cd ..
|
||||
fi
|
||||
RepoSource=opencv
|
||||
pushd Build/$RepoSource
|
||||
CMAKE_OPTIONS='-DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DWITH_CUDA:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DINSTALL_CREATE_DISTRIB=ON'
|
||||
cmake -G"$CMAKE_CONFIG_GENERATOR" $CMAKE_OPTIONS -DOPENCV_EXTRA_MODULES_PATH="$myRepo"/opencv_contrib/modules -DCMAKE_INSTALL_PREFIX="$myRepo"/install/"$RepoSource" "$myRepo/$RepoSource"
|
||||
mkdir -p build_opencv
|
||||
pushd build_opencv
|
||||
CMAKE_OPTIONS=(-DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DWITH_CUDA:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF -DINSTALL_CREATE_DISTRIB=ON)
|
||||
set -x
|
||||
cmake "${CMAKE_GENERATOR_OPTIONS[@]}" "${CMAKE_OPTIONS[@]}" -DOPENCV_EXTRA_MODULES_PATH="$myRepo"/opencv_contrib/modules -DCMAKE_INSTALL_PREFIX="$myRepo/install/$RepoSource" "$myRepo/$RepoSource"
|
||||
echo "************************* $Source_DIR -->debug"
|
||||
cmake --build . --config debug
|
||||
echo "************************* $Source_DIR -->release"
|
||||
@@ -89,15 +90,15 @@ popd
|
||||
@endcode
|
||||
In this script I suppose you use VS 2015 in 64 bits
|
||||
@code{.bash}
|
||||
CMAKE_CONFIG_GENERATOR="Visual Studio 14 2015 Win64"
|
||||
CMAKE_GENERATOR_OPTIONS=-G"Visual Studio 14 2015 Win64"
|
||||
@endcode
|
||||
and opencv will be installed in c:/lib/install
|
||||
and opencv will be installed in c:/lib/install/opencv
|
||||
@code{.bash}
|
||||
-DCMAKE_INSTALL_PREFIX="$myRepo"/install/"$RepoSource" "$myRepo/$RepoSource"
|
||||
-DCMAKE_INSTALL_PREFIX="$myRepo/install/$RepoSource"
|
||||
@endcode
|
||||
with no Perf tests, no tests, no doc, no CUDA and no example
|
||||
@code{.bash}
|
||||
CMAKE_OPTIONS='-DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF'
|
||||
CMAKE_OPTIONS=(-DBUILD_PERF_TESTS:BOOL=OFF -DBUILD_TESTS:BOOL=OFF -DBUILD_DOCS:BOOL=OFF -DBUILD_EXAMPLES:BOOL=OFF)
|
||||
@endcode
|
||||
-# In git command line enter following command :
|
||||
@code{.bash}
|
||||
@@ -351,7 +352,7 @@ libraries). If you do not need the support for some of these, you can just freel
|
||||
|
||||
To test your build just go into the `Build/bin/Debug` or `Build/bin/Release` directory and start
|
||||
a couple of applications like the *contours.exe*. If they run, you are done. Otherwise,
|
||||
something definitely went awfully wrong. In this case you should contact us at our [Q&A forum](http://answers.opencv.org/).
|
||||
something definitely went awfully wrong. In this case you should contact us at our [Q&A forum](https://forum.opencv.org/).
|
||||
If everything is okay, the *contours.exe* output should resemble the following image (if
|
||||
built with Qt support):
|
||||
|
||||
|
||||