1
How to build these examples
2
===========================
6
mkdir -p samples_build && pushd samples_build
7
cmake <OpenVINO_ROOT>/opencv/share/OpenCV/samples
16
cmake -G"Visual Studio 14 2015 Win64" <OpenVINO_ROOT>\opencv\samples
17
cmake --build . --config Release
21
How to use these examples
22
=========================
24
Although some of examples display their results in windows it can be more convenient to run them from the console. So you will be able to pass command line arguments and observe error messages printed to standard output.
26
Details on each application are in following sections.
28
openvino_sample_bgfg_segm.exe
29
--------------------------
31
This sample demonstrates background segmentation.
32
Usage: openvino_sample_bgfg_segm.exe [params]
34
-c, --camera (value:0)
35
use video stream from camera (device index starting from 0)
37
use video file as input
40
-m, --method (value:mog2)
41
method: background subtraction algorithm ('knn', 'mog2')
45
- Run MOG2 background subtraction algorithm on video stream from default camera:
49
- Run KNN background subtraction on video stream from file:
51
`<app> --file_name=<path-to-file> --method=knn`
54
openvino_sample_colorization.exe
55
-----------------------------
57
This sample demonstrates recoloring grayscale images with dnn.
58
This program is based on:
59
http://richzhang.github.io/colorization
60
https://github.com/richzhang/colorization
61
Download caffemodel and prototxt files:
62
http://eecs.berkeley.edu/~rich.zhang/projects/2016_colorization/files/demo_v2/colorization_release_v2.caffemodel
63
https://raw.githubusercontent.com/richzhang/colorization/master/colorization/models/colorization_deploy_v2.prototxt
65
Usage: openvino_sample_colorization.exe [params]
68
print this help message
69
--image (value:space_shuttle.jpg)
71
--model (value:colorization_release_v2.caffemodel)
75
--proto (value:colorization_deploy_v2.prototxt)
80
- Colorize the image using downloaded network:
82
`<app> --model=<path-to-caffemodel> --proto=<path-to-prototxt> --image=<path-to-image>`
84
**Note:** users have to download DNN model files (layout in .prototxt and weights in .caffemodel) from the Internet manually
86
openvino_sample_dense_optical_flow.exe
87
-----------------------------------
89
This sample demonstrates using of dense optical flow algorithms.
90
Usage: openvino_sample_dense_optical_flow.exe [params]
92
-a, --algorithm (value:fb)
93
algorithm (supported: 'fb', 'tvl')
94
-c, --camera (value:0)
95
capture video from camera (device index starting from 0)
101
use original frame size (do not resize to 640x480)
107
- Run Farneback optical flow algorithm (OpenCL implementation) on video stream from default camera:
111
- Run Farneback optical flow algorithm (CPU implementation) on video stream from file:
113
`<app> --video=<path-to-file> --cpu`
116
openvino_sample_opencl_custom_kernel.exe
117
-------------------------------------
119
Demonstrates running custom OpenCL kernels by means of OpenCV T-API interface.
120
Usage: openvino_sample_opencl_custom_kernel.exe [params]
129
- Generate and process syntetic image with built-in OpenCL kernel:
133
- Process provided image with built-in OpenCL kernel:
135
`<app> --input=<path-to-image>`
138
openvino_sample_opencv_version.exe
139
-------------------------------
141
This sample outputs OpenCV version and build configuration.
142
Usage: openvino_sample_opencv_version.exe [params]
145
print complete build info
151
- Show OpenCV version:
155
- Show complete OpenCV build configuration:
160
openvino_sample_peopledetect.exe
161
-----------------------------
163
This sample demonstrates the use of the HoG descriptor.
164
Usage: openvino_sample_peopledetect.exe [params]
166
-c, --camera (value:0)
167
capture video from camera (device index starting from 0)
175
- Run built-in pedestrian detection algorithm on video stream from camera:
179
- Run built-in pedestrian detection algorithm on video stream from file:
181
`<app> --video=<path-to-file>`