Posts

Showing posts from September, 2017

Searching for the Right Threshold

Image
https://behappy.me/generator The topic for this exercise is Edge Detection. In my opinion, Edge detection is one of the things that should be fully understood because edge detection can be used in object detection, classification, feature extraction, and tracking. The theory behind edge detection is all about derivatives or the rate of change. In the first order derivative, one can see that rate of change when you go through and image. While in the second order, the point where the graph crosses zero in the x-axis, that's when the rate of change is constant. We were introduced to different kinds of edge detection kernels like Robert's, Prewitt's, Sobel's, and Scharr's. All of these kernels' sums are equal to zero. They only differ in the values. Then Canny edge detection was introduced. It is considered as an optimal detector and its algorithm goes like this: Filter an image using Gaussian filtering.  Gaussian filtering was used because median fil

Filter to Smoothen

Image
https://behappy.me/generator For our third exercise, we were introduced to Convolution Kernels and how it is used for image enhancements. According to the lecture, convolution means determining a pixel value by getting the average of the weighted values of the pixels in its neighborhood. Convolution is done by putting a kernel on top of every pixel. A kernel can also be called a "filter mask" or a "convolution kernel". It's a square matrix of values used in convolution and usually, it is 3x3.  How will we know the new pixel value given a kernel and an image? In the example below, let the highlighted pixel (which is 8) be the pixel of interest. This pixel will be the one that we will enhance using convolution. The pixel of interest will be equal to the average of weighted sums of the product of the kernel value and the pixel value in the same location. This is called mean filtering. Thus, the solution will be like this: sum = 1(4) + 1(3) + 1(8)