馃憢 Welcome to Haeyoon’s blog.

Hi, this is Haeyoon. I’m documenting my learning notes in this blog.

Histogram Equalization

Image Histogram and Histogram Equalization Image historgram represents the intensity distribution of an image. X-axis stands for intensity, Y-axis for the number of pixels. Histogram equalization is a method in image processing of contrast adjustment using the image鈥檚 histogram 1. It stretches out the intensity range of the image. Use HSV Hue saturation value (HSV) color scale is used to process the intensity separately and to focus on value channel. Thus, I changed the image from BGR to HSV first, and equalized the histogram on value channel only, and finally converted the image from HSV to RGB....

March 14, 2023 路 2 min 路 Haeyoon

Perspective Transformation

Perspective Transformation This is a photo of a paper on a table. Is there a way to make it look as if it was scanned, removing everything outside the paper? This is possible if we use prospective transformation that restores the image to a picture that is centered with the optical axis and does not contain any rotation, changes to aspect ratio, skew, or keystone distortion. The picture is the letter sized paper, and thus aspect ratio is 8 x 11....

March 14, 2023 路 2 min 路 Haeyoon

Directional Derivatives

Sobel Derivative and Custom Filter Sobel derivative calculates the derivative in x and y directions. Thus, I decided to create customized 2D filter to calculate the derivative in the direction of 45 and -45 degree angles, respectively. The customized kernel for 45 degree is: $$ \begin{bmatrix} 0 & 1 & 2 \\ -1 & 0 & 1 \\ -2 & -1 & 0 \end{bmatrix} $$ The kernel for -45 degrees is:...

March 7, 2023 路 2 min 路 Haeyoon

How to Blur and Sharpen Color Image

Summary Read an image file and convert the image from one color space (e.g. BGR to RGB). Select the filter (e.g. Gaussian Kernel function or any custom filter) and apply to the image for smoothing effect. The bigger the kernel size, the blurrier an image will be. To sharpen the image, get the difference between original and blurred images and add back that difference with sharpened ratio of your choice. Getting Started with OpenCV # import libraries import cv2 import numpy as np import matplotlib....

March 1, 2023 路 3 min 路 Haeyoon