1 <!-- Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. -->
3 @defgroup vwx_demo_motion_estimation Motion Estimation Demo App
4 @brief Motion Estimation Demo user guide.
8 <a name=
"Introduction">
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.
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.
18 @note Developers may choose to extend the pipeline to implement bidirectional motion estimation.
20 The following block diagram illustrates steps of the pipeline:
28 (current pyramid) (next pyramid)
30 +--------------+--------------+
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.
39 The IME algorithm applies the following pipeline for each pyramid level, starting from the smallest one:
41 (motion field from previous level) (level from current pyramid) (level from next pyramid)
43 +---------------------------------------+---------------------------------------+
45 [CreateMotionFieldNode]
47 (motion field for 8x8 blocks)
49 [RefineMotionFieldNode]
51 (motion field for 8x8 blocks)
53 [PartitionMotionFieldNode]
55 (motion field for 4x4 blocks)
59 (motion field for the next level)
61 At the end the following pipeline is used:
63 (motion field 4x4 for the level 0)
65 [PartitionMotionFieldNode]
67 (motion field for 2x2 blocks)
73 `nvx_demo_motion_estimation` is installed in the following directory:
75 usr/share/visionworks/sources/demos/motion_estimation
77 For the steps to build sample applications, see the @ref nvx_samples_and_demos section for your OS.
80 ## Executing Motion Estimation Sample ##
82 ./nvx_demo_motion_estimation [options]
84 ### Command Line Options ###
86 This topic provides a list of supported options and the values they consume.
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.
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
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.
105 This file contains the following parameters:
108 - Parameter: [floating point value]
109 - Description: The weight of bias distance in Create Motion Field primitive. Default is 1.0.
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.
119 - **smoothnessFactor**
120 - Parameter: [floating point value]
121 - Description: The smoothness factor
for motion field. Default is 1.0.
123 #### -h, \--help ####
125 - Description: Prints the help message.
127 ### Operational Key ###
128 - Use `Space` to pause/resume the demo.
129 - Use `ESC` to close the demo.
struct _vx_delay * vx_delay
The delay object. This is like a ring buffer of objects that is maintained by the OpenVX implementati...