VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
stable/video_stabilizer/video_stabilizer_user_guide.md
Go to the documentation of this file.
1 <!-- Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. -->
2 
3 @defgroup nvx_demo_video_stabilizer Video Stabilizer Demo App
4 @brief Video Stabilizer Demo user guide.
5 @ingroup nvx_demos
6 @{
7 
8 <a name="Introduction">
9 ## Introduction ##
10 
11 `nvx_demo_video_stabilizer` is a demo that demonstrates the image based video stabilization algorithm.
12 It uses the Harris feature detector and sparse pyramidal optical flow method (Lucas-Kanade) to estimate a frame's motion.
13 
14 The demo uses the following pipeline:
15 
16  (next frame)
17  |
18  +-------------------------------------+-------------------------------+-------+
19  | | | |
20  | [ColorConvert] | |
21  | | | |
22  | +--------------------------------+ | |
23  | | | | |
24  | | [GaussianPyramid] | |
25  | | | | |
26  | | (pyr delay -1) (pyr delay 0) (pts delay -1) | |
27  | | | | | | |
28  | | | | +----+ | |
29  | | | | | | | |
30  | | +----------------+------------------+ | | |
31  | | | | | |
32  | | [OpticalFlowPyrLK] | | |
33  | | | | | |
34  | +-------+------------------------+ | | |
35  | | | | | |
36  | [HarrisTrack] +-------+---------------+ | |
37  | | | | |
38  | (pts delay 0) [FindHomography] | |
39  | | | |
40  | +-------+-----------------------+ |
41  | | |
42  | [HomographyFilter] |
43  | | |
44  | (...) (matrix delay -1) (matrix delay 0) |
45  | | | | |
46  | +-------------+------------------+ [ImageCopy]
47  | | |
48  | [MatrixSmoother] (RGBX delay -n) (...) (RGBX delay 0)
49  | | |
50  +------------------+ |
51  | |
52  [TruncateStabTransform] |
53  | |
54  +---------------+---------------+
55  |
56  [WarpPerspective]
57  |
58  (stabilized)
59 
60 `nvx_demo_video_stabilizer` is installed in the following directory:
61 
62  /usr/share/visionworks/sources/demos/video_stabilizer
63 
64 For the steps to build sample applications, see the @ref nvx_samples_and_demos section for your OS.
65 
66 <a name="Executing">
67 ## Executing the Video Stabilizer Demo ##
68 
69  ./nvx_demo_video_stabilizer [options]
70 
71 ### Command Line Options ###
72 
73 #### \-s, \--source ####
74 - Parameter: [Input URI]
75 - Description: Specifies the input URI. Accepted parameters include a video (.avi), an image sequence (.png, .jpg, .jpeg, .bmp, .tiff) or camera to grab frames.
76 - Usage:
77  - `./nvx_demo_video_stabilizer --source=/path/to/video.avi` for video
78  - `./nvx_demo_video_stabilizer --source=/path/to/image_%04d_sequence` for image sequence
79  - `./nvx_demo_video_stabilizer --source=device://camera0` for the first camera
80  - `./nvx_demo_video_stabilizer --source=device://camera1` for the second camera.
81 
82 #### \-n ####
83 - Parameter: [Number of smoothing frames]
84 - Description: Specifies the number of smoothing frames, should be in the range [1,6] (5 by default). Frames for smoothing are taken from the interval [-numOfSmoothingFrames; numOfSmoothingFrames] in the current frame's vicinity.
85 - Usage: \n
86  `./nvx_demo_video_stabilizer --source=video.avi -n6`
87 
88 #### \--crop ####
89 - Parameter: [Crop margin for stabilized frames]
90 - Description: Specifies a proportion of the width (height) of the frame that is allowed to be cropped for stabilization of the frames. The value should be less than 0.5. If it is negative then the cropping procedure is turned off.
91 - Usage: \n
92  `./nvx_demo_video_stabilizer --source=video.avi --crop=0.1`
93 
94 #### \-h, \--help ####
95 - Description: Prints the help message.
96 
97 ### Operational Key ###
98 - Use `ESC` to close the demo.
99 - Use `Space` to pause/resume the demo.
100 
101 @}