return()
endmacro()
-if(NOT HAVE_CXX11)
- message(WARNING "DL Inference engine requires C++11. You can turn it on via ENABLE_CXX11=ON CMake flag.")
- ie_fail()
-endif()
+ find_package(InferenceEngine QUIET)
+ if(InferenceEngine_FOUND)
+ set(INF_ENGINE_LIBRARIES "${InferenceEngine_LIBRARIES}")
+ set(INF_ENGINE_INCLUDE_DIRS "${InferenceEngine_INCLUDE_DIRS}")
+ set(INF_ENGINE_VERSION "${InferenceEngine_VERSION}")
+ set(HAVE_INF_ENGINE TRUE)
+ return()
+ endif()
+
+ ocv_check_environment_variables(INTEL_CVSDK_DIR INF_ENGINE_ROOT_DIR IE_PLUGINS_PATH)
+
if(NOT INF_ENGINE_ROOT_DIR OR NOT EXISTS "${INF_ENGINE_ROOT_DIR}/include/inference_engine.hpp")
set(ie_root_paths "${INF_ENGINE_ROOT_DIR}")
- if(DEFINED ENV{INTEL_CVSDK_DIR})
- list(APPEND ie_root_paths "$ENV{INTEL_CVSDK_DIR}")
- list(APPEND ie_root_paths "$ENV{INTEL_CVSDK_DIR}/inference_engine")
- endif()
if(DEFINED INTEL_CVSDK_DIR)
- list(APPEND ie_root_paths "${INTEL_CVSDK_DIR}")
- list(APPEND ie_root_paths "${INTEL_CVSDK_DIR}/inference_engine")
+ list(APPEND ie_root_paths "${INTEL_CVSDK_DIR}/")
+ list(APPEND ie_root_paths "${INTEL_CVSDK_DIR}/deployment_tools/inference_engine")
endif()
if(NOT ie_root_paths)
Code
----
- [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp)
+ @add_toggle_cpp
+ - **Downloadable code**: Click
++ [here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp)
+
- The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
- @include BasicLinearTransforms.cpp
+ @include samples/cpp/tutorial_code/ImgProc/BasicLinearTransforms.cpp
+ @end_toggle
+
+ @add_toggle_java
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/BasicLinearTransformsDemo.java)
++ [here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/BasicLinearTransformsDemo.java)
+
+ - The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
+ @include samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/BasicLinearTransformsDemo.java
+ @end_toggle
+
+ @add_toggle_python
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/BasicLinearTransforms.py)
++ [here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/BasicLinearTransforms.py)
+
+ - The following code performs the operation \f$g(i,j) = \alpha \cdot f(i,j) + \beta\f$ :
+ @include samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/BasicLinearTransforms.py
+ @end_toggle
Explanation
-----------
### Code
-Code for the tutorial is [here](https://github.com/opencv/opencv/blob/3.4/samples/cpp/tutorial_code/ImgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.cpp).
+ @add_toggle_cpp
-Code for the tutorial is [here](https://github.com/opencv/opencv/blob/3.4/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/ChangingContrastBrightnessImageDemo.java).
+Code for the tutorial is [here](https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/ImgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.cpp).
+ @end_toggle
+
+ @add_toggle_java
-Code for the tutorial is [here](https://github.com/opencv/opencv/blob/3.4/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.py).
++Code for the tutorial is [here](https://github.com/opencv/opencv/blob/master/samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/ChangingContrastBrightnessImageDemo.java).
+ @end_toggle
+
+ @add_toggle_python
++Code for the tutorial is [here](https://github.com/opencv/opencv/blob/master/samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.py).
+ @end_toggle
+
Code for the gamma correction:
- @snippet changing_contrast_brightness_image.cpp changing-contrast-brightness-gamma-correction
+ @add_toggle_cpp
+ @snippet samples/cpp/tutorial_code/ImgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.cpp changing-contrast-brightness-gamma-correction
+ @end_toggle
+
+ @add_toggle_java
+ @snippet samples/java/tutorial_code/ImgProc/changing_contrast_brightness_image/ChangingContrastBrightnessImageDemo.java changing-contrast-brightness-gamma-correction
+ @end_toggle
+
+ @add_toggle_python
+ @snippet samples/python/tutorial_code/imgProc/changing_contrast_brightness_image/changing_contrast_brightness_image.py changing-contrast-brightness-gamma-correction
+ @end_toggle
A look-up table is used to improve the performance of the computation as only 256 values needs to be calculated once.
Source Code
-----------
- This tutorial code's is shown lines below. You can also download it from
- [here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp).
- @include cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp
+ @add_toggle_cpp
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp)
++ [here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp)
+
+ - **Code at glance:**
+ @include samples/cpp/tutorial_code/ml/introduction_to_pca/introduction_to_pca.cpp
+ @end_toggle
+
+ @add_toggle_java
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ml/introduction_to_pca/IntroductionToPCADemo.java)
++ [here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ml/introduction_to_pca/IntroductionToPCADemo.java)
+
+ - **Code at glance:**
+ @include samples/java/tutorial_code/ml/introduction_to_pca/IntroductionToPCADemo.java
+ @end_toggle
+
+ @add_toggle_python
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ml/introduction_to_pca/introduction_to_pca.py)
++ [here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ml/introduction_to_pca/introduction_to_pca.py)
+
+ - **Code at glance:**
+ @include samples/python/tutorial_code/ml/introduction_to_pca/introduction_to_pca.py
+ @end_toggle
-@note Another example using PCA for dimensionality reduction while maintaining an amount of variance can be found at [opencv_source_code/samples/cpp/pca.cpp](https://github.com/opencv/opencv/tree/3.4/samples/cpp/pca.cpp)
+@note Another example using PCA for dimensionality reduction while maintaining an amount of variance can be found at [opencv_source_code/samples/cpp/pca.cpp](https://github.com/opencv/opencv/tree/master/samples/cpp/pca.cpp)
Explanation
-----------
@note The following code has been implemented with OpenCV 3.0 classes and functions. An equivalent version of the code using OpenCV 2.4 can be found in [this page.](http://docs.opencv.org/2.4/doc/tutorials/ml/introduction_to_svm/introduction_to_svm.html#introductiontosvms)
- @include cpp/tutorial_code/ml/introduction_to_svm/introduction_to_svm.cpp
+ @add_toggle_cpp
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ml/introduction_to_svm/introduction_to_svm.cpp)
++ [here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ml/introduction_to_svm/introduction_to_svm.cpp)
+
+ - **Code at glance:**
+ @include samples/cpp/tutorial_code/ml/introduction_to_svm/introduction_to_svm.cpp
+ @end_toggle
+
+ @add_toggle_java
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ml/introduction_to_svm/IntroductionToSVMDemo.java)
++ [here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ml/introduction_to_svm/IntroductionToSVMDemo.java)
+
+ - **Code at glance:**
+ @include samples/java/tutorial_code/ml/introduction_to_svm/IntroductionToSVMDemo.java
+ @end_toggle
+
+ @add_toggle_python
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ml/introduction_to_svm/introduction_to_svm.py)
++ [here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ml/introduction_to_svm/introduction_to_svm.py)
+
+ - **Code at glance:**
+ @include samples/python/tutorial_code/ml/introduction_to_svm/introduction_to_svm.py
+ @end_toggle
Explanation
-----------
@note The following code has been implemented with OpenCV 3.0 classes and functions. An equivalent version of the code
using OpenCV 2.4 can be found in [this page.](http://docs.opencv.org/2.4/doc/tutorials/ml/non_linear_svms/non_linear_svms.html#nonlinearsvms)
- @include cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp
+ @add_toggle_cpp
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp)
++ [here](https://github.com/opencv/opencv/tree/master/samples/cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp)
+
+ - **Code at glance:**
+ @include samples/cpp/tutorial_code/ml/non_linear_svms/non_linear_svms.cpp
+ @end_toggle
+
+ @add_toggle_java
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/java/tutorial_code/ml/non_linear_svms/NonLinearSVMsDemo.java)
++ [here](https://github.com/opencv/opencv/tree/master/samples/java/tutorial_code/ml/non_linear_svms/NonLinearSVMsDemo.java)
+
+ - **Code at glance:**
+ @include samples/java/tutorial_code/ml/non_linear_svms/NonLinearSVMsDemo.java
+ @end_toggle
+
+ @add_toggle_python
+ - **Downloadable code**: Click
- [here](https://github.com/opencv/opencv/tree/3.4/samples/python/tutorial_code/ml/non_linear_svms/non_linear_svms.py)
++ [here](https://github.com/opencv/opencv/tree/master/samples/python/tutorial_code/ml/non_linear_svms/non_linear_svms.py)
+
+ - **Code at glance:**
+ @include samples/python/tutorial_code/ml/non_linear_svms/non_linear_svms.py
+ @end_toggle
Explanation
-----------