Basic BMP Image Processing

This past month, Victor has worked on basic image processing techniques using the C programming language. This is because our team wanted to see if we could potentially implement image processing ideas into an embedded system without needing OpenCV or Raspberry Pi. Our team also wanted to see if we could improve on our image processing solution during our win at RoboCup Simulation Demonstration Competition. The main file format that he used was the BMP file format because of its easy to use format, along with the ease of manipulation. 

Here are just a few of the projects that Victor worked on:

 

Copying an image/reading a BMP image:

This project involved simply reading an image, and then writing the image back into another file using the same BMP format.

 

Grayscale transformation: 

There are two methods to do this, a weighted method where each R, G, and B value is weighted to a certain proportion, and the third method, which involves adding the R, G, B values and dividing by 3. The grayscale transformations that Victor did enables gives our team the ability to view specific colours more than others.

 

Binary Conversion:

Binary conversion involves reading each pixel, and determining if the pixel is above or below a threshold. Most commonly, this threshold is set at 127 since it is right in the middle between 0 and 255. The end result is a purely black or white image. 

 

Contrast Enhancement:

There are two ways to do contrast enhancement, through histogram equalization, and through adding each pixel by a set value. The former method would be called contrast enhancement, while the latter one could be called brightening/darken. The histogram equalization method is the most interesting, as it results in an image with better focus and contrast. 

 

Sharpening/Blurring/Edge Detection:

Sharpening, Blurring, and Edge Detection in an image takes into affect the image’s community. This community is determined through a pixel’s kernel, which can be used to compare values around one pixel.