DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

/dvs/git/dirty/gitlab-master_av/dw/sdk/samples/imageprocessing/motion/denseopticalflow/README.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page dwx_denseopticalflow_sample Dense Optical Flow Sample
4 @tableofcontents
5 
6 @note SW Release Applicability: This sample is available in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
7 
8 @section dwx_denseopticalflow_description Description
9 
10 The Dense Optical Flow module sample demonstrates the Dense Optical Flow pipeline on multiple hardware units:
11 - VIC (Video Image Compositor).
12 - NVIDIA NVENC (NVIDIA Video Encoder).
13 - PVA (Programmable Vision Accelerator).
14 
15 The Dense Optical Flow sample accepts RAW videos, h264 videos, or live camera input data from an AR0231 (revision >= 4) sensor. It then applies an optical flow algorithm to estimate motion vectors between frames.
16 
17 @section dwx_denseopticalflow_sample_running Running the Sample
18 
19 The DenseOpticalFlow sample, sample_denseopticalflow, accepts the following optional parameters. If none are specified, it performs detections on a supplied pre-recorded video.
20 
21  ./sample_denseopticalflow --input-type=[video|camera]
22  --video=[path/to/video]
23  --camera-type=[camera]
24  --camera-group=[a|b|c|d]
25  --camera-index=[0|1|2|3]
26  --slave=[0|1]
27  --estimationMode=[UHP|HP|HQ]
28  --nvencNo=[0|1]
29  --pvaNo=[0|1]
30 
31 Where:
32 
33  --input-type=[video|camera]
34  Defines if the input is from live camera or from a recorded video.
35  Live camera is supported only on NVIDIA DRIVE(tm) platforms.
36  It is not supported on Linux (x86 architecture) host systems.
37  Default value: video
38 
39  --video=[path/to/video]
40  Specifies the absolute or relative path of a raw, lraw or h264 recording.
41  Only applicable if --input-type=video
42  Default value: path/to/data/samples/stereo/left_1.h264
43 
44  --camera-type=[camera]
45  Specifies a supported AR0231 `RCCB` sensor.
46  Only applicable if --input-type=camera.
47  Default value: ar0231-rccb-bae-sf3324
48 
49  --camera-group=[a|b|c]
50  Is the group where the camera is connected to.
51  Only applicable if --input-type=camera.
52  Default value: a
53 
54  --camera-index=[0|1|2|3]
55  Indicates the camera index on the given port.
56  Default value: 0
57 
58  --slave=[0|1]
59  Setting this parameter to 1 when running the sample on Xavier B accesses the camera
60  on Xavier A.
61  Applicable only when --input-type=camera.
62  Default value: 0
63 
64  --estimationMode=[UHP|HP|HQ]
65  Indicates the quality and the performance of Dense Optical Flow algorithm:
66  - HP: High Performance
67  - UHP: Ultra High Performance
68  - HQ: High Quality
69  Default value: HP
70 
71  --nvencNo=[0|1]
72  Indicates on which Nvidia Video Encoder the corresponding stage of the pipeline is to be executed.
73  Default value: 0
74 
75  --pvaNo=[0|1]
76  Indicates on which PVA engine the corresponding stage of the pipeline is to be executed.
77  Default value: 0
78 
79 @subsection dwx_denseopticalflow_sample_examples Examples
80 
81 ### To run the sample on a video
82 
83  ./sample_denseopticalflow --input-type=video --video=<video file>
84 
85 ### To run the sample on a camera on NVIDIA DRIVE platforms
86 
87  ./sample_dense_opticalflow --input-type=camera --camera-type=<camera type> --camera-group=<camera group> --camera-index=<camera idx on camera group>
88 
89 ### To run the sample on non-default engines
90 
91  ./sample_denseopticalflow --nvencNo=1 --pvaNo=1
92 
93 
94 @section dwx_denseopticalflow_sample_output Output
95 
96 The sample creates a window and displays a video with two sections. The section above demonstrates the original video,
97 whereas the section below shows the result of Dense Optical Flow with color coding presented at https://hci.iwr.uni-heidelberg.de/Correspondence_Visualization/.
98 
99 ![Dense Optical Flow](sample_denseopticalflow.png)
100 
101 @subsection dwx_denseopticalflow_sample_more Additional information
102 
103 For more information, see @ref denseopticalflow_mainsection.