68
68
69
69
-# ** What does this program do?**
70
70
- Asks the user to enter a numerical value to set the lower threshold for our * Canny Edge
71
- Detector* (by means of a Trackbar)
71
+ Detector* (by means of a Trackbar).
72
72
- Applies the * Canny Detector* and generates a ** mask** (bright lines representing the edges
73
73
on a black background).
74
74
- Applies the mask obtained on the original image and display it in a window.
@@ -85,19 +85,19 @@ Explanation
85
85
86
86
Note the following:
87
87
88
- -# We establish a ratio of lower:upper threshold of 3:1 (with the variable *ratio*)
88
+ -# We establish a ratio of lower:upper threshold of 3:1 (with the variable *ratio*).
89
89
-# We set the kernel size of \f$3\f$ (for the Sobel operations to be performed internally by the
90
- Canny function)
90
+ Canny function).
91
91
-# We set a maximum value for the lower Threshold of \f$100\f$.
92
92
93
93
-# Loads the source image:
94
94
@snippet cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp load
95
95
96
- -# Create a matrix of the same type and size of * src* (to be * dst* )
96
+ -# Create a matrix of the same type and size of * src* (to be * dst* ):
97
97
@snippet cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp create_mat
98
- -# Convert the image to grayscale (using the function @ref cv::cvtColor :
98
+ -# Convert the image to grayscale (using the function @ref cv::cvtColor ) :
99
99
@snippet cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp convert_to_gray
100
- -# Create a window to display the results
100
+ -# Create a window to display the results:
101
101
@snippet cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp create_window
102
102
-# Create a Trackbar for the user to enter the lower threshold for our Canny detector:
103
103
@snippet cpp/tutorial_code/ImgTrans/CannyDetector_Demo.cpp create_trackbar
0 commit comments