# Image Stitching

Sorry for not give any update on this blog. Yeah, I am still busy with courses, homework and project and also exams. Let’s discuss about Image Stitching. This is very common Computer Vision Project, which is my CV homework too. But, it is okay to keep discuss about it because the popularity has risen recently. Especially after it is implemented in most smartphones.

## What is Image Stitching?

Image Stitching is the process of combining multiple images with overlapping views to produce a wide-angle panorama. Although this combines many images into one, it combines two images at a time. For gives the clear definition I would like to give an example.

Suppose we are given 3 images

Building 1

Building 2

Building 3

those 3 images are look same, just a bit different. Yes, it indeed captures the same object. I am going to jump to the result. The result, roughly like the following

Result Building

# Histogram Equalization

Hi guys, after some time busy with my campus activities today I would like to update my blog. At the very recent article we have discussed about image histogram. One of the advantages is to create negative image. In this article I am going to discuss about the other advantages of image histogram. It has very popular in the image processing field. It is called Histogram Equalization.

What Histogram Equalization really is? Histogram equalization is a method that increases the contras of an image by increasing the dynamic range of intensity. This method works best for images that have less noise and do not contain regions of relative brightness or darkness. There are some term we have to know before understanding the algorithm. To ignite our motivation let’s take a look on that images below.

Original Car

Histogram Equalization Car

# Image Histogram

Image histogram is a type of histogram that represent the lightness distribution in digital image. In order to clarify the idea, I am going to give an example.

Suppose we have an image, say depth is 2 bits (2 bpp). Therefore, the possibility value 0 – 3.

As I mentioned, histogram is going to represent the distribution of pixel value. You can see, there are 5 pixels with value 0, 7 pixels with value 1, 9 pixels with value 2 and 4 pixels with value 3. These information is tabulated as follows.

As you know, like histogram in math, histogram is presented using graph. The following graph represent the distribution in image above.

# Nearest Neighbor Interpolation for Resize Image

If you are not a computer scientist maybe you will think that resize image is an easy task. Just scroll the mouse wheel and all done. But do you know the process behind just “scroll the mouse wheel” ? I am going to discuss the simplest way of Image Scaling(what most people know as resize image). The most simplest way is Nearest Neighbor Interpolation, of course there are some other sophisticated interpolation methods.

Before we discuss about the method, It’s better if you’ve already known about the basic properties of image. If you aren’t , you can imagine images as a matrix. Look the picture below

Image[{{0., 1., 0.}, {1., 0., 1.}, {0., 1., 0.}}]

Based on the picture above you can image if you have image with width=3 pixel and height=3 pixel so you have 3×3 matrix. If you have image 512×512 so you have matrix 512×512 (if your image pixel 8bpp or 1byte. I used 8bpp for example just for simple explanation).

Suppose we have 4×4 pixel image and we need to enlarge to be 8×8 pixel. We can imageine like this