1 <!-- Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. -->
3 @defgroup vwx_sample_hough_transform Hough Transform Demo App
4 @brief Hough Transform Demo user guide.
8 <a name=
"Introduction">
11 `nvx_demo_hough_transform` demonstrates lines and circles detection via Hough Transform.
13 ## Details of the pipeline ##
15 The demo uses the following pipeline:
29 +----------------------+----------------------+
33 +---+---------------------+----+ [Sobel3x3]
35 | | +------------------+
37 [ScaleImage (up)] [HoughSegments] [HoughCircles]
39 (edges) (segments) (circles)
41 The input frame is converted to grayscale, downscaled, blurred with Median filter,
42 and equalized. The equalized frame is then processed by Canny Edge Detector and Sobel
operator, and
43 the resulting edges image and derivatives are passed to the Hough Circle node to
44 get the
final array with detected circles. The edges image is also passed to the
45 Hough Segments node to
get the
final array with detected lines.
47 ## Installation and Usage ##
49 `nvx_demo_hough_transform` is installed in the following directory:
51 /usr/share/visionworks/sources/demos/hough_transform
53 For the steps to build sample applications, see the @ref nvx_samples_and_demos section
for your OS.
56 ## Executing the Hough Transform Demo ##
58 ./nvx_demo_hough_transform [options]
60 ### Command Line Options ###
62 This topic provides a list of supported options and the values they consume.
64 #### \-s, \--source ####
65 - Parameter: [inputUri]
66 - 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.
69 - `--source=/path/to/video.avi`
for video
70 - `--source=/path/to/image`
for image
71 - `--source=/path/to/image_%04d_sequence`
for image sequence
75 @note The V4L platform has a permissions issue. The hardware decoder is used and the demo must be
76 executed with super user permissions, i.e., with `sudo`.
79 #### \-c, \--config ####
80 - Parameter: [config file path]
81 - Description: Specifies the path to the configuration file.
83 This file contains the following parameters:
86 - Parameter: [integer value greater than or equal to zero]
87 - Description: The period in frames between source/edges
auto switch (0 - no
auto switch). The
default is 400.
90 - Parameter: [floating point value greater than 0 and less than or equal to 1]
91 - Description: [ScaleImage] The scale factor. Default is 0.5.
94 - Parameter: [nearest, bilinear, or area]
95 - Description: [ScaleImage] The scale interpolation type. Default is bilinear.
97 - **CannyLowerThresh**
98 - Parameter: [integer value greater than zero]
99 - Description: [CannyEdgeDetector] The lower threshold. Default is 230.
101 - **CannyUpperThresh**
102 - Parameter: [integer value greater than zero]
103 - Description: [CannyEdgeDetector] The upper threshold. Default is 250.
106 - Parameter: [floating point value greater than or equal to 1]
107 - Description: [HoughCircles] Inverse ratio of the accumulator resolution to the image resolution
for the downscaled frame. Default is 2.
110 - Parameter: [floating point value greater than zero]
111 - Description: [HoughCircles] Minimum distance between the centers of the detected circles
for the downscaled frame. Default is 10.
114 - Parameter: [integer value greater than zero]
115 - Description: [HoughCircles] Minimum circle radius
for the downscaled frame. Default is 1.
118 - Parameter: [integer value greater than zero]
119 - Description: [HoughCircles] Maximum circle radius
for the downscaled frame. Default is 25.
122 - Parameter: [integer value greater than zero]
123 - Description: [HoughCircles] The accumulator threshold
for the circle centers at the detection stage
for the downscaled frame. Default is 110.
125 - **circlesCapacity**
126 - Parameter: [integer value greater than zero and less than or equal to 1000]
127 - Description: [HoughCircles] The capacity of output array
for detected circles. Default is 300.
130 - Parameter: [
float value greater than zero]
131 - Description: [HoughSegments] The distance resolution of the accumulator in pixels
for the downscaled frame. Default is 1.0.
134 - Parameter: [
float value greater than zero and less then 180]
135 - Description: [HoughSegments] The angle resolution of the accumulator in degrees
for the downscaled frame. Default is 1.0.
138 - Parameter: [integer value greater than zero]
139 - Description: [HoughSegments] The accumulator threshold parameter
for the downscaled frame. Default is 100.
142 - Parameter: [integer value greater than zero]
143 - Description: [HoughSegments] The minimum line length
for the downscaled frame. Default is 25.
146 - Parameter: [integer value greater than or equal t0 zero]
147 - Description: [HoughSegments] The maximum allowed gap between points on the same line
for the downscaled frame. Default is 2.
150 - Parameter: [integer value greater than zero and less than or equal to 1000]
151 - Description: [HoughSegments] The capacity of output array
for detected lines. Default is 300.
155 `./nvx_demo_hough_transform --config=/path/to/config_file.ini`
157 - If the argument is omitted, the
default config file will be used.
159 #### \-h, \--help ####
160 - Description: Prints the help message.
162 ### Operational Keys ###
163 - Use `M` to
switch source/edges.
164 - Use `Space` to pause/resume the demo.
165 - Use `ESC` to close the demo.