Updated dnn build tutorial

pull/265/head
Vitaliy Lyudvichenko 10 years ago
parent 3154fc0dba
commit 467cd96135
  1. BIN
      modules/dnn/tutorials/images/build_1.png
  2. BIN
      modules/dnn/tutorials/images/build_2.png
  3. BIN
      modules/dnn/tutorials/images/build_3.png
  4. BIN
      modules/dnn/tutorials/images/build_4.png
  5. BIN
      modules/dnn/tutorials/images/build_5.png
  6. 31
      modules/dnn/tutorials/tutorial_dnn_build.markdown
  7. 2
      modules/dnn/tutorials/tutorial_dnn_googlenet.markdown

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

@ -1,9 +1,9 @@
Build dnn module {#tutorial_dnn_build} Build opencv_contrib with dnn module {#tutorial_dnn_build}
================ ====================================
Introduction Introduction
------------ ------------
opencv_dnn module is placed in the secondary [opencv_contrib](https://github.com/Itseez/opencv_contrib) repositroy, opencv_dnn module is placed in the secondary [opencv_contrib](https://github.com/Itseez/opencv_contrib) repository,
which isn't distributed in binary form, therefore you need to build it manually. which isn't distributed in binary form, therefore you need to build it manually.
To do this you need to have installed: [CMake](http://www.cmake.org/download), git, and build system (*gcc* with *make* for Linux or *MS Visual Studio* for Windows) To do this you need to have installed: [CMake](http://www.cmake.org/download), git, and build system (*gcc* with *make* for Linux or *MS Visual Studio* for Windows)
@ -20,20 +20,26 @@ git clone https://github.com/Itseez/opencv
git clone https://github.com/Itseez/opencv_contrib git clone https://github.com/Itseez/opencv_contrib
@endcode @endcode
-# Run [CMake-gui](https://www.johnlamp.net/cmake-tutorial-3-gui-tool.html) and set source and build directories: -# Run [CMake-gui] and set source and build directories:
- Set source code directory to **opencv_root**/opencv; - Set source code directory to **opencv_root**/opencv;
- Set binaries directory, for exmaple, to **opencv_root**/build_opencv. - Set binaries directory, for example, to **opencv_root**/build_opencv.
This directory will contain built libraries. This directory will contain built libraries.
![](images/build_1.png)
-# Configure opencv: -# Configure opencv:
- press *Configure*; - press *Configure*;
- choose the preffered project generator (Makefiles for Linux, MS Visual Studio for Windows); - choose the preferred project generator (Makefiles for Linux, MS Visual Studio for Windows);
- also you can set many opencv build options, for more details see @ref tutorial_linux_install. - also you can set many opencv build options, for more details see @ref tutorial_linux_install.
![](images/build_2.png)
-# In the appeared list of build parameters find parameter `OPENCV_EXTRA_MODULES_PATH` and set it to the **opencv_root**/opencv_contrib. -# In the appeared list of build parameters find parameter `OPENCV_EXTRA_MODULES_PATH` and set it to the **opencv_root**/opencv_contrib.
![](images/build_3.png)
-# *Configure* the project again, and set build options of dnn module: -# *Configure* the project again, and set build options of dnn module:
- `BUILD_opencv_dnn` parameter must exist and be checked. - `BUILD_opencv_dnn` parameter must exist and be checked.
@ -43,16 +49,23 @@ git clone https://github.com/Itseez/opencv_contrib
You you can uncheck `BUILD_LIBPROTOBUF_FROM_SOURCES` flag to try use protobuf installed in your system. You you can uncheck `BUILD_LIBPROTOBUF_FROM_SOURCES` flag to try use protobuf installed in your system.
Elsewise libpotobuf will be built from opencv sources. Elsewise libpotobuf will be built from opencv sources.
- You can additionaly check `opencv_dnn_BUILD_TORCH_IMPORTER` parameter to build [Torch7](http://torch.ch) importer. - You can additionally check `opencv_dnn_BUILD_TORCH_IMPORTER` parameter to build [Torch7](http://torch.ch) importer.
It allows you to use networks, generated by Torch7 [nn](https://github.com/torch/nn/blob/master/README.md) module. It allows you to use networks, generated by Torch7 [nn](https://github.com/torch/nn/blob/master/README.md) module.
-# *Generate* the project and build it: ![](images/build_4.png)
-# Press *Configure* and *Generate*.
![](images/build_5.png)
-# Build the generated project:
- If Makefiles generator on Unix was used, run the following in terminal: - If Makefiles generator on Unix was used, run the following in terminal:
@code @code
cd opencv_root/build_opencv cd opencv_root/build_opencv
make all make all
@endcode @endcode
- If MS Visual Studio generator was used, then open OpenCV.sln from **opencv_root**/build_opencv folder in the Visual Studio, and build it by using F7 shortcut - If MS Visual Studio generator was used, then open OpenCV.sln from **opencv_root**/build_opencv folder in the Visual Studio,
and build it by choosing **Build** -> **Build Solution** menu or using **F7** short-cut.
-# Now you can build own program by using libraries were built into **opencv_root**/build_opencv/lib. -# Now you can build own program by using libraries were built into **opencv_root**/build_opencv/lib.
See the following tutorials to learn how to create a program using OpenCV: See the following tutorials to learn how to create a program using OpenCV:

@ -7,7 +7,7 @@ Introduction
In this tutorial you will learn how to use opencv_dnn module for image classification by using In this tutorial you will learn how to use opencv_dnn module for image classification by using
GoogLeNet trained network from [Caffe model zoo](http://caffe.berkeleyvision.org/model_zoo.html). GoogLeNet trained network from [Caffe model zoo](http://caffe.berkeleyvision.org/model_zoo.html).
We will demostrate results of this example on the following picture. We will demonstrate results of this example on the following picture.
![Buran space shuttle](images/space_shuttle.jpg) ![Buran space shuttle](images/space_shuttle.jpg)
Source Code Source Code

Loading…
Cancel
Save