You are on page 1of 49

Sistem

Multimedia
K Candra Brata
andra.course@gmail.com

Tim Ajar Mata kuliah Sitem Multimedia 2017-2018


Digital Image
◇ Graphic Image
◇ Popular File Format
◇ Color
◇ Visual System
GRAPHICS/IMAGE

• Images consist of pixels — picture elements in digital images


• Image resolution refers to the number of pixels in a digital image
GRAPHICS/IMAGE

• Aspect ratio refers the ratio of the width to the height of an image or
screen
1-BIT IMAGES

• A 1-bit 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)

• Hence, such an image is also referred to as a binary image

• It is also sometimes called a 1-bit monochrome image since it contains


no color.
1-BIT IMAGES
1-BIT IMAGES
Mapping
1-BIT IMAGES

• How much space do we need to store a 640x480 monochrome image?


640 x 480 = 307,200 pixels (bits)
307,200 / 8 = 38,400 bytes
38,400 / 1,024 = 37.5 kilobytes
8-Bit Gray-Level Images

 Also called grayscale images


 Each pixel has a gray value between 0 and 255
8-Bit Gray-Level Images
8-Bit Gray-Level Images

 The image can be thought of as a two-dimensional array of pixel values


 We refer to such an array [x,y] as a bitmap
8-Bit Gray-Level Images

 array [x,y] as a bitmap


8-Bit Gray-Level Images

• Each pixel is usually stored as a byte (28 = 256)


• How much space do we need to save a 640 x 480 grayscale image?
• 640 x 480 = 307,200 pixels (bytes)
• 307,200 / 1,024 = 300 kilobytes
8-Bit Color Images

2 vs 4 vs 8 BIT COLOR Images

2 4 8
8-Bit Color Images
LUT
• 8-bit color image files use a lookup table (LUT) to store color information
• The image stores only the index for each pixel.
• The LUT is often called a Color palette
8-Bit Color Images
LUT
• For example, if a pixel stores the value 25, the meaning is to go to row 25 in a
color lookup table.
8-Bit Color Images
LUT
• The number of rows of the LUT is 256 (8 bit)
• Thus, only 256 (28) colors can be stored.

• We have to, in some way, pick the most important 256 groups of color
24-Bit Color Images

• Each pixel is represented by three bytes (24 bits), usually representing RGB
• Each byte stores red, green, and blue values
24-Bit Color Images
24-Bit Color Images

• For each element in RGB, there are 256 values (0-255)


• Thus, there are 256 (R) x 256 (G) x 256 (B) = 16,777,216 possible combination
of colors

• How about the space?


for 640 x 480 size image :
• 640 x 480 = 307,200 pixels
• 307,200 pixels x 3 bytes = 921,600 bytes
• 921,600 bytes / 1,024 = 900 kilobytes
24-Bit Color Images

• But many 24-bit color images are actually stored as 32-bit / 4 bytes (integer)
• The extra 1 byte of data for each pixel storing an alpha (α value) or opacity.
Popular File Format
GIF

• Graphics Interchange Format.


• Limited to 8 bit (256) color images only.
• Best suited for images with few distinctive colors (e.g., graphics or drawing)
• The original specification is GIF87a.
• The later version, GIF89a, supports simple animation.
• The actual raster data is compressed using the LZW compression scheme.
JPEG

• The most important current standard for image compression.

• Created by Joint Photographic Experts Group, a working group of the


International Organization for Standardization (ISO).

• The human vision system has some specific limitations, which JPEG
takes advantage of the eye–brain system cannot see extremely fine
detail.

• If many changes occur within a few pixels, we refer to that image


segment as having high spatial frequency.
JPEG

Image spatial frequency


JPEG

Image spatial frequency


JPEG

• The image is transformed to frequency domain


• Frequency coefficients that correspond to slow changes are
then preserved
• This compression scheme is “lossy”
JPEG

JPEG compression
PNG

• Portable Network Graphics


• Special features of PNG files include support for up to 16 bits per pixel
in each color channel, i.e., 48-bit color
• Supports both lossless and lossy compression with performance better
than GIF
TIFF

• Tagged Image File Format


• Supports attachment of additional information (referred to as “tags”)
• Can store many different types of images: 1-bit, grayscale, 8-bit, 24-bit
RGB, and so on
• It is quite common to use TIFF files to store uncompressed data
BMP

• BitMap (BMP)
• Major system standard image file format for Microsoft Windows
• Supports many pixel formats, including indexed color (up to 8 bits per
pixel), and 16, 24, and 32-bit color images
• Makes use of 24-bit Run-Length Encoding (RLE) compression.
• 16-bit and 32-bit color images (with α-channel information) are always
uncompressed
Color
COLOR SCIENCE

• Light is an electromagnetic wave.


• Color is characterized by the wavelength of the wave
• Humans cannot detect all light, but just contributions that fall in the
“visible wavelengths” (400 – 700 nm (10-9 m))
COLOR SCIENCE
COLOR SCIENCE

WHERE DOES COLOURCOME FROM?


Additive vs Subtractive
Color
• When two light beams fall on a target, their colors add
• When two phosphors on a CRT screen are turned on, their colors add
• But for ink dropped on paper, the opposite situation holds
Additive vs Subtractive
Color
Luminance & Chrominance
Color
• Luminance : the brightness of light (In Black and white television)
• Chrominance : the color information in a signal
• A system that defines color via one luminance value and two
chrominance values is called a luma-chroma system (YUV)
Visual System
HUMAN VISION

• The eye works like a camera.


• The lens focuses an image onto the retina (upside down and left-right
reversed).
• The retina consists of an array of rods and three kinds of cones.
• These receptors are called such because they are shaped like cones
and rods.
• The rods come into play when light levels are low and produce a image
in shades of gray.
• For higher light levels, the cones each produce a signal.
• Humans normally have three kinds of cones (Long,Medium,Short)
based on their sensitivity to the wavelengths of light.

• L responds to red (R) light (564–580 nm). M responds to green (G) light
(534–545 nm). S responds to blue (B) light (420–440 nm).
CAMERA SYSTEMS

• A camera has three signals produced at each pixel location


• Analog signals are converted to digital, truncated to integers, and
stored.
• If the precision used is 8-bit, then the maximum value for any of R, G, B
is 255, and the minimum is 0
CAMERA SYSTEMS

• key stages in digital image processing

Sampling : related to coordinates values

Quantization : related to intensity values

 The sampling rate determines the spatial resolution of the digitized image.

 The quantization level determines the number of grey levels in the


digitized image.
CAMERA SYSTEMS

a b
c d
Generating a digital image.
(a) Continuous image.
(b) A scaling line from A to B in
the continuous image, used
to illustrate the concepts of
sampling and quantization.
(c) sampling and quantization.
(d) Digital scan line.
CAMERA SYSTEMS

a b
(a) Continuous image projected
onto a sensor array.
(b) Result of image sampling and
quantization.
CAMERA SYSTEMS

Sampling

32
64

128

256

512

1024
CAMERA SYSTEMS

Sampling

1024 512 256

128 64 32
CAMERA SYSTEMS

Quantization

8-bit 7-bit 6-bit 5-bit

4-bit 3-bit 2-bit 1-bit


Tugas !!!

• Buat resume terkait


teknik sampling dan quantization dari 24 bit image.

• Hardcopy, max 4 halaman folio bergaris Kumpulkan kolektif


kek ketua kelas.
ANY QUESTIONS? JOIN !!

You can find me at


C.1.8

http://bit.do/sismul_tif

You might also like