1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3 @page dwx_denseopticalflow_sample Dense Optical Flow Sample
6 @note SW Release Applicability: This sample is available in both **NVIDIA DriveWorks** and **NVIDIA DRIVE Software** releases.
8 @section dwx_denseopticalflow_description Description
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).
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.
17 @section dwx_denseopticalflow_sample_running Running the Sample
19 The DenseOpticalFlow sample, sample_denseopticalflow, accepts the following optional parameters. If none are specified, it performs detections on a supplied pre-recorded video.
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]
27 --estimationMode=[UHP|HP|HQ]
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.
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
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
49 --camera-group=[a|b|c]
50 Is the group where the camera is connected to.
51 Only applicable if --input-type=camera.
54 --camera-index=[0|1|2|3]
55 Indicates the camera index on the given port.
59 Setting this parameter to 1 when running the sample on Xavier B accesses the camera
61 Applicable only when --input-type=camera.
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
72 Indicates on which Nvidia Video Encoder the corresponding stage of the pipeline is to be executed.
76 Indicates on which PVA engine the corresponding stage of the pipeline is to be executed.
79 @subsection dwx_denseopticalflow_sample_examples Examples
81 ### To run the sample on a video
83 ./sample_denseopticalflow --input-type=video --video=<video file>
85 ### To run the sample on a camera on NVIDIA DRIVE platforms
87 ./sample_dense_opticalflow --input-type=camera --camera-type=<camera type> --camera-group=<camera group> --camera-index=<camera idx on camera group>
89 ### To run the sample on non-default engines
91 ./sample_denseopticalflow --nvencNo=1 --pvaNo=1
94 @section dwx_denseopticalflow_sample_output Output
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/.
99 
101 @subsection dwx_denseopticalflow_sample_more Additional information
103 For more information, see @ref denseopticalflow_mainsection.