VisionWorks Toolkit Reference

September 29, 2015 | 1.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
stable/hough_transform/hough_transform_user_guide.md
Go to the documentation of this file.
1 <!-- Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. -->
2 
3 @defgroup vwx_sample_hough_transform Hough Transform Demo App
4 @brief Hough Transform Demo user guide.
5 @ingroup nvx_demos
6 @{
7 
8 <a name="Introduction">
9 ## Introduction ##
10 
11 `nvx_demo_hough_transform` demonstrates lines and circles detection via Hough Transform.
12 
13 The demo uses the following pipeline:
14 
15  (frame)
16  |
17  [ColorConvert]
18  |
19  [ChannelExtract]
20  |
21  [ScaleImage (down)]
22  |
23  [Median3x3]
24  |
25  [EqualizeHist]
26  |
27  +----------------------+----------------------+
28  | |
29  [CannyEdgeDetector] |
30  | |
31  +---+---------------------+----+ [Sobel3x3]
32  | | | |
33  | | +------------------+
34  | | |
35  [ScaleImage (up)] [HoughSegments] [HoughCircles]
36  | | |
37  (edges) (segments) (circles)
38 
39 The input frame is converted to grayscale, downscaled, blurred with Median filter,
40 and equalized. The equalized frame is then processed by Canny Edge Detector and Sobel operator, and
41 the resulting edges image and derivatives are passed to the Hough Circle node to
42 get the final array with detected circles. The edges image is also passed to the
43 Hough Segments node to get the final array with detected lines.
44 
45 The result from Canny Edge Detector is upscaled into a real image to use for rendering;
46 all other intermediate results are kept in virtual images for graph optimization.
47 
48 `nvx_demo_hough_transform` is installed in the following directory:
49 
50  /usr/share/visionworks/sources/demos/hough_transform
51 
52 For the steps to build sample applications, see the @ref nvx_samples_and_demos section for your OS.
53 
54 <a name="Executing">
55 ## Executing the Hough Transform Demo ##
56 
57  ./nvx_demo_hough_transform [options]
58 
59 ### Command Line Options ###
60 
61 This topic provides a list of supported options and the values they consume.
62 
63 #### \-s, \--source ####
64 - Parameter: [inputUri]
65 - 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.
66 - Usage:
67 
68  - `--source=/path/to/video.avi` for video
69  - `--source=/path/to/image` for image
70  - `--source=/path/to/image_%04d_sequence` for image sequence
71  - `--source=device://camera0` for the first camera
72  - `--source=device://camera1` for the second camera.
73 
74 @note On Vibrante V3Le, V4L platforms hardware accelerated video playback is supported for H.264
75 elementary streams only.
76 
77 @note The V4L platform has a permissions issue. If input data are an H.264 elementary stream, hardware decoder
78 is used and sample must be executed with super user permissions, i.e., with `sudo`.
79 
80 
81 #### \-c, \--config ####
82 - Parameter: [config file path]
83 - Description: Specifies the path to the configuration file.
84 
85  This file contains the following parameters:
86 
87  - **switchPeriod**
88  - Parameter: [integer value greater than or equal to zero]
89  - Description: The period in frames between source/edges auto switch (0 - no auto switch). The default is 400.
90 
91  - **scaleFactor**
92  - Parameter: [floating point value greater than 0 and less than or equal to 1]
93  - Description: [ScaleImage] The scale factor. Default is 0.5.
94 
95  - **scaleType**
96  - Parameter: [nearest, bilinear, or area]
97  - Description: [ScaleImage] The scale interpolation type. Default is bilinear.
98 
99  - **CannyLowerThresh**
100  - Parameter: [integer value greater than zero]
101  - Description: [CannyEdgeDetector] The lower threshold. Default is 230.
102 
103  - **CannyUpperThresh**
104  - Parameter: [integer value greater than zero]
105  - Description: [CannyEdgeDetector] The upper threshold. Default is 250.
106 
107  - **dp**
108  - Parameter: [floating point value greater than or equal to 1]
109  - Description: [HoughCircles] Inverse ratio of the accumulator resolution to the image resolution for the downscaled frame. Default is 2.
110 
111  - **minDist**
112  - Parameter: [floating point value greater than zero]
113  - Description: [HoughCircles] Minimum distance between the centers of the detected circles for the downscaled frame. Default is 10.
114 
115  - **minRadius**
116  - Parameter: [integer value greater than zero]
117  - Description: [HoughCircles] Minimum circle radius for the downscaled frame. Default is 1.
118 
119  - **maxRadius**
120  - Parameter: [integer value greater than zero]
121  - Description: [HoughCircles] Maximum circle radius for the downscaled frame. Default is 25.
122 
123  - **accThreshold**
124  - Parameter: [integer value greater than zero]
125  - Description: [HoughCircles] The accumulator threshold for the circle centers at the detection stage for the downscaled frame. Default is 110.
126 
127  - **circlesCapacity**
128  - Parameter: [integer value greater than zero and less than or equal to 1000]
129  - Description: [HoughCircles] The capacity of output array for detected circles. Default is 300.
130 
131  - **rho**
132  - Parameter: [float value greater than zero]
133  - Description: [HoughSegments] The distance resolution of the accumulator in pixels for the downscaled frame. Default is 1.0.
134 
135  - **theta**
136  - Parameter: [float value greater than zero and less then 180]
137  - Description: [HoughSegments] The angle resolution of the accumulator in degrees for the downscaled frame. Default is 1.0.
138 
139  - **votesThreshold**
140  - Parameter: [integer value greater than zero]
141  - Description: [HoughSegments] The accumulator threshold parameter for the downscaled frame. Default is 100.
142 
143  - **minLineLength**
144  - Parameter: [integer value greater than zero]
145  - Description: [HoughSegments] The minimum line length for the downscaled frame. Default is 25.
146 
147  - **maxLineGap**
148  - Parameter: [integer value greater than or equal t0 zero]
149  - Description: [HoughSegments] The maximum allowed gap between points on the same line for the downscaled frame. Default is 2.
150 
151  - **linesCapacity**
152  - Parameter: [integer value greater than zero and less than or equal to 1000]
153  - Description: [HoughSegments] The capacity of output array for detected lines. Default is 300.
154 
155 - Usage:
156 
157  `./nvx_demo_hough_transform --config=/path/to/config_file.ini`
158 
159 - If the argument is omitted, the default config file will be used.
160 
161 #### \-h, \--help ####
162 - Description: Prints the help message.
163 
164 ### Operational Keys ###
165 - Use `M` to switch source/edges.
166 - Use `Space` to pause/resume the demo.
167 - Use `ESC` to close the demo.
168 
169 @}
Range< T > all()
Creates a range that includes all points.
Definition: Range.hpp:163