Transcript Chapter 5

1
LECTURE 5:
DIGITAL IMAGE
TECHNOLOGY
EVI INDRIASARI MANSOR
Email: [email protected]
Tel ext: 1741
Outline
2





Representing Image
Reproducing Colour on Computer
Storing Image
Digitizing Image
Information Delivery
Learning Outcomes
3

Able to relate the various factors that apply to the use of
images in multimedia

Able to explain the capabilities and limitations of bitmap
and vector images
Representing Image
4


All digital images are represented digitally by pixels
An image is defined by image width, height and pixel
depth



Hence… e.g. 400 X 150 X 24-bits … and you get the image
size
The number of bits used per pixel in an image depends
on the colour space representation (grey or colour) and
is typically segregated into channels
Refer Lecture 2b (pg 4 - 17)
Representing Image (cont)
5


The total number of bits per pixel = the sum of the
number of bits used in each channel
 E.g. in grayscale image – the gray-level value is
encoded on 8 bits for each pixel (i.e. 256 choices)
 E.g. in colour images, each R, G, B channel may be
represented by 8 bits each, or 24 bits for a pixel (for
24-bit… 16,777,216 choices )
Sometimes uses fourth channel called the alpha channel
 Alpha channel represent an additional 8 bits –
bringing the total bit depth of each pixel to 32 bits
Representing Image (cont)
6



Very important role in multimedia products
 photograph-like bitmaps
 vector-based drawings
 3D renderings
Still images created depends on the display resolution,
and hardware and software capabilities.
Right tools and right hardware for image development
is important!
 e.g., graphic designers like to have large, highresolution monitors or multiple monitors
Actual correspondence with a multimedia director…
when asked about monitor size for development
7
Salam,
Kau tgk studio aku (yang selekeh macam director dia
jugak) standard 22inch - 24inch monitor. Modeler
memang request nak dua. Senang nak view and
work. Animator kalau ada dua best la. Satu pun OK.
Tapi aku punya Graphic Card sini biasa datang dah
ada dua tempat cucuk monitor tu. Tapi editing kalau,
satu monitor memang semak. Biasa editor pakai
dua. Timeline panjang. Lepas tu ada TV 30inch lagi.
Baru orang boleh preview.
8
9
10
http://upload.wikimedia.org/wikipedia/commons/thumb/f/f0/Vector_Video_Standards4.svg/749pxVector_Video_Standards4.svg.png
Representing Image (cont)
11

Elements of graphics
 To create a remarkable graphics, developer must
understand graphics and its elements:
 Lines
 Shapes
 Space
 Texture
 Colour
Representing Image (cont)
12

Lines
 A mark with length and directions
 Continuous mark made on some surface by a
moving point
 Types of line include: vertical, horizontal, diagonal,
straight or ruled, curved, bent, angular, etc
13
Representing Image (cont)
14

Shapes
 Enclosed space defined and determined by other
art elements such as line, color, value, and texture
 Can appear as 2 dimensional (2D) or 3 dimensional
(3D)
Representing Image (cont)
15

Space
 Refers to the distance or area between, around,
above, below, or within things
 Two-dimensional or three-dimensional; as flat,
shallow or as positive or negative space etc
Representing Image (cont)
16

Texture
 Surface quality or "feel" of an
smoothness, roughness, softness, etc
 Actual or Simulated
object,
its
Representing Image (cont)
17

Texture (cont)
 Actual textures - can be felt with fingers
 Simulated
textures - suggested by an artist in the
painting of different areas of a picture
Representing Image (cont)
18

Still images
 Two types:
 Bitmaps (or raster-based)
 Vector-drawn
Representing Image (cont)
19

Bitmaps
 Derived from the words bit
 Only two digits are used (on/off, black/white,
true/false)
Map – two-dimensional matrix of these bits
 Hence  BITMAP – data matrix describing the
individual dots of an image
 the smallest elements (pixels) of resolution on a
computer screen or printer

Representing Image (cont)
20

Bitmaps (cont)
Representing Image (cont)
21

Bitmaps (cont)
 Suited for creation of:
 Photo-realistic images (photographer)
 Complex drawings that require fine detail
 Known as paint graphics
 Can have varying bit and color depths
Representing Image (cont)
22

Bitmaps (cont)
 More bits
 provide more color depth
 more photo-realism
 Require more memory and processing power
Representing Image (cont)
23

Bitmaps (cont) – Bits per pixel
1 bit1 - Monochrome
8 bits – 256 colors
16 bits – 65K colors
24 bits per pixel allows millions of colors
(i.e. 224 = 16,777,216)
32 bits per pixel – trillions of colors
(i.e. 232 = 4,294,967,296)
Representing Image (cont)
24

Bitmaps (cont) – Bits per pixel
1 bit = 2 colors
8 bit = 256 colors
2 bits = 4 colors
4bits = 16 colors
24 bits = (16,777,216 colors, "True color")
Representing Image (cont)
25

Bitmaps (cont) – Pseudocolour palettes









1-bit – monochrome, often black and white, compact Macintoshes
2-bit – CGA, gray-scale early NeXTstation, color Macintoshes
3-bit – early home computers with TV displays
4-bit – used by EGA and by the least common denominator VGA
standard at higher resolution, color Macintoshes
5-bit – original Amiga chipset
6-bit – original Amiga chipset
8-bit – most early color Unix workstations, VGA at low resolution,
Super VGA, AGA, color Macintoshes
12-bit – some Silicon Graphics systems, Neo Geo, Color NeXTstation
systems, and Amiga systems in HAM mode
16-bit – some color Macintoshes
Representing Image (cont)
26

Bitmaps (cont) – Bitmaps usage

Bitmaps and their suitability of use: Native Microsoft bmp format as a raw image
 Faster to process (files can be colossal however…)
 JPEG (Joint Photographic Experts Group)
 photo sharing on the web because of its size and quality
 GIF
 used for diagrams, buttons, etc., that have a small number
of colors
 also suitable for simple animation because it supports
interlaced images
 PNG (Portable Network Graphics)
 equal to gif except that it didn‘t support the
animation format
Representing Image (cont)
27

Bitmaps (cont) – Memory cost of images



Large images consume large memory and make our
computers struggle.
Memory cost – computed from the image size
E.g.,
 6 x 4 inch image at 150 dpi (dots per inch)
 (6 inches × 150 dpi) × (4 inches × 150 dpi) = 900 ×
600 pixels
 900 × 600 pixels = 540,000 pixels
 The memory cost for this RGB color (3 bytes) image is:


900 × 600 × 3 = 1.6 million bytes
3 bytes of RGB color information per pixel for 24 bit
color (3 RGB values per pixel, one 8-bit byte for
each RGB value, which totals 24 bit color)
Representing Image (cont)
28

Bitmaps (cont) – Memory cost of images
Representing Image (cont)
29

Bitmaps (cont) – Scanning an image
30
• A bit about resolution…
• Consider an image  200 X 200 pixels 
• Consider these…
1. How big (physical dimension) will an image be if displayed
on 72 dpi monitor?
2. On a 300 dpi monitor?
Make use of this formula…
PHYSICAL DIMENSION = PIXEL DIMENSION / DEVICE RESOLUTION
Calculations
31
1.
•
•
•
72 dpi
From the previous formula…
200 / 72 = 2.78 inches (same for the height as well since it’s a square image)
This is about 6.95 cm²
2. The image is displayed on a monitor that is 300 dpi?
•
•
•
From the previous formula…
200 / 300 = 0.67 inches (same for the height as well since it’s a square image)
This is about cm² 1.68 cm²
 Pixel-wise… still 200 X 200
 The first monitor has less pixels compared to the second, so the
image appears bigger
That’s why this happens
32
Monitor Resolution 1024 X 768
Size = 600 pixels
That’s why this happens (cont)
33
Monitor Resolution
800 X 600
Size = 600 pixels
Calculating image size
34

Now let’s see how to calculate an image’s size and
convert between bytes, kilobytes, megabytes etc…

Say the SMURF house has a 500 X 400 pixel resolution

Say that each pixel is 24-bits (i.e. 24-bits per pixel
or 3-bytes per pixel)

Therefore, the size would be:
(500 X 400)-pixels X 24-bits/pixel = 4,800,000-bits
… which is equivalent to 4,800,000/8 = 600,000-bytes
… which is equivalent to 600,000/1,024 = 585.94-kilobytes (since 1KB = 1,024-bytes)
… which is equivalent to 585.94/1,024 = 0.572-megabytes
… which is equivalent to 0.572/1,024 = 0.00056-gigabytes
… and so on and so forth 
http://www.computerhope.com/issues/chspace.htm - for more info you can go here 
Representing Image (cont)
35

Vector-drawn
 created from geometric objects such as lines,
rectangles, ovals, polygons using mathematical
formulas
 Used in:
Computer-aided design (CAD) programs
 Graphic artists designing for the print media
 3-D animation programs
 Applications requiring drawing of graphic shapes

36
Representing Image (cont)
37

Vector-drawn
 A vector – a line that is described by the location of
its two endpoints
 Vector drawing – use of Cartesian co-ordinates
 Cartesian coordinates are numbers that describe a
point in two or three-dimensional space as the
intersection of X, Y, and Z axis
Y
Z
X
Representing Image (cont)
38

Vector-drawn (cont)

Example: RECT 0,0,200,300,RED,BLUE says




draw a rectangle starting at 0,0 (upper left corner of screen)
going 200 pixels horizontally right and 300 pixels downward
with a RED boundary and
filled with BLUE
200 pixel
300 pixel
Representing Image (cont)
39

Vector-drawn (another exmaple)

A Postscript page description language might have the
following:
0 1 0 setrgbcolor
0 0 128 128 rectfill
1 0 1 setrgbcolor
32 32 64 64 rectfill
Representing Image (cont)
40

Vector-drawn (cont)
 Vector images – use less memory space and have a
smaller file size as compared to bitmaps
 http://msauer.mvps.org/vector%20bitmap.htm
 For the Web
 pages that use vector graphics in
plug-ins download faster,
 when used for animation, draw
faster than bitmaps
Representing Image (cont)
41

Vector-drawn (cont)
 Not suitable for photorealistic images
 Require a plug-in for Web-based display
 Are scalable and resizable
 Bitmaps can be converted to vector images using
autotracing
A bitmap being scaled up
42
•
•
Vector graphics have the ability to preserve
its shape without losing image quality when
resized (scaled up)
Because vector images do not store
information about the image in pixels
values… instead described using the
mathematical formula that builds it 
A vector being scaled up
43
Reproducing Colour on Computer
44

Natural Light and Colour
 Light comes from an atom where an electron passes
from a higher to a lower energy level
 Each atom produces uniquely specific colors
 Color – frequency of a light wave within the narrow
band of the electromagnetic spectrum, to which the
human eye responds
 Produced by light of various wavelengths - when
light strikes an object and reflects back to the
eyes
Reproducing Colour on Computer (cont)
45

Colour
 An element of art with three properties:
 hue or tint (the color name)
 intensity (purity and strength of a color)
 value (the lightness or darkness of a color)

Description
Degrees Kelvin
Clear Blue Sky
8000 to 27,000
Rainy, Misty Daylight
7200 to 8500
Photographers measure color temperature in degrees
Kelvin (K)
Reproducing Colour on Computer (cont)
46

Colour (cont)
 Tools used to describe colour are different when the
colour is printed than from when it is projected
(monitor)
 Additive colour (projected colour)
 Subtractive colour (printed colour)
 Monitor-specific colour
 Colour models
Reproducing Colour on Computer (cont)
47

Additive Colour
 Simply put… coloring by mixing lights!
 Created by combining colored light sources in three primary
colors - red, green, and blue (RGB)
 TV and computer monitors
Reproducing Colour on Computer (cont)
48

Subtractive Colour
 Colour is created by combining colored media such as
paints or ink
 The colored media absorb (or subtract) some parts of
the color spectrum of light and reflect the others back
to the eye
Reproducing Colour on Computer (cont)
49

Subtractive Colour (cont)
 Subtractive color is the process used to create color in
printing
 The printed page consists of tiny halftone dots of
three primary colors- cyan, magenta, and yellow
(CMY)
Reproducing Colour on Computer (cont)
50
Reproducing Colour on Computer (cont)
51

Monitor-specific colours
 Colors should be used according to the target
audience's monitor specifications
 E.g. The preferred monitor resolution is 800x600 pixels


This is however conservative based on today’s hardware
capabilities 
E.g. The preferred color depth is 32 bits
52
Reproducing Colour on Computer (cont)
53

Colour Models
 Different ways of representing information about colour
 Models used to specify colour in computer terms are:
 RGB
 24-bit methodology where colour is specified in
terms of Red, Green, and Blue
 Values ranging from 0 to 255
 HSB and HSL
 Colour is specified as an angle from 0 to 360
degrees on a colour wheel
 Other models include CMYK, CIE, YIQ, YUV, and
YCC
Reproducing Colour on Computer (cont)
54

Colour Models (cont)
55
Reproducing Colour on Computer (cont)
56

RGB
 Add red, green and blue to create colors
 Additive model
 Assigns an intensity value to
each pixel ranging from 0
(black) to 255 (white)
 bright red color might
have R 246, G 20, B 50
Reproducing Colour on Computer (cont)
57

RGB (cont)
Color
Red
Green
Blue
Hexadecimal
Black
0
0
0
#000000
White
255
255
255
#FFFFFF
Red
255
0
0
#FF0000
Green
0
192
0
#00C000
Blue
0
0
255
#0000FF
Yellow
255
255
0
#FFFF00
http://kb.iu.edu/data/aetf.html
Reproducing Colour on Computer (cont)
58

HSB
 Based on human perception of color,
 3 fundamental properties of color:
 Hue
 Saturation (or chroma)
 Brightness - relative lightness or darkness of color,
also measured as %
 No HSB mode for creating or editing images
Reproducing Colour on Computer (cont)
59

HSB (cont)
 Hue (H) – the color type (such as red, green)
 Ranges from 0 to 360 degree
 red at 0 degree
 green at 120 degree
 blue at 240 degree and so on
Reproducing Colour on Computer (cont)
60

HSB (cont)
 Saturation (S) – ranges from 0 to 100%
 Called the "purity”
 The lower the saturation of a color, the more
"grayness" is present and the more faded the color
will appear
Reproducing Colour on Computer (cont)
61

HSB (cont)
 Brightness (B) – ranges from 0 to 100%
 A nonlinear transformation of the RGB color space
 Note that HSV and HSB are the same
0%
Black
50%
100%
white
Reproducing Colour on Computer (cont)
62

HSB (cont)
63
64
Reproducing Colour on Computer (cont)
65

CMYK
 Based on light-absorbing quality of ink printed on
paper
 As light is absorbed, part of the spectrum is absorbed
and part is reflected back to eyes
 Associated with printing
 subtractive model
 Four channels
 cyan (C)
 magenta (M)
 yellow (Y)
 black (K) [also called KEY]
Reproducing Colour on Computer (cont)
66

CMYK (cont)
 In theory, pure colors should produce black, but
printing inks contain impurities, so this combination
produces muddy brown
 K is needed to produce pure black, hence CMYK is
four-color process printing
 http://www.december.com/html/spec/colorcmyk.html
 http://www.customtattoos.net/cmyk.pdf
When C-M-Y-K
67

http://math2033.uark.edu/wiki/images/8/88/Color2.jpg
Notice the non-black
muddy brown in the
middle
Reproducing Colour on Computer (cont)
68

CMYK (cont)
Reproducing Colour on Computer (cont)
69
CMYK
• The four printing plates in action
saturation of the CYAN plate
+
saturation of the YELLOW plate
+
saturation of the MAGENTA plate
Reference: CSE5900 Introduction To Multimedia Computing by Daniel Thayer Eaves at Monash University, Caulfield, Australia
+
saturation of the BLACK plate
Reproducing Colour on Computer (cont)
70
• Printed result (approximately…)
Reference: CSE5900 Introduction To Multimedia Computing by Daniel Thayer Eaves at Monash University, Caulfield, Australia
Reproducing Colour on Computer (cont)
71

Colour Palettes
 Mathematical tables – define the colour of pixels
displayed on the screen
 Called ‘colour lookup tables’ or CLUTs on Macintosh
 The most common palettes are 1, 4, 8, 16, and 24-bit
deep
Reproducing Colour on Computer (cont)
72

Colour Palettes (cont)
 Dithering
 Process whereby the colour value of each pixel is
changed to the closest matching colour value in the
target palette
 Done using a mathematical algorithm
73
74
Reproducing Colour on Computer (cont)
75

Colour Palettes (cont)
 Dithering
Reproducing Colour on Computer (cont)
76

Image file used in Multimedia
 Macintosh formats
 Windows formats
 Cross-platform formats
Reproducing Colour on Computer (cont)
77

Macintosh formats
 Most commonly used format is PICT
 PICT
 complicated and versatile format developed by
Apple
 image application on the Macintosh can import
or export PICT files
 In PICT file, both vector-drawn objects and
bitmaps can reside side-by-side
 Operate in several color spaces (RGB, CMYK,
Bitmap, Grayscale, Indexed Color)
Reproducing Colour on Computer (cont)
78

Windows format
 Commonly used image file format – DIB
 DIB – Device-Independent Bitmaps
 Default filename extension of a Windows DIB file
is .BMP
 The preferred file type for multimedia developers
in Windows is Resource Interchange File Format
(RIFF)
Reproducing Colour on Computer (cont)
79

Windows format (cont)
 BMP
 A Windows bitmap file
 Native bitmap file format of the Microsoft
Windows environment
 TIFF (Tagged Image File Format )
 Used to exchange documents between different
applications and platforms
 PCX - Used by MS-DOS paint software
 One of the oldest bitmapped formats popularized
by MS-DOS paint programs that first appeared
in the early 1980's
Reproducing Colour on Computer (cont)
80

Cross-platform
 The image file formats that are compatible across
platforms are:
 DXF - Used by CAD applications
 Initial Graphics Exchange Standard (IGS or
IGES) - Standard for transferring CAD drawings
 JPEG and GIF – used formats on the Web
Storing Image
81

Graphics image can be saved in many file format
 File formats – Codecs (compression and
decompression)
 File compression – allow to store the image data in
smaller disk file
Storing Image
82

Popular image file formats
 JPEG (Joint-Photographic Experts Group)
 GIF (Graphical Interchange Format)
 PNG (Portable Network Graphic)
 Other formats:
 BMP, PSD, TIFF/TIF, TGA, EPS, PCX, ICO
Storing Image
83

JPEG (Joint Photographic Experts Group)
 For continuous tone images, such as full-color
photographs
 Supports more than 16 million colors (24-bit)
 Uses lossy compression (averaging may lose
information)

Lossy in a sense that you can lose data every time you
save the image
Storing Image
An example in Photoshop – Quality selection of JPEG when saving a JPEG file
84
Storing Image
85
A JPEG file saved at HIGH QUALITY (8-12)
Storing Image
86
A JPEG file saved at LOW QUALITY (0-4) – see the quality difference 
•
This quality would be worse for higher color images
Storing Image
87

GIF
 Indexed color – not in your notes… 
 For large areas of the same color and a moderate
level of detail.
 Supports up to 256 colors
 Allows transparency and interlacing
 Also allows animation 
 Uses lossless compression

Lossless in a sense that no matter how many times you
save, no data loss will occur (unless you change the
settings of course…)
Storing Image
88
1 of the color-values is used for transparency (as seen in the CLUT below)
Storing Images
89

A high quality JPEG (zoomed in)
Storing Images
90

Converted to GIF (zoomed in)
Storing Images
91


Side by side comparison (zoomed in some more)
Image quality degraded, since only 256 possible colors available in the
palette
JPEG
GIF
92
An image of a Macaw and its color lookup table
(http://en.wikipedia.org/wiki/Indexed_color)
93
Drawbacks of indexed color
images
http://en.wikipedia.org/wiki/Indexed_color
Storing Images
94
Animated GIF (Won’t work if you’re reading this on paper)
An animated GIF is a sequence of GIF files all bonded
together and displayed one after the other
Storing Image
95

PNG
 lossless, portable, well-compressed storage of
raster images
 patent-free replacement for GIF
 Support indexed-color, grayscale, and true color
images + an optional alpha channel for transparency
 also replace many common uses of TIFF… and GIF
96
A webpage to look at for lossy vs
lossless compression

http://newsgroup.xnview.com/viewtopic.php?t=2081
Digitizing Image
97

Image source
 People learn and retain more information from
pictures
 Pictures or images can be retained in many sources:
 Photos
 Available on CD-Rom – Photo CDs
 Photo CDs is classified by topics and can be
used as background or icons
 Photo taken from digital still cameras and still
video
Digitizing Image (cont)
98


Clip Art
 Includes
clip photos, video clips, and
animation clips
 Free or payable
 Good sources
 Corel’s Professional Photos CD-ROM series
Scanners
 Quite popular for capturing images from
hardcopy resources
 Operate in similar fashion to photocopy
machine – image is electronically captured
with an array of light sensors
Digitizing Image (cont)
99


Digital Cameras
 Capture image in digital format and able to
generate graphic
 Quick and easy method – can transfer image
into a computer using a special cable
Video Image
 Pictures from video source such as video tape
 video camera or digital video camera can be
 transferred into a computer
 Some companies are expert in selling video
footage
Digitizing Image (cont)
100


The Web
 provides a vast source of images and content
 simply right-click it and save (Windows)
 hold down the mouse key for a second, select the
Save Image option (Macintosh)
 BUT! Don’t simply save… make sure the images are
not copyright protected… or get permission from the
image owner first 
Your mobile phone’s camera
 Normally sub-par to dedicated digital cameras
 High megapixel cameras however produce good quality
images
 Memory card extensions also make it easier to store more
images 
Information Delivery
101

Images or Graphics
 used to convey information in multimedia products
 example, a picture of an automobile engine is much
more effective than text that merely describes it
Information Delivery (cont)
102

Images or Graphics for information delivery
 Drawn images
 Charts and graphs
 Maps
 Scenery
 People
Information Delivery (cont)
103


Image must be relevant to the overall product
Image size, color in respect to the application and other
images, and positioning must all be considered when
using images
Information Delivery (cont)
104
Summary
105



Bitmaps and vector-drawn are still images
Images incorporated in multimedia using clip arts,
bitmap software, capturing, editing or scanning
Colour is one of the most vital components of
multimedia