Friday, June 25, 2010

A3 - Image Types and Formats


In this activity, I learned about image types and image formats.

There are four basic types of images:


1. Binary images: images that are comprised of pixels which is either black or white (either have the value 0 or 1).


example:


2. Grayscale images: black and white images where the pixel may have the value of 0 (black), 255 (white) and everything in between (gray).


example:



3. Trucolor images: comprised of three channels or bands: green, blue and red channels. Each pixel may have a value of 0-256 for each band depending on the intensity of the color.


example:

FileSize: 1852690

Format: JPEG

Width: 2592

Height: 1944

Depth: 8

StorageType: truecolor

NumberOfColors: 0

ResolutionUnit: inch

XResolution: 72.000000


4. Indexed images: are colored images in which the colors are being represented by numbers. These numbers denote the color index in a color map.


example:

FileSize: 19077

Format: GIF

Width: 491

Height: 338

Depth: 8

StorageType: indexed

NumberOfColors: 256

ResolutionUnit: centimeter

XResolution: 72.000000

YResolution: 72.000000


There are two categories of image formats -lossy and lossless. As the name implies, lossy formats loss information about the image during compression. Saving in a lossless image format, on the otherhand, enables storage of all information about the image.


Differences between the image formats:


* GIF - Graphics Interchange Format (.gif):

- lossless LZW compression

- can be saved with a max of 256 colours


example:

source:
sohowww.estec.esa.nl/.../eit_171_981013.gif


* PNG - Portable Network Graphics (.png):

- created as free, open-source successor of GIF

- lossless ZIP compression

- portable

- can be saved with a max of 256 colours

- often used for editing pictures


example:

FileSize: 463182

Format: PNG

Width: 502

Height: 376

Depth: 8

StorageType: truecolor

NumberOfColors: 0

ResolutionUnit: centimeter

XResolution: 37.790000

YResolution: 37.790000

source: Jonats


* JPEG - Joint Photographic Experts Group (.jpg):

- lossy compression because it doesn’t include certain details about the image

- files saved in this format are small; therefore

- used in almost all digicams to save images


example:
source:
elmore.cc/images/Apr04/Small/tn_PICT1711_TIF.jpg

sources for format descriptions:

http://www.scantips.com/basics09.html

http://en.wikipedia.org/wiki/Image_file_formats




In procedure no.5, a truecolor image (shown below)is converted into 1) binary image and 2) grayscale image

original:



Binary:


Grayscale:

In procedure no.6 and 7, the graph used in Activity 1 is converted into a grayscale image then its gray level histogram is determined using the function histplot in scilab.


Scanned Image:



Histogram for the scanned image:

As shown in the histogram, the best threshold value, in order to separate the blacks and whites, is determined to be approximately equal to 0.95. Using this value, the grayscale image is converted to binary image. The resulting image is shown below:


Image after applying threshold:


The result is a more resolved image of the original graph.

Problem(s) encountered:


1) I have just realized that ~90% of the images in my laptop are JPEG images :(

2) blogging is hard...really hard.

Arigato guzaimasu to Jonats for helping me with this activity. :)

I would like to give myself a grade of 10 for this activity.




No comments:

Post a Comment