0% found this document useful (0 votes)
121 views

Image Formats and Color Models: Multimedia Basics and Representation

1) The document discusses various image formats and color models including 1-bit images, 8-bit grayscale images, and 24-bit color images. 2) 1-bit images use single bits to represent black and white pixels while 8-bit grayscale images use a byte to represent 256 shades of gray. 3) 24-bit color images use three bytes for each pixel to represent over 16 million colors through combinations of red, green, and blue values.

Uploaded by

Habtamu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
121 views

Image Formats and Color Models: Multimedia Basics and Representation

1) The document discusses various image formats and color models including 1-bit images, 8-bit grayscale images, and 24-bit color images. 2) 1-bit images use single bits to represent black and white pixels while 8-bit grayscale images use a byte to represent 256 shades of gray. 3) 24-bit color images use three bytes for each pixel to represent over 16 million colors through combinations of red, green, and blue values.

Uploaded by

Habtamu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

11-Jan-20

Wollo University Outline


Kombolcha Institute of Technology
College of Informatics 2.1 Image formats and Image color models
Department of Information System 2.3. Video formats and Video color models
2.4. Audio formats and MIDI
Multimedia Information Systems
Chapter 2
Multimedia Basics and Representation

Instructor: Habtamu Abate (M.Sc.)


Email: [email protected]

1 2

Graphics
Image formats and color
 Format: constructed by the composition of primitive
models objects such as lines, polygons, circles, curves and arcs.
 Input: Graphics are usually generated by a graphics
editor program (e.g. Illustrator) or automatically by a
program (e.g.Postscript).
 Graphics are usually editable or revisable (unlike
Images).
 Graphics / image data types
 Graphics input devices: keyboard (for text and cursor
 Popular image file formats control),mouse, trackball or graphics tablet.
 Graphics standards : OpenGL, PHIGS, GKS
 Image Color models
 Do not take up a very high storage overhead.

3 4

1
11-Jan-20

Images Graphics/Image Data Types


 The number of file formats used in multi
 Images are Still pictures which (uncompressed) are media continues to proliferate.
represented as a bitmap (a grid of pixels).
 Input: digitally scanned photographs/pictures or Table 2.1: List of some File Formats used in Macromedia Director

direct from a digital camera.


 Input: May also be generated by programs “similar”
to graphics or animation programs.
 Stored at 1 bit per pixel (Black and White), 8 Bits
per pixel (Grey Scale, Color Map) or 24 Bits per pixel
(True Color)
 Size: a 512x512 Grey scale image takes up 1/4 MB, a
512x512 24 bit image takes 3/4 MB with no
compression. 5 6

1-Bit Images Monochrome 1-bit Lena image


 Images consist of pixels (picture elements in digital images).  A 640×480 monochrome image requires 38.4 kB of storage.
 A 1-bit image (also called binary image) consists of on and off
bits only and thus is the simplest type of image.
 Each pixel is stored as a single bit (0 or 1)
 It is also sometimes called a 1-bit monochrome (called L
ena image by scientists) image since it contains no color.
See Figure in next slide.
 Monochrome
 1-bit images can be satisfactory for pictures containing
only simple graphics and text.
 fax machines use 1-bit data, so in fact 1-bit images are
still important.

7 8

2
11-Jan-20

8-Bit Gray-Level Images Grayscale image of Lena


 640×480 gray scale image requires 300kB of storage.
• 8-bit image is one for which each pixel has a
gray value between 0 and 255.
• Each pixel is represented by a single byte.
• The entire image can be thought of as a two-
dimensional array of pixel values referred to
as a bitmap.
• Image resolution refers to the number of pix
els in a digital image (higher resolution always
yields better quality but increases size).

9 10

24-Bit Color Images 24-bit color image forestfire.bmp


 In a color 24-bit image, each pixel is represented by
 Microsoft Windows BMP format
three bytes, usually representing RGB.

 Since each value is in the range 0–255, this format suppo


rts 256×256×256, or a total of 16,777,216, possible
combined colors; which increases storage size.

 a 640 × 480 24-bit color image would require 921.6 kB of


storage. (without any compression applied)

 Compression is used to decrease the image size by simply


grouping pixels effectively. (chapter 3).

11 12

3
11-Jan-20

Higher Bit-Depth Images 8-Bit Color Images


 reasonably accurate color images can be obtained by
In some fields such as medicine (security cameras, satelli quantizing the color information to collapse it.
te imaging) more accurate images are required to see the  Color quantizing example: reducing the number of col
patient’s liver, for example. ors required to represent a digital image makes it po
ssible to reduce its file size.
To get such images, special cameras that view more than j  8-bit color image (so-called 256 colors. Why?) files u
ust 3 colors (RGB) are used. se the concept of a lookup table (LUT) to store color
information.
Such images are called multispectral (more than three col  For example,:
ors) or hyperspectral (224 colors for satellite imaging).  if exactly 23 pixels have RGB values (45, 200, 91)
 then store the value 23 in a three-dimensional array, at the
element indexed by the index values [45, 200, 91].
 This data structure is called a color histogram.
 color histogram: is a very useful tool for image trans
13 formation and manipulation in Image Processing. 14

Notice that the difference between Fig. 2.4, the 24-bit image, and Fig. 2.5 Another example for difference between Fig. 2.6, the 24-bit image, and Fig.
, the 8-bit image, is reasonably small. 2.7, the 8-bit image, is reasonably small.

Fig. 2.4, the 24-bit image Fig. 2.6, the 24-bit image

Fig. 2.5, the 8-bit image Fig. 2.7, the 8-bit image

15 16

4
11-Jan-20

8-Bit Color Images Color Lookup Tables


 Note the great savings in space for 8-bit images over  The LUT is often called a palette.
24-bit ones:  The idea is to store only the index, or code value, for each
 a 640 × 480 8-bit color image requires only 300 kB of pixel.
storage,  if a pixel stores, say, the value 25 (Figure 2.8), the meaning
is to go to row 25 in a color lookup table (LUT).
 compared to 921.6 kB for a color image (again, without
any compression applied).

17 18

Color Lookup Tables (Cont..) - Fig. 2.9 displays the concept of a color-picker: if the
user selects the color block with index value 2, then
•A Color-picker consists of an array of fairly large blocks
the color meant is cyan, with RGB values (0, 255, 255).
of color (or a semi-continuous range of colors) such that a
mouse-click will select the color indicated.
- In reality, a color-picker displays the palette colors
associated with index values from 0 to 255.

Fig. 2.9: Color-picker for 8-bit color: each block of the


color-picker corresponds to one row of the color LUT
19 20

5
11-Jan-20

Popular File Formats GIF (Graphics Interchange Format)


 GIF standard:
• 8-bit GIF : one of the most important formats because of its hi  Limited to 8-bit (256) color images only, which, while pro
storical connection to the WWW and HTML markup language ducing acceptable color images, is best suited for images
as the first image type recognized by net browsers. with few distinctive colors (e.g., graphics or drawing).
 GIF standard supports interlacing — successive display o
• JPEG: currently the most important common file format. f pixels in widely-spaced rows by a 4-pass display proces
s.
 interlacing allows a quick sketch to appear when a web br
owser displays the image, followed by more detailed fill-i
ns.
 The JPEG standard (below) has a similar display mode, de
noted progressive mode.
 GIF has two formats GIF87 (standard) and GIF89 suppo
rts simple animation.

21 22

GIF (Graphics Interchange Format) GIF87


 For the standard specification, the gener
al file format of a GIF87 file is as in Fig.
2.12.
 The Signature is six bytes
 the Screen Descriptor is a seven-byte
 Local Color Map (if does not exist A global
color map can be defined)
 A GIF87 file can contain more than one i
mage definition, usually to fit on several d
ifferent parts of the screen.
 actual raster data itself is first compress
ed using the LZW compression scheme( C
hapter 3)

Fig. 2.12: GIF file format.


23 24

6
11-Jan-20

GIF87 (Cont.…) GIF87 (Cont.…)


 Screen Descriptor comprises a set of attributes that belong to eve  Color Map is set up in a very simple fashion as in Fig. 2.14. However
ry image in the file. , the actual length of the table equals 2(pixel+1) as given in the Screen
 According to the GIF87 standard, it is defined as in Fig. 2.13. Descriptor. Fig. 2.14: GIF color map.
 LSB/ MSB : Least/Most Significant Byte

 Bit 7 is filled with zeros

Fig. 2.13: GIF screen


descriptor.

25 26

GIF87 (Cont.…) Interlace


 Each image in the file has its own Image Descriptor,
defined as in Fig. 2.15.  If the interlace bit is set to (1), then the local
Image Descriptor, the rows of the image are di
splayed in a four-pass sequence, as in Fig. 2.16.
(next slide)
 Here, the first pass displays rows 0 and 8, the
second pass displays rows 4 and 12, and so on.

Fig. 2.15: GIF image descriptor. 27 28

7
11-Jan-20

interlace Fig. 2.16: GIF 4-pass interlace display row order. JPEG
 JPEG (Joint Photographic Experts Group): The most important cu
rrent standard for image compression (.jpg, .jpeg, .jpe).

 The human vision system has some specific limitations (The eye–br
ain system cannot see extremely fine detail; those are dropped ) an
d JPEG takes advantage of these to achieve high rates of compres
sion.

 JPEG allows the user to set a desired level of quality, or compressi


on ratio (input divided by output).

 As an example, Fig. 2.17 shows our forestfire image, with a quality


factor Q=10%.
 - This image is a mere 1.5% of the original size. In comparison, a
JPEG image with Q=75% yields an image size 5.6% of the origin
al, whereas a GIF version of this image compresses down to 23.
0% of uncompressed image size.
29 30

PNG
 PNG format: standing for Portable Network Graphics
— meant to supersede the GIF standard, and extends it
in important ways.
 Special features of PNG files include:
1. Support for up to 48 bits of color information — a larg
e increase.
2. Files may contain gamma-correction information for cor
rect display of color images, as well as alpha-channel inf
ormation for such uses as control of transparency.
3. The display progressively displays pixels in a 2-dimensio
nal fashion by showing a few pixels at a time over seven
Fig. 2.17: JPEG image with low quality specified by user.
passes through each 8 X 8 block of an image.

31 32

8
11-Jan-20

TIFF PS and PDF


 TIFF: stands for Tagged Image File Format.  PostScript is an important language for typesetting, and
many high-end printers have a PostScript interpreter b
uilt into them.
 The support for attachment of additional information (r
eferred to as “tags”) provides a great deal of flexibility.
1. The most important tag is a format signifier:  PostScript is a vector-based, rather than pixel based, pi
cture language:
 what type of compression etc. is in use in the stored image.
 page elements are essentially defined in terms of ve
2. TIFF can store many different types of image:
ctors.
 1-bit, gray scale, 8-bit color, 24-bit RGB, etc.
3. TIFF was originally a lossless format but now a new JPE  PostScript includes vector/structured graphics as well
G tag allows one to opt for JPEG compression. as text
4. The TIFF format was developed by the Aldus Corporati
on in the 1980's and was later supported by Microsoft.  Several popular graphics programs, such as Adobe Illust
rator, use PostScript.
33 34

PS and PDF Some Other JPEG Formats


 Note, however, that the PostScript page description lan Microsoft Windows: WMF:
guage does not provide compression; in fact, PostScript  The native vector file format for the Microsoft Windo
files are just stored as ASCII. ws operating environment:
1. Consist of a collection of GDI (Graphics Device Interf
 Therefore, another text + figures language has largely
superseded PostScript is Portable Document Format (PD ace) function calls, also native to the Windows environ
F) file format. ment.

2. When a WMF file is \played" (typically using the Wind


 PDF files that do not include images have about the sam
e compression ratio, while ows PlayMetaFile() function) the described graphics is
rendered.
 For files containing images, PDF may achieve higher com
pression ratios by using separate JPEG compression for 3. WMF files are ostensibly device-independent and are u
the image content 35 nlimited in size. 36

9
11-Jan-20

Some Other JPEG Formats Image processing With MATLAB


 The major system standard graphics file format for M
icrosoft Windows, used in Microsoft Paint and other pr  MATLAB can import/export  Data types in MATLAB
ograms. several image formats:
 Double (64-bit double-precision
 Many sub-variants within the BMP standard.  BMP (Microsoft Windows Bitmap) floating point)
 GIF (Graphics Interchange Files) Single (32-bit single-precision
Macintosh: PAINT and PICT: 
 HDF (Hierarchical Data Format) floating point)
1. PAINT was originally used in the MacPaint program, in  JPEG (Joint Photographic Experts  Int32 (32-bit signed integer)
itially only for 1-bit monochrome images. Group)  Int16 (16-bit signed integer)
2. PICT format is used in MacDraw (a vector-based dra  PCX (Paintbrush)  Int8 (8-bit signed integer)
wing program) for storing structured graphics.  PNG (Portable Network Graphics)  Uint32 (32-bit unsigned integer)
X-windows: PPM:  TIFF (Tagged Image File Format)  Uint16 (16-bit unsigned integer)
 XWD (X Window Dump) Uint8 (8-bit unsigned integer)
 The graphics format for the X Window system. 

 raw-data and other types of


 PPM supports 24-bit color bitmaps, and can be manipul image data
ated using many public domain graphic editors, e.g., xv.
37

Image Processing with MATLAB


Image Processing with MATLAB
 Image Representation  Co-ordinate Manipulation
 Image Format
 Transform
 Image Loading and Displaying and Saving
 Interpolation
 Image Information

 Quantization  Region Processing


 Point Processing  High Pass - Edge Detection
Value Manipulation  Smoothing
 Pixel Scaling
 Morphology
 Histogram

 Histogram Equalisation
 Image Processing
 Thresholding  Image DCT/IDCT
 Colour Transforms  Convolution

10
11-Jan-20

Important Dates
 Mid Exam : (15-25 %)
 29 / 03 / 2012 E.C
 Lab Assignment submission: (10-15%)
 10 / 04 /2012 E.C

11

You might also like