You are on page 1of 28

8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Pengantar Pengolahan Citra Digital


(KOM 421) – 3(2-3)

Kuliah 01:
Pendahuluan

Yeni Herdiyeni
Departemen Ilmu Komputer IPB
Semester Ganjil 2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Topik
• Tujuan Instruksional Umum:
Mahasiswa mampu menjelaskan, mengolah dan
menganalisis citra digital.
• Deskripsi:
Mata kuliah ini menjelaskan karakteristik citra digital,
analisis dan pengolahan citra digital seperti image
formation, image restoration, image enhancement,
transformasi citra dalam ruang frekuensi, kompresi
citra, deteksi tepi, segmentasi citra, morfologi citra dan
pengenalan pola. Perangkat lunak yang digunakan
MATLAB dan C

1
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Buku Bacaan:
• Gonzalez, R. C., Woods, R. E., Eddins, Steven. 2004. Digital Image
Processing Using Matlab. Prentice Hall. (BUKU UTAMA)
• Alasdair McAndrew. 2004. Introduction to Digital Image Processing with
Matlab. Thomson Course Technology, USA.
• Acharya, Tinku dan Ray, A.K. 2005. Image Processing. Principles and
Applications. A John Wiley and Sons, Inc., Publication
• Russ, John. C. 2007. The Image Processing Handbook, Fifth Edition. Taylor
& Francis Group, LLC
• Umbaugh, S.C. 1999. Computer Vision and Image Processing. A Practical
Approach using CVI Tools. Prentice Hall PTR.
• Rastislav Lukac dan Konstantinos. 2007. Color Image Processing. Methods
and Applications. Taylor & Francis Group, LLC
• Pitas, I. Digital Image Processing Algorithm. 1993. Prentice Hall
• Bahan bacaan lain yang relevan

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Pengajar
• Yeni Herdiyeni
• Aziz Kustiyo
• Sony Hartono (Praktikum)
Komponen Penilaian
• UTS
• UAS
• Tugas
• Quiz
• Project

2
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Materi Kuliah
• Pertemuan 1 : Pendahuluan
• Pertemuan 2 : Citra Digital dan Matlab
• Pertemuan 3 : Pengolahan Titik
• Pertemuan 4 : Restorasi Citra
• Pertemuan 5 : Image Enhancement
• Pertemuan 6 : Pengolahan Warna
• Pertemuan 7 : Transformasi Citra pada ruang
frekuensi (Fourier Transformation)
• Ujian Tengah Semester

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Materi Kuliah #2
• Pertemuan 8 : Transformasi Citra pada ruang frekuensi
(Wavelet Transformation)
• Pertemuan 9 : Deteksi tepi (edge detection)
• Pertemuan 10 : Segmentasi Citra
• Pertemuan 11 : Morfologi Citra
• Pertemuan 12 : Pemampatan Citra (Image Compression
– RLE, Huffman Code)
• Pertemuan 13 : Pemampatan Citra JPEG
• Pertemuan 14 : Pengenalan Pola (Pattern Recognition)
• Ujian Akhir Semester

3
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Applications of Digital Image Processing (DIP)

meteorology
astronomy
radiology seismology
ultrasonic autonomous
imaging navigation
microscopy inspection
DIP
robotic assembly digital library
surveillance
reconnassaince
internet remote radar, & mapping
sensing SAR
From Prof. Alan C. Bovik

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Image Formation

1999-2007 by Richard Alan


27 August 2008 8
Peters II

4
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Image Formation

1999-2007 by Richard Alan


27 August 2008 9
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Image Formation

projection
through lens
image of object

1999-2007 by Richard Alan


27 August 2008 10
Peters II

5
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Image Formation

projection onto
discrete sensor
digital camera
array.

1999-2007 by Richard Alan


27 August 2008 11
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Image Formation

sensors register
average color.
sampled image

1999-2007 by Richard Alan


27 August 2008 12
Peters II

6
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Image Formation

continuous colors,
discrete locations.
discrete real-
valued image

1999-2007 by Richard Alan


27 August 2008 13
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Digital Image Formation: Quantization


discrete color output

continuous colors
mapped to a finite,
discrete set of colors.

continuous color input

1999-2007 by Richard Alan


27 August 2008 14
Peters II

7
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Sampling and Quantization


pixel grid

real image sampled quantized sampled &


quantized

1999-2007 by Richard Alan


27 August 2008 15
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Color images have 3 values per


Digital Image pixel; monochrome images have 1
value per pixel.

a grid of squares,
each of which
contains a single
color

each square is
called a pixel (for
picture element)

1999-2007 by Richard Alan


27 August 2008 16
Peters II

8
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Pengolahan Titik

- gamma - brightness original + brightness + gamma

histogram mod - contrast original + contrast histogram EQ

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Spatial Filtering

blurred original sharpened

1999-2007 by Richard Alan


27 August 2008 18
Peters II

9
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Spatial Filtering

bandpass original unsharp


filter masking

1999-2007 by Richard Alan


27 August 2008 19
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Spatial Filtering
signed image with
0 at middle gray

bandpass original unsharp


filter masking

1999-2007 by Richard Alan


27 August 2008 20
Peters II

10
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Motion Blur
regional vertical

original

zoom rotational

1999-2007 by Richard Alan


27 August 2008 21
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Noise Reduction

blurred image color noise color-only blur

1999-2007 by Richard Alan


27 August 2008 22
Peters II

11
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Noise Reduction

blurred image color noise 5x5 Wiener filter

1999-2007 by Richard Alan


27 August 2008 23
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Noise Reduction

periodic frequency
original
noise tuned filter
1999-2007 by Richard Alan
27 August 2008 24
Peters II

12
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Color Images
• Are constructed from three
intensity maps.
• Each intensity map is pro-jected
through a color filter (e.g., red,
green, or blue, or cyan,
magenta, or yellow) to create a
monochrome image.
• The intensity maps are overlaid
to create a color image.
• Each pixel in a color image is a
three element vector.

27 August 2008 1999-2007 by Richard Alan Peters II 25

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Color
Image
s On a
CRT

1999-2007 by Richard Alan


27 August 2008 26
Peters II

13
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Color Processing

requires some
knowledge of how
we see colors

1999-2007 by Richard Alan


27 August 2008 27
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Eye’s Light Sensors


cone density near fovea

#(blue) << #(red) < #(green)

1999-2007 by Richard Alan


27 August 2008 28
Peters II

14
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Color Sensing / Color Perception


These are approximations
of the responses to the
visible spectrum of the
“red”, “green”, and “blue”
receptors of a typical
human eye.

1999-2007 by Richard Alan


27 August 2008 29
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Color Sensing / Color Perception


These are
approximations of
the responses to
the visible
spectrum of the
“red”, “green”,
and “blue”
receptors of a
typical human eye.

The simultaneous red + blue


response causes us to
perceive a continuous range
of hues on a circle. No hue is
greater than or less than any
other hue.

1999-2007 by Richard Alan


27 August 2008 30
Peters II

15
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Color Sensing / Color Perception


The eye has 3 types of photoreceptors:
luminance

sensitive to red, green, or blue light.


hue
saturation

The brain transforms RGB into separate


brightness and color channels (e.g., LHS).
brain photo receptors

1999-2007 by Richard Alan


27 August 2008 31
Peters II

luminance and chrominance


Color Perception Pengantar Pengolahan Citra
(hue+saturation) Digital
are perceived
Departemen Ilmu Komputer -IPB
16× pixelization of: with different resolutions, as
are red, green and blue.

all bands luminance chrominance

red green blue

1999-2007 by Richard Alan


27 August 2008 32
Peters II

16
8/27/2008

Color Perception Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB
16× pixelization of:

all bands luminance chrominance

red green blue

1999-2007 by Richard Alan


27 August 2008 33
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Color Balance
and Saturation
Uniform changes in color
components result in change of
tint.

E.g., if all G pixel values are multiplied by


 > 1 then the image takes a green cast.

1999-2007 by Richard Alan


27 August 2008 34
Peters II

17
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Color Transformations

222 222
222 222
   
218 185 
 17   17 
121 122
  240   236
171 230 114 227
   
166  106 
240 240
171 171
   
160  103 

Image aging: a transformation, , that mapped:


 17   17   222 222  240 240  236 240 
122   121  222   222  171   171  227   230 
  171    218    160     166  
114 185  103 106 

1999-2007 by Richard Alan


27 August 2008 35
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

The 2D Fourier Transform of a Digital Image


Let I(r,c) be a single-band (intensity) digital image with R
rows and C columns. Then, I(r,c) has Fourier representation

 ur vc 
R 1 C 1  i 2   
I  r, c     I  u,v  e R C
, these complex
u 0 v 0
exponentials are
where
2D sinusoids.
 ur vc 
R 1 C 1  i 2   
I  u,v   RC1   I (r,c) e R C

r 0 c 0

are the R x C Fourier coefficients.


1999-2007 by Richard Alan
27 August 2008 36
Peters II

18
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

A   2  c   
I r, c  
r
2D Sinusoids: cos  cos   sin       1
2     C R   
c
... are plane waves with
grayscale amplitudes, periods in
terms of lengths, ...

r
orientation

 = phase shift

1999-2007 by Richard Alan


27 August 2008 37
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

... specific orientations,


2D Sinusoids: and phase shifts.

c c

r r

1999-2007 by Richard Alan


27 August 2008 38
Peters II

19
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

The Value of a Fourier Coefficient …


… is a complex
number with a
real part and an
imaginary part.

If you represent
that number as a
magnitude, A, and
a phase, , …

..these represent the amplitude


and offset of the sinusoid with
frequency w and direction .
1999-2007 by Richard Alan
27 August 2008 39
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

The Sinusoid from the Fourier Coeff. at (u,v)

1999-2007 by Richard Alan


27 August 2008 40
Peters II

20
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

The Fourier Transform of an Image

magnitude phase

I |F{I}| [F{I}]

1999-2007 by Richard Alan


27 August 2008 41
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Continuous Fourier Transform

 
Ir, c     Iu, v  e
i 2 ( uc vr )
dudv
 

 
Iu, v     Ir, c e
i 2 ( uc vr )
dcdr


The continuous Fourier


transform assumes a
continuous image exists
in a finite region of an
infinite plane.

The BoingBoing Bloggers

1999-2007 by Richard Alan


27 August 2008 42
Peters II

21
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Discrete Fourier Transform


The discrete Fourier
transform assumes a
digital image exists on a
closed surface, a torus.

 uc vr 
R  1C  1 i 2   
I( r,c)    Iu,v  e C R
v 0 u 0

 cu rv 
R 1C 1  i 2   
Iu, v     Ir,c e C R 
r 0 c 0

The BoingBoing Bloggers

1999-2007 by Richard Alan


27 August 2008 43
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Sums of shifted and


Convolution weighted copies of
images or Fourier
transforms.

 r  16, c  16  r  16, c  16

 r  0, c  0

 r  16, c  16  r  16, c  16

Sum times 1/5

1999-2007 by Richard Alan


27 August 2008 44
Peters II

22
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Convolution Property of the Fourier Transform

Let functions f ( r, c ) and g ( r, c ) have


The Fourier Transform of a
Fourier Transforms F (u, v ) and G (u, v ). product equals the convolution of
Then, the Fourier Transforms. Similarly,
the Fourier Transform of a
F { f  g }  F  G. convolution is the product of the
M oreover, Fourier Transforms
F { f  g }  F  G.
 represents convolutio n
 represents pointwise multiplica tion
Then, a spatial convolution can be computed by
f g F
-1
F  G.

1999-2007 by Richard Alan


27 August 2008 45
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Boundary Detection

http://www.robots.ox.ac.uk/~vdg/dynamics.html

23
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Boundary Detection

Finding the Corpus Callosum


(G. Hamarneh, T. McInerney, D. Terzopoulos)

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Nonlinear Processing: Binary Morphology

“L” shaped SE Foreground: white pixels Cross-hatched


pixels are
O marks origin Background: black pixels indeterminate.

1999-2007 by Richard Alan


27 August 2008 48
Peters II

24
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Image Compression
Original image is
5244w x 4716h @
1200 ppi:
127MBytes

Yoyogi Park, Tokyo, October 1999. Photo by Alan Peters.

1999-2007 by Richard Alan


27 August 2008 49
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Image Compression: JPEG


JPEG quality level

File size in bytes

1999-2007 by Richard Alan


27 August 2008 50
Peters II

25
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Image Compression: JPEG


JPEG quality level

File size in bytes


1999-2007 by Richard Alan
27 August 2008 51
Peters II

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Recognition - Shading

Lighting affects appearance

26
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

27
8/27/2008

Pengantar Pengolahan Citra Digital


Departemen Ilmu Komputer -IPB

Classification

(Funkhauser, Min, Kazhdan, Chen, Halderman, Dobkin, Jacobs)

28

You might also like