opencv_tutorials_t5
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
opencv_tutorials_t5 [2016/06/07 15:54] – joaomatos | opencv_tutorials_t5 [2017/05/13 17:44] (current) – [Understanding the code] acater | ||
---|---|---|---|
Line 49: | Line 49: | ||
const int FRAME_HEIGHT = 480; | const int FRAME_HEIGHT = 480; | ||
- | //Function to create a window with the Trackbars to apply the Thresholding. | + | //Function to create a window with the Trackbars to apply the Threshold. |
void createTrackbars() { | void createTrackbars() { | ||
Line 76: | Line 76: | ||
//Defining the erode and dilate properties | //Defining the erode and dilate properties | ||
//the erode element chosen here is a 3x3 piexels rectangle. | //the erode element chosen here is a 3x3 piexels rectangle. | ||
- | //Change the Size argument to optimize your thresholding. | + | //Change the Size argument to optimize your threshold. |
- | //dilate with 8x8 size element to make the thresholding | + | //dilate with 8x8 size element to make the threshold |
Mat erodeElement = getStructuringElement(MORPH_RECT, | Mat erodeElement = getStructuringElement(MORPH_RECT, | ||
Line 185: | Line 185: | ||
---- | ---- | ||
< | < | ||
- | //Function to create a window with the Trackbars to apply the Thresholding. | + | //Function to create a window with the Trackbars to apply the Threshol. |
void createTrackbars() { | void createTrackbars() { | ||
Line 207: | Line 207: | ||
</ | </ | ||
- | Our first function is the function that will create a window to display the slider bars to adjust the HSV Threshold. First we create a new window using **" | + | Our first function is the function that will create a window to display the slider bars to adjust the HSV Threshold. First we create a new window using **" |
Line 218: | Line 218: | ||
//Defining the erode and dilate properties | //Defining the erode and dilate properties | ||
//the erode element chosen here is a 3x3 piexels rectangle. | //the erode element chosen here is a 3x3 piexels rectangle. | ||
- | //Change the Size argument to optimize your thresholding. | + | //Change the Size argument to optimize your threshold. |
- | //dilate with 8x8 size element to make the thresholding | + | //dilate with 8x8 size element to make the threshold |
Mat erodeElement = getStructuringElement(MORPH_RECT, | Mat erodeElement = getStructuringElement(MORPH_RECT, | ||
Line 327: | Line 327: | ||
| | ||
+ | \\ | ||
+ | \\ | ||
+ | Below is a video demonstrating the program in real time. | ||
+ | {{youtube> |
opencv_tutorials_t5.txt · Last modified: 2017/05/13 17:44 by acater