Posts

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)

What Different Values Do To Images

Image
https://behappy.me/generator On the second week of our laboratory discussions, image enhancements were discussed. These kinds of image enhancements lets you generate a function according to your liking or according to what enhancements you want the given image to have and then applying that function to compute for the newly generated value for a certain color channel for every pixel in an image.                                             bear.jpg In an example of image enhancements, our laboratory professor provided us with an image of a bear named bear.jpg. B elow, the following versions of bear.jpg is produced together with a graph of the given function in contrast to the function x = y . bear_dark.jpg bear_inverted.jpg                                     bear_light.jpg x is the input pixel of  bear.jpg.  bear_dark.jpg was produced when each pixel was manipulated using the function   f(x) = 0.001*x^2-0.023x On the other ha

Wait at the Right Time

Image
https://behappy.me/generator For every course a student takes, it always starts with the basics. Our first topic in the laboratory was an introduction of the course and the basics of  OpenCV  - a C++ library that we will be using the whole semester for digital image processing. As I said the on my previous post, an image is represented as a two-dimensional array of pixels and per pixel has its corresponding values. Furthermore, it is said that a pixel's values represents the three (3) color channels - red, green, and blue. Each value determines the amount of a certain color channel is in that particular pixel. Usually the color channels are in the following order: red, green, and blue but in OpenCV , it is ordered in blue, green, and red. In C++, as long as  OpenCV library is imported ,  an image can be stored in a container called Mat.  For image reading, imread()  function can be used. Other functions such as   imshow()   and   imwrite()  are introduced.   imshow(

Author's Post

Image
We lcome to "One Pixel at a Time"!  https://behappy.me/generator I am Renee Arianne Lat, a BS Computer Science student in the University of the Philippines Los Baños.  https://imgflip.com/images-to-gif "One Pixel at a Time" is a partial requirement for an elective I'm taking this semester. This blog will be all about the things I will learn about the field of Digital Image Processing.  As an introduction, it is said that an image is a matrix of square-shaped pixels and per pixel contains a specific value. Basically, an image is represented by a two-dimensional array of values. Digital Image Processing will be all about editing an image by manipulating each pixel in the array.  I'm very nervous about in taking this course because it's seasonal but at the same time I'm kind of excited so hopefully I'll finish this course with flying colors! Fighting!