Wednesday, June 27, 2012

Image Types and Formats

Pictures. Images. 

They tell you a story, be it sad, happy or enigmatic. But do you know what comprises a picture?

I haven't really thought about such things. I only see what my eyes see. I haven't really thought about the different image types or formats. I don't care if it's .jpg, .png or .bmp. As long as the image is saved, I'm done.

But I am thankful for a lecture on image types and formats. My knowledge on images now has depth. (haha!)

Well, you see, it's always fun to learn new things especially when they involve the things you see everyday. For me, the best way to test if you have really learned is to share it to other people and see if you can explain it to them with ease.

So, here I go. I' ll test how much I've learned.. Keep reading..

The types of images are divided into two. You have the basic and the advanced types. To better understand the types of images, I have attached pictures for you to see. :)

BASIC TYPES

1. Binary Type

An example of a Binary Image from photo.tutsplus.com

To get the some information about the image, you can just right click on the picture and select Properties. On the properties tab, click Details and there you'll see the image information. Here's a sample.

Image Properties for a Windows User

You can also get the image information using Scilab by typing imfinfo ('techo.jpg') to display their properties. A warning though, make sure the image you are trying to get the info from is in the current directory of Scilab console. If not, it might not open. Here's what I got when I used Scilab to display the properties.

Image Properties displayed using Scilab

2. Greyscale Image


Example of a Greyscale Image taken from 30 Stunning Examples
of Greyscale Photography at demortalz.com


3. Truecolor Images


One of my images during my parents' 21st anniversary




4. Indexed Image


The image of a parrot 
The palette of the image above

Photo courtesy of http://en.wikipedia.org/wiki/Indexed_color



ADVANCED IMAGE TYPE

1. High Dynamic Range (HDR) Image

One stormy day in the city - an HDR image
The image is taken from http://zowienews.com/2011/04/12/hdr-imagery-taking-the-country-by-storm

2. Multi or Hyperspectral Image

Satellite view of the world at night 
The image is taken from http://salz.soup.io/tag/World

3. 3D Image

MRI scan of a human head
Image taken from mesotheliomasymptoms.com

4. Temporal images or videos








CONVERSION OF IMAGES

To convert the images from truecolor to grayscale, here is the Scilab code I used.

Code for Image conversion


Result of the Image conversion



USING THE HISTOGRAM

To get the histogram of the the scanned image in Activity 1, I used the following code.

Code for getting the histogram of the image

Histogram of the Grayscaled Image

Histogram of the Image with a bin width of 0.5

Since a threshold of 0.8 looks safe enough, here is the result.

On the left is the original image and on the right is the black and white image with a threshold of 0.8
Using the information obtained from the histogram, I was able to obtain the best threshold that would make the image look clearer than the original one as shown in the image above.


IMAGE FORMATS


1.  JPEG (Joint Photographic Expert Group)
           Image compression using JPEG can either be lossy (some information were lost) and lossless (all the information is preserved). The degree of compression can actually be adjusted depending on the file size that one wants. However, a smaller file size could mean an image with less quality.

2. BMP 
        The format is also know at bitmap image file. It can store 2D digital images.

3. GIF (Graphics Interchange format)
        This format is common in animations. It actually supports up to 8 bits per pixel. 

4. PNG (Portable Network Graphics)
        This format supports a lossless compression. This means that no information regarding the image is lost. However, since nothing is lost, the image file size could be quite big. This format only supports RGB color space.

5. TIFF (Tagged Image File Format)
       This format is good for storing images.

The source for the image formats is the Wikipedia. :)


Oh no! I'm afraid I'm running out of time. I think I just deserve an 8 for this since I was not able to fully explain the image formats. :( I made a huge mistake in this activity. Rather, I wasted my time processing images that were not needed for the activity and missed the ones that are really needed. 

I will really make sure I'll do better in the next activity. :)


No comments:

Post a Comment