~iliaplatone/spacedrone.eu/inova-sis-pack

« back to all changes in this revision

Viewing changes to usr/src/opencv-samples/README.md

  • Committer: Ilia Platone
  • Date: 2022-11-15 16:19:28 UTC
  • Revision ID: git-v1:b9f4c8dff67bb705341db6a18f84a3d5f61c23ce
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
How to build these examples
 
2
===========================
 
3
 
 
4
On Linux/OSX:
 
5
```
 
6
mkdir -p samples_build && pushd samples_build
 
7
cmake <OpenVINO_ROOT>/opencv/share/OpenCV/samples
 
8
cmake --build .
 
9
popd
 
10
```
 
11
 
 
12
On Windows:
 
13
```
 
14
mkdir samples_build
 
15
pushd samples_build
 
16
cmake -G"Visual Studio 14 2015 Win64" <OpenVINO_ROOT>\opencv\samples
 
17
cmake --build . --config Release
 
18
popd samples_build
 
19
```
 
20
 
 
21
How to use these examples
 
22
=========================
 
23
 
 
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.
 
25
 
 
26
Details on each application are in following sections.
 
27
 
 
28
openvino_sample_bgfg_segm.exe
 
29
--------------------------
 
30
```
 
31
This sample demonstrates background segmentation.
 
32
Usage: openvino_sample_bgfg_segm.exe [params]
 
33
 
 
34
        -c, --camera (value:0)
 
35
                use video stream from camera (device index starting from 0)
 
36
        --file_name, --fn
 
37
                use video file as input
 
38
        -h, --help
 
39
                show help message
 
40
        -m, --method (value:mog2)
 
41
                method: background subtraction algorithm ('knn', 'mog2')
 
42
```
 
43
##### Examples:
 
44
 
 
45
- Run MOG2 background subtraction algorithm on video stream from default camera:
 
46
 
 
47
    `<app>`
 
48
 
 
49
- Run KNN background subtraction on video stream from file:
 
50
 
 
51
    `<app> --file_name=<path-to-file> --method=knn`
 
52
 
 
53
 
 
54
openvino_sample_colorization.exe
 
55
-----------------------------
 
56
```
 
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
 
64
 
 
65
Usage: openvino_sample_colorization.exe [params]
 
66
 
 
67
        -h, --help
 
68
                print this help message
 
69
        --image (value:space_shuttle.jpg)
 
70
                path to image file
 
71
        --model (value:colorization_release_v2.caffemodel)
 
72
                model weights
 
73
        --opencl
 
74
                enable OpenCL
 
75
        --proto (value:colorization_deploy_v2.prototxt)
 
76
                model configuration
 
77
```
 
78
##### Examples:
 
79
 
 
80
- Colorize the image using downloaded network:
 
81
 
 
82
    `<app> --model=<path-to-caffemodel> --proto=<path-to-prototxt> --image=<path-to-image>`
 
83
 
 
84
**Note:**  users have to download DNN model files (layout in .prototxt  and weights in .caffemodel) from the Internet manually
 
85
 
 
86
openvino_sample_dense_optical_flow.exe
 
87
-----------------------------------
 
88
```
 
89
This sample demonstrates using of dense optical flow algorithms.
 
90
Usage: openvino_sample_dense_optical_flow.exe [params]
 
91
 
 
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)
 
96
        --cpu, -m
 
97
                run without OpenCL
 
98
        -h, --help
 
99
                print help message
 
100
        -o, --original
 
101
                use original frame size (do not resize to 640x480)
 
102
        -v, --video
 
103
                use video as input
 
104
```
 
105
##### Examples:
 
106
 
 
107
- Run Farneback optical flow algorithm (OpenCL implementation) on video stream from default camera:
 
108
 
 
109
    `<app>`
 
110
 
 
111
- Run Farneback optical flow algorithm (CPU implementation) on video stream from file:
 
112
 
 
113
    `<app> --video=<path-to-file> --cpu`
 
114
 
 
115
 
 
116
openvino_sample_opencl_custom_kernel.exe
 
117
-------------------------------------
 
118
```
 
119
Demonstrates running custom OpenCL kernels by means of OpenCV T-API interface.
 
120
Usage: openvino_sample_opencl_custom_kernel.exe [params]
 
121
 
 
122
        -h, --help
 
123
                print help message
 
124
        -i, --input
 
125
                specify input image
 
126
```
 
127
##### Examples:
 
128
 
 
129
- Generate and process syntetic image with built-in OpenCL kernel:
 
130
 
 
131
    `<app>`
 
132
 
 
133
- Process provided image with built-in OpenCL kernel:
 
134
 
 
135
    `<app> --input=<path-to-image>`
 
136
 
 
137
 
 
138
openvino_sample_opencv_version.exe
 
139
-------------------------------
 
140
```
 
141
This sample outputs OpenCV version and build configuration.
 
142
Usage: openvino_sample_opencv_version.exe [params]
 
143
 
 
144
        -b, --build
 
145
                print complete build info
 
146
        -h, --help
 
147
                print this help
 
148
```
 
149
##### Examples:
 
150
 
 
151
- Show OpenCV version:
 
152
 
 
153
    `<app>`
 
154
 
 
155
- Show complete OpenCV build configuration:
 
156
 
 
157
    `<app> --build`
 
158
 
 
159
 
 
160
openvino_sample_peopledetect.exe
 
161
-----------------------------
 
162
```
 
163
This sample demonstrates the use of the HoG descriptor.
 
164
Usage: openvino_sample_peopledetect.exe [params]
 
165
 
 
166
        -c, --camera (value:0)
 
167
                capture video from camera (device index starting from 0)
 
168
        -h, --help
 
169
                print help message
 
170
        -v, --video
 
171
                use video as input
 
172
```
 
173
##### Examples:
 
174
 
 
175
- Run built-in pedestrian detection algorithm on video stream from camera:
 
176
 
 
177
    `<app>`
 
178
 
 
179
- Run built-in pedestrian detection algorithm on video stream from file:
 
180
 
 
181
    `<app> --video=<path-to-file>`