Tuesday, June 28, 2011

Activity 3 - Image Types and Formats

Hello. Good day. I am a bit lazy these days. I don't know why but I am really lazy and I can't create a blog without these things that is coming out of my fingers as it pushed the keyboard this 23 June 2011. So here is my blog.

We have been asked to look for examples of image types, basic and advanced file types. It's a bit difficult in looking for these files because only truecolor or RGB are seen in the web. I just convert everything to have examples of each type. Below are the examples:

--------------------------------------------------------------------------------------------------------------

Fig. 1. Example of a Binary Image
The image at the left is an example of a BINARY image. I have seen this over the internet. As you can see below, the color type of this image is grayscale because in scilab 5.3.2, imfinfo only returns the strings 'true color' or 'grayscale' but the image is really a BINARY image. Below is the info of the file:
  • Filename: 'C:\Users\MP\Documents\Dropbox\Files\186\A3 - binary.jpg'
  • FileModDate: '23-Jun-2011 10:18:24'
  • FileSize: 15517
  • Format: 'jpg'
  • FormatVersion: ''
  • Width: 400
  • Height: 333
  • BitDepth: 8
  • ColorType: 'grayscale'
  • FormatSignature: ''
  • NumberOfSamples: 1
  • CodingMethod: 'Huffman'
  • CodingProcess: 'Sequential'
  • Comment: {}
---------------------------------------------------------------------------------------------------------------

Fig. 2. Example of a Grayscale image

To the right is an example of a GRAYSCALE image. Below is its file info:
  • FileModDate: '23-Jun-2011 10:21:47'
  • FileSize: 66496
  • Format: 'jpg'
  • FormatVersion: ''
  • Width: 400
  • Height: 329
  • BitDepth: 8
  • ColorType: 'grayscale'
  • FormatSignature: ''
  • NumberOfSamples: 1
  • CodingMethod: 'Huffman'
  • CodingProcess: 'Sequential'
  • Comment: {}
---------------------------------------------------------------------------------------------------------------
Fig. 3. Example of a True Color image

The image to the right is an example of a TRUE COLOR image. Below is the info of this image.
  • Filename: 'C:\Users\MP\Documents\Dropbox\Files\186\A3 - truecolor.png'
  • FileModDate: '21-Jun-2011 11:53:18'
  • FileSize: 86245
  • Format: 'jpg'
  • FormatVersion: ''
  • Width: 300
  • Height: 300
  • BitDepth: 24
  • ColorType: 'truecolor'
  • FormatSignature: ''
  • NumberOfSamples: 3
  • CodingMethod: 'Huffman'
  • CodingProcess: 'Sequential'
  • Comment: {[1x58 char]}
--------------------------------------------------------------------------------------------------------------
    Fig. 4. Example of an indexed image
    To the right is my example of an Indexed image. I don't know how I can show to you that this is an indexed image since SIVP cannot give an indexed image color type. I have converted this one from RGB to INDexed image. Below is the file info:
    • Filename: 'C:\Users\MP\Documents\Dropbox\Files\186\A3 - indexed.jpg'
    • FileModDate: '23-Jun-2011 10:39:41
    • FileSize: 27774
    • Format: 'jpg'
    • FormatVersion: ''
    • Width: 400
    • Height: 300
    • BitDepth: 24
    • ColorType: 'truecolor'
    • FormatSignature: ''
    • NumberOfSamples: 3
    • CodingMethod: 'Huffman'
    • CodingProcess: 'Sequential'
    • Comment: {}
    ------------------------------------------------------------------------------------
    Fig. 5. Example of HDR image
    The image to the right is an example of HDR image. Below is its info:
    •  Filename: 'C:\Users\MP\Documents\Dropbox\Files\186\A3 - HDR.jpg'
    • FileModDate: '23-Jun-2011 11:31:41
    • FileSize: 53871
    • Format: 'jpg'
    • FormatVersion: ''
    • Width: 450
    • Height: 301
    • BitDepth: 24
    • ColorType: 'truecolor'
    • FormatSignature: ''
    • NumberOfSamples: 3
    • CodingMethod: 'Huffman'
    • CodingProcess: 'Progressive'
    • Comment: {}
    ---------------------------------------------------------------------------------------------------------------
    Fig. 6. Example of a Hyperspectral Image
    Next is the HYPERSPECTRAL file type. Below is the file:
    • Filename: 'C:\Users\MP\Documents\Dropbox\Files\186\A3 - Hyperspectral.jpg'
    • FileModDate: '23-Jun-2011 11:32:43'
    • FileSize: 28509
    • Format: 'jpg'
    • FormatVersion: ''
    • Width: 370
    • Height: 329
    • BitDepth: 24
    • ColorType: 'truecolor'
    • FormatSignature: ''
    • NumberOfSamples: 3
    • CodingMethod: 'Huffman'
    • CodingProcess: 'Sequential'
    • Comment: {}
    --------------------------------------------------------------------------------------------------------------
    Fig. 7. Example of a 3D image
    To the right is a 3D image file. Below is its file info:
    • Filename: 'C:\Users\MP\Documents\Dropbox\Files\186\A3 - 3D.jpg'
    • FileModDate: '23-Jun-2011 11:36:47'
    • FileSize: 2187543
    • Format: 'jpg'
    • FormatVersion: ''
    • Width: 1653
    • Height: 1050
    • BitDepth: 24
    • ColorType: 'truecolor'
    • FormatSignature: ''
    • NumberOfSamples: 3
    • CodingMethod: 'Huffman'
    • CodingProcess: 'Sequential'
    • Comment: {}
    • Orientation: 1
    • XResolution: 72
    • YResolution: 72
    • ResolutionUnit: 'Inch'
    • Software: 'Adobe Photoshop CS2 Windows '
    • DateTime: '2006:01:17 12:15:10 '
    • DigitalCamera: [1x1 struct]
    ---------------------------------------------------------------------------------------------------------------
    Here is an example of a video file. Below is its file info:
    • Filename: 'C:\Users\MP\Documents\Dropbox\Files\186\A3 - clock.avi'
    •  FileModDate: 'Saturday, June 18, 2011, 11:15:27 AM'
    • FileSize: '82944'
    • Format: 'avi'
    • Video
      • Length: 00:00:12
      • Frame width: 321
      • Frame height: 321
      • Data rate: 48 kbps
      • Total bit rate: 56 kbps
      • Frame rate: 1 frame/second
    • Audio
      • Bit rate: 8 kbps
      • Channel: 1(mono)
      • Audio sample rate: 8 kHz
    ---------------------------------------------------------------------------------------------------------------
    Fig. 8. Size of the scanned image
    As you can see to the right, based on the size of the scanned image from Activity 1, the scanned image is a true color image.
    ---------------------------------------------------------------------------------------------------------------
    Fig. 9. Histogram of the grayscaled scanned image

    The image above is the histogram of my scanned image from Activity 1. As I observed it, the minimum threshold for this image is around 0.3. I, then converted the grayscale image into black and white and used the threshold I have observe. Below is the image of the black and white image using the threshold.
    Fig. 10. Black and white Image using threshold = 0.3
    The image above has change clearly compared to its original image as seen in this blog, http://see-through-things.weebly.com/1/post/2011/06/activity-1.html The mostly gray part on the background was clearly removed and thus, clearly differentiate the lines and the background.
    ---------------------------------------------------------------------------------------------------------------
    Image File Formats
    • JPEG/JPG 
      •  JPEG is an acronym for Joint Photographic Experts Group which created the standard with the approval of ISO in 1992, 1994, 1996, 1998 and underdevelopment since 2009. Its typical usage is in photographs and realistic scenery. This type uses lossy compression but it has an option of lossless compression
    source: http://en.wikipedia.org/wiki/JPEG
      • BMP
        •  BMP stands for Bitmap Image File or simply Bitmap is a Raster graphics image file format that stores bitmap image files independent from the storing device. My source quote one paragraph from Microsoft  support:
      "A device-independent bitmap (DIB) is a format used to define device-independent bitmaps in various color resolutions. The main purpose of DIBs is to allow bitmaps to be moved from one device to another (hence, the device-independent part of the name). A DIB is an external format, in contrast to a device-dependent bitmap, which appears in the system as a bitmap object (created by an application...). A DIB is normally transported in metafiles (usually using the StretchDIBits() function), BMP files, and the Clipboard (CF_DIB data format)."

      for more info: http://en.wikipedia.org/wiki/BMP_file_format
      • PNG
        • PNG means Portable Network Graphics which is also a bitmap image format and video codec that utilizes lossless compression. This supports palette - based images, grayscale images and RGB images. It starts with an 8 - byte signature header followed by a "chunk" of files. After these files, there goes the color depth and transparency of image. After these, there is compression and filtering of the image. This offers an interlacing algorithm called Adam7 algorithm. PNG does not support animation but its file extension, MNG does.
      source: http://en.wikipedia.org/wiki/Portable_Network_Graphics
      • TIF/TIFF
        • This is the last type that I will discuss. TIFF stands for Tagged Image File Format which stores image and mainly popular to professional photographers. They say that this file type is a flexible, adaptable file type. This file type does not have any provision in compression and no restrictions. It was defined by ISO in 1993.
      source:http://en.wikipedia.org/wiki/TIF
      ---------------------------------------------------------------------------------------------------------------
        You may be thinking why I placed this part in here. It is just because I am just lazy to place this part in the middle of the blog. I am tired in doing this because histplot does not work in Scilab 5.3.2. I don't know why, it just didn't work. If it worked, I must be finished last thursday, but no. I had to run it in the computer of James Pang that uses Scilab 4.x.x. I thought I can finish it by that time and this coming Tuesday is the Activity 4. Hayyy. Oh well. That's life. And this is my blog. Thank you for having the time to read this.

        Oh I forgot something. I will rate myself  with 11 overall. Both Technical and Presentation Qualities are 5 each and 1 for the initiative because I have used SIVP in showing the other images and have incorporated my previous activity blog as a comparison to one of the figures above. :)

        Edited at 11:18 AM, 28 June 2011.
        I have found the command for histplot in Scilab 5.3.2. Here is the link. http://app186.blogspot.com/2011/06/histplot-in-scilab-532-using-sivp.html

        No comments:

        Post a Comment