Hi, all. My congratulations for you, that you have listened to the third part of our computer vision course. Let's start practicing. This code is implemented in Visual Studio, C++ language. In the third lecture, you know how to make smoothing for image, what is morphological transformations, edge detection, Hough transformations, and circle detection. Let's try to implement this function on practice. We need to read the image in the OpenCV matrix. For this we use imread function from OpenCV, where we need to set to the path of the image. After that, we can show it using the following method; where we create the window. Also, set a place where we would like the window to appear, and use show method from OpenCV library. Let's try to do that. Great, we can see our original image, with this image we will work in our practice part. Let's start with smoothing methods. Smoothing is image blurring that is achieved by convolving the image wiht low pass kernel filter. It is useful for noise removing. In order to call the function from OpenCV, we need the output matrix. Let's create the matrix smoothMat. After this, as we apply for smoothing method different filters, OpenCV has Boxfilter, Gaussian filter, also Median blurring, Bilateral filtering, and 2D filter. For this filtering, we need to set our original image, the output image, depth, and the kernal size. For other filters, the settings are just the same, so it is original image, output image, and the kernel size. Let's check on practice, what example we will have. This is our original image, and we need to type smoothing. This output with box filter. It is Gaussian Blurring with kernel size five. Median blurring. We can match three output images with the same kernel size, but different filter types. Also, we have bilateral filter, it will have the following output, and for 2D filter we need to create the kernel. It is a simple matrix with values one divided on 25. After that we call filter 2D where set our kernel, and the output for this will be the following. The next method is morphology. Morphological transformation are the simple operations that based on image shape. It is normally performed before binary image, also for morphological transformation we need to set 2 inputs. The first one is original image, and the second one - structuring element or kernel, which decided the nature of operation. As I mentioned, we need binary image. For this, we convert our original image into a grayscale format using cvtColor function from OpenCV and type BGR to Gray. After this, we apply blurring function, and apply threshold function from OpenCV, which has the input - our blurring image, the minimal value 128, the maximal value is 255, and I choose the threshold binary. In order to give a structured element OpenCV has the function - getStructuring element, where we need to set the shape of element, and the size. We will use five dimension. After this, we can call Erode and Dilate function. It is a simple call Erode where we set binary image, output matrix, and our structuring elements. For dilation operation, the way is the same. Look at the output. It is our original image, and we need to type morphology. It is image erosion and this dilation, also OpenCV has more complex morphological transformation where we can combine the erosion and dilation. For this, we need to use morphologyEx, where we can set our dilation matrix and the type as erosion. Also we need to set the structuring element. The opposite operation, where we set erosion matrix, but the type is dilation will be the next. Let's move to the next third approach and it is Edge detection. Edge detection includes a variety of mathematical operations which aim at identifying a point at which the image brightness change sharply, or a more formally has discontinuities. In practice, we need to again create the greyscaling mat using cvtColor with type BGR to gray. After that, we will make some experiments with different methods. They are; Sobel, Scharr, Laplacian and Canny. Let's start with the Sobel method. This method is based on the gradient, so we need to create our gradient matrix and matrix for each coordinate. After that, we initialize some parameters as; kernel size, scaling, delta and depth. In OpenCV we have function Sobel where we need to set the image, our gradient matrix for a certain coordinate, depth, also X and Y order of derivative coordinate, scaling, delta and border type. The same we need to make for Y coordinate. After that, we can convert our image again to ABS format, so this function calculates absolute values, and calculates the weighted sum of two arrays with the weighted function from OpenCV. We will have the output, let's check it. It is our original image and we need to type edge detection. This one is the output from our Sobel method. The next method is Scharr. For this, we can simple call Scharr method from OpenCV library where we need to set our grayscale matrix, output matrix, the type of filter and also x and y coordinate. Let's look at the example. It is our Scharr method. Laplacian example, it is just the same we need to call Laplacian function from OpenCV library and also set the depth as CV 16. After that, we convert our image, calculate absolute values, enter display their output. The last one is Scharr image and the next one - Laplacian image. Also we can take a look about Canny method, we need to call Canny function from OpenCV Library where we set grayscaling matrix, our output matrix and also two thresholds. All of these operations you can play with different parameters and thresholds and you will have a different outputs. For the following setting, we will have the next output. We have finished our first part of third week practice. In the second part, we will know how to apply Hough Transform method, how to build fast Fourier transformation, and how to detect circles.