VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
stable/motion_estimation/motion_estimation_user_guide.md
Go to the documentation of this file.
1 <!-- Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. -->
2 
3 @defgroup vwx_demo_motion_estimation Motion Estimation Demo App
4 @brief Motion Estimation Demo user guide.
5 @ingroup nvx_demos
6 @{
7 
8 <a name="Introduction">
9 ## Introduction ##
10 
11 `nvx_demo_motion_estimation` is a code sample that implements the NVIDIA Iterative Motion Estimation (IME) algorithm.
12 IME is a block based motion estimation algorithm which incorporates iterative refinement steps to improve output motion field.
13 
14 `nvx_demo_motion_estimation` sample pipeline illustrates one-directional motion estimation
15 computing backward motion vectors from current to previous frame.
16 The sample pipeline generates a motion vector per every 2x2 block stored in Q14.2 format.
17 
18 @note Developers may choose to extend the pipeline to implement bidirectional motion estimation.
19 
20 The following block diagram illustrates steps of the pipeline:
21 
22  (next frame)
23  |
24  [ColorConvertNode]
25  |
26  [GaussianPyramidNode]
27  |
28  (current pyramid) (next pyramid)
29  | |
30  +--------------+--------------+
31  |
32  [IME]
33  |
34  (motion field)
35 
36 The sample uses vx_delay object to keep these frames from input video.
37 After graph processing, the delay is aged, the next frame becomes current.
38 
39 The IME algorithm applies the following pipeline for each pyramid level, starting from the smallest one:
40 
41  (motion field from previous level) (level from current pyramid) (level from next pyramid)
42  | | |
43  +---------------------------------------+---------------------------------------+
44  |
45  [CreateMotionFieldNode]
46  |
47  (motion field for 8x8 blocks)
48  |
49  [RefineMotionFieldNode]
50  |
51  (motion field for 8x8 blocks)
52  |
53  [PartitionMotionFieldNode]
54  |
55  (motion field for 4x4 blocks)
56  |
57  [MultiplyByScalar]
58  |
59  (motion field for the next level)
60 
61 At the end the following pipeline is used:
62 
63  (motion field 4x4 for the level 0)
64  |
65  [PartitionMotionFieldNode]
66  |
67  (motion field for 2x2 blocks)
68  |
69  [MultiplyByScalar]
70  |
71  (final motion field)
72 
73 `nvx_demo_motion_estimation` is installed in the following directory:
74 
75  usr/share/visionworks/sources/demos/motion_estimation
76 
77 For the steps to build sample applications, see the @ref nvx_samples_and_demos section for your OS.
78 
79 <a name="Executing">
80 ## Executing Motion Estimation Sample ##
81 
82  ./nvx_demo_motion_estimation [options]
83 
84 ### Command Line Options ###
85 
86 This topic provides a list of supported options and the values they consume.
87 
88 #### \-s, \--source ####
89 - Parameter: [inputUri]
90 - Description: Specifies the input URI. Accepted parameters include a video (in .avi format), an image or an image sequence (in .png, .jpg, .jpeg, .bmp, or .tiff format), or camera.
91 - Usage:
92  - `\--source=/path/to/video.avi` for video
93  - `\--source=/path/to/image` for image
94  - `\--source=/path/to/image_%04d_sequence` for image sequence
95  - `\--source=device://camera0` for the first camera
96  - `\--source=device://camera1` for the second camera.
97 
98 #### \-c, \--config ####
99 - Parameter: [Config file path]
100 - Description: Specifies the path to the configuration file. The file contains the parameters
101  of the algorithm stored in key=value format. Note that the config file contains information
102  on the intrinsic parameters of the camera, so using the default config file for different
103  videos may sometimes give a result with insufficient quality.
104 
105  This file contains the following parameters:
106 
107  - **biasWeight**
108  - Parameter: [floating point value]
109  - Description: The weight of bias distance in Create Motion Field primitive. Default is 1.0.
110 
111  - **mvDivFactor**
112  - Parameter: [integer value greater than or equal to 1 and less than or equal to 16]
113  - Description: mvDivFactor specifies the minimum Manhattan distance of the second best motion vector
114  from the best motion vector selected for a block.
115  Having mvDivFactor imposes selection of a second diverse motion vector
116  to represent the blocks located near the object boundaries.
117  Default is 4.
118 
119  - **smoothnessFactor**
120  - Parameter: [floating point value]
121  - Description: The smoothness factor for motion field. Default is 1.0.
122 
123 #### -h, \--help ####
124 - Parameter: true
125 - Description: Prints the help message.
126 
127 ### Operational Key ###
128 - Use `Space` to pause/resume the demo.
129 - Use `ESC` to close the demo.
130 
131 @}
struct _vx_delay * vx_delay
The delay object. This is like a ring buffer of objects that is maintained by the OpenVX implementati...
Definition: vx_types.h:230