![]() |
VisionWorks Toolkit ReferenceDecember 18, 2015 | 1.2 Release |
Motion Estimation Demo user guide.
nvx_demo_motion_estimation
is a code sample that implements the NVIDIA Iterative Motion Estimation (IME) algorithm. IME is a block based motion estimation algorithm which incorporates iterative refinement steps to improve output motion field.
nvx_demo_motion_estimation
sample pipeline illustrates one-directional motion estimation computing backward motion vectors from current to previous frame. The sample pipeline generates a motion vector per every 2x2 block stored in Q14.2 format.
The following block diagram illustrates steps of the pipeline:
(next frame) | [ColorConvertNode] | [GaussianPyramidNode] | (current pyramid) (next pyramid) | | +--------------+--------------+ | [IME] | (motion field)
The sample uses vx_delay object to keep these frames from input video. After graph processing, the delay is aged, the next frame becomes current.
The IME algorithm applies the following pipeline for each pyramid level, starting from the smallest one:
(motion field from previous level) (level from current pyramid) (level from next pyramid) | | | +---------------------------------------+---------------------------------------+ | [CreateMotionFieldNode] | (motion field for 8x8 blocks) | [RefineMotionFieldNode] | (motion field for 8x8 blocks) | [PartitionMotionFieldNode] | (motion field for 4x4 blocks) | [MultiplyByScalar] | (motion field for the next level)
At the end the following pipeline is used:
(motion field 4x4 for the level 0) | [PartitionMotionFieldNode] | (motion field for 2x2 blocks) | [MultiplyByScalar] | (final motion field)
nvx_demo_motion_estimation
is installed in the following directory:
usr/share/visionworks/sources/demos/motion_estimation
For the steps to build sample applications, see the Samples and Demos section for your OS.
./nvx_demo_motion_estimation [options]
This topic provides a list of supported options and the values they consume.
\--source=/path/to/video.avi
for video\--source=/path/to/image
for image\--source=/path/to/image_%04d_sequence
for image sequence\--source=device://camera0
for the first camera\--source=device://camera1
for the second camera.Description: Specifies the path to the configuration file. The file contains the parameters of the algorithm stored in key=value format. Note that the config file contains information on the intrinsic parameters of the camera, so using the default config file for different videos may sometimes give a result with insufficient quality.
This file contains the following parameters:
Space
to pause/resume the demo.ESC
to close the demo.