Hey there!

My outlet to all things related to physics. Enjoy!

Tuesday, June 28, 2011

Leap to the Next Level

Image Types and Formats.

For the past two meetings of our Applied Physics 186 class, we have been learning and dealing with different image types and formats. Here are some examples and descriptions of the different things we've learned.

Four Basic Types of Digitized Images

1. Binary Images

Simply put, binary images are black or white images. 

Binary Image. This image was derived from a Truecolor Image.
Source: http://evermaxmedia.com/uncategorized/piano-keys-gallery-picture 

FileSize: 246612      
Format: JPEG           
Width: 2304         
Height: 1728           
Depth: 8     
StorageType: indexed  
NumberOfColors: 256  
ResolutionUnit: inch     
XResolution: 72.000000     
YResolution: 72.000000   

For each image type, I got the image properties. Here I find something really weird. You see, the image above is derived from a truecolor image. I converted it into a binary image using Scilab. However, Scilab classified it to be an indexed image which is really anomalous.

2. Grayscale Images

On the other hand, a grayscale image, simply described, is a black and white image.  

Grayscale Image. This was derived from a Truecolor Image.
Source:  http://violetposy.wordpress.com/2008/09/04/fall-nesting-part-3-candle-making/
   FileSize: 7728
         Format: JPEG
          Width: 500
         Height: 321
          Depth: 8
    StorageType: indexed
 NumberOfColors: 256
 ResolutionUnit: inch
    XResolution: 72.000000
    YResolution: 72.000000 

Again, we see the anomaly found in the first image.
  

3. Truecolor Images

For truecolor images, it becomes more complicated than just black and white. Here we have 3 bands (or channels). These bands are the intensity of a specific color (red, green, or blue). From these bands we get our image.

Truecolor Image
Source:  http://www.kraftrecipes.com/recipes/our-best-cheesecake-54757.aspx
    FileSize: 27763
         Format: JPEG
          Width: 307
         Height: 204
          Depth: 8
    StorageType: truecolor
 NumberOfColors: 0
 ResolutionUnit: centimeter
    XResolution: 100.000000
    YResolution: 100.000000

4. Indexed Images


We can describe indexed images as images represented by numbers. These numbers are the indexes of the different colors in the color wheel.

Indexed Image.
Source: here

 FileSize: 11855
 Format: JPEG
 Width: 240
 Height: 240
 Depth: 8
  StorageType: indexed
 NumberOfColors: 256
 ResolutionUnit: inch
 XResolution: 72.000000
 YResolution: 72.000000  

Four Advanced Image Types

1. High Dynamic Range (HDR) Images

In an HDR image, sceneries/situations/events (or all three) that cannot be appreciated when using an 8-bit grayscale recording are documented. An HDR image is shown below.

High Dynamic Range Image
Source:  http://www.smashingmagazine.com/2008/03/10/35-fantastic-hdr-pictures/

2. Multi or Hyperspectral Images

In comparison to a truecolor image, a multi or hyperspectral image has more bands.

Hyperspectral Image
Source: http://www.onera.fr/photos-en/mesexp/hyperspectral-imaging.php

3. 3 D Images

These are images where spatial information in  3D are recorded. Below it the 3D image of the sun.

3D Image
Source: http://www.nasa.gov/mission_pages/stereo/news/stereo3D_press.html

4. Temporal Images or Videos

We pretty much know what videos are. But, if you come to think of it, videos were hard to access during the old days. If we put someone from the past here in the present with the kinds of technology we have it would have been, a mind-boggling-jaw-dropping-who-are-those-people-in-the-box moment for him or her. Anyways, I have a video that you might like. Click the link.


Other than image types, this week we learned about image file formats. Here are the formats we've learned and some information about them:

1. JPEG (Joint Photographic Experts Group)
The method used for image compression in a JPEG file is lossy. This means that, as the name implies, information will be lost about the image.

2. TIF (Tagged Image File)
In my opinion, TIF files are more "flexible" than JPEG files in a sense, this is because it can incorporate both lossy and lossless image compression.

3. PNG (Portable Network Graphics)
On the other hand, a PNG file only employs lossless compression. One fun fact about this image file type is that it was created to replace GIF which we will tackle in a bit.

4. BMP (Bitmap)
Here, data compression is optional.

5. GIF (Graphics Interchange Format)
GIF file types employ a lossless data compression.


Of course the activity wouldn't be complete if we weren't assigned exercises on Scilab. What we had to do was relatively easy and could be done with just a few lines of code. First off, we had to "convert" the Truecolor image that we used as an example into a binary and grayscale image. The results are shown below:

Truecolor Image
Grayscale Image

Binary Image

                                                                
Also, we reused the scanned plot that we used in our first activity. The goal is to,basically, separate the background from the lines.
Original Image
  
Grayscale Image

Binary Image

From the looks of it, I think I am successful in executing the task.

Histogram for the Grayscale Image

Finally, having all these things said, I think I'd give myself an 8 out of 10 primarily because I don't think I was able to fully explain some things. With that, I end my report.

Special thanks goes to Jen-Jen Manuel, Daniel Vasquez and Wikipedia

God bless!




No comments:

Post a Comment