kuliah 01-pendahuluan.pdf

28
8/27/2008 1 Departemen Ilmu Komputer -IPB Pengantar Pengolahan Citra Digital Kuliah 01: Pendahuluan Yeni Herdiyeni Departemen Ilmu Komputer IPB Semester Ganjil 2008 Pengantar Pengolahan Citra Digital (KOM 421) 3(2-3) Departemen Ilmu Komputer -IPB Pengantar Pengolahan Citra Digital 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

Upload: vuque

Post on 20-Jan-2017

226 views

Category:

Documents


0 download

TRANSCRIPT

8/27/2008

1

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

Kuliah 01:

Pendahuluan

Yeni HerdiyeniDepartemen Ilmu Komputer IPB

Semester Ganjil 2008

Pengantar Pengolahan Citra Digital(KOM 421) – 3(2-3)

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

Topik

• Tujuan Instruksional Umum:Mahasiswa mampu menjelaskan, mengolah danmenganalisis 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, kompresicitra, deteksi tepi, segmentasi citra, morfologi citra danpengenalan pola. Perangkat lunak yang digunakanMATLAB dan C

8/27/2008

2

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

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

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

Pengajar

• Yeni Herdiyeni• Aziz Kustiyo• Sony Hartono (Praktikum)

Komponen Penilaian• UTS• UAS• Tugas• Quiz• Project

8/27/2008

3

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

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

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

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

8/27/2008

4

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

DIP

astronomy

seismology

inspection

autonomous navigation

reconnassaince & mapping remote

sensing

surveillance

microscopy

radiology

robotic assembly digital library

ultrasonic imaging

radar, SAR

meteorology

internet

Applications of Digital Image Processing (DIP)

From Prof. Alan C. Bovik

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 81999-2007 by Richard Alan

Peters II

Image Formation

8/27/2008

5

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 91999-2007 by Richard Alan

Peters II

Image Formation

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 101999-2007 by Richard Alan

Peters II

Image Formation

projection through lens

image of object

8/27/2008

6

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 111999-2007 by Richard Alan

Peters II

Image Formation

projection onto discrete sensor array.

digital camera

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 121999-2007 by Richard Alan

Peters II

Image Formation

sensors register average color.

sampled image

8/27/2008

7

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 131999-2007 by Richard Alan

Peters II

Image Formation

continuous colors, discrete locations.

discrete real-valued image

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 141999-2007 by Richard Alan

Peters II

Digital Image Formation: Quantization

continuous color input

dis

cret

e co

lor

ou

tpu

t

continuous colors

mapped to a finite,

discrete set of colors.

8/27/2008

8

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 151999-2007 by Richard Alan

Peters II

Sampling and Quantization

pixel grid

sampledreal image quantized sampled & quantized

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 161999-2007 by Richard Alan

Peters II

Digital Image

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

each square is called a pixel (for picture element)

Color images have 3 values per pixel; monochrome images have 1 value per pixel.

8/27/2008

9

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

original + gamma- gamma + brightness- brightness

original + contrast- contrast histogram EQhistogram mod

Pengolahan Titik

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 181999-2007 by Richard Alan

Peters II

originalblurred sharpened

Spatial Filtering

8/27/2008

10

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 191999-2007 by Richard Alan

Peters II

Spatial Filtering

bandpassfilter

unsharpmasking

original

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 201999-2007 by Richard Alan

Peters II

Spatial Filtering

bandpassfilter

unsharpmasking

original

signed image with0 at middle gray

8/27/2008

11

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 211999-2007 by Richard Alan

Peters II

Motion Blurverticalregional

zoom rotational

original

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 221999-2007 by Richard Alan

Peters II

color noiseblurred image color-only blur

Noise Reduction

8/27/2008

12

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 231999-2007 by Richard Alan

Peters II

5x5 Wiener filtercolor noiseblurred image

Noise Reduction

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 241999-2007 by Richard Alan

Peters II

Noise Reduction

originalperiodic

noisefrequency tuned filter

8/27/2008

13

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 251999-2007 by Richard Alan Peters II

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.

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 261999-2007 by Richard Alan

Peters II

Color Images On a

CRT

8/27/2008

14

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 271999-2007 by Richard Alan

Peters II

Color Processing

requires some knowledge of how we see colors

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 281999-2007 by Richard Alan

Peters II

Eye’s Light Sensors

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

cone density near fovea

8/27/2008

15

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 291999-2007 by Richard Alan

Peters II

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

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 301999-2007 by Richard Alan

Peters II

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.

Color Sensing / Color Perception

8/27/2008

16

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 311999-2007 by Richard Alan

Peters II

lum

inan

ceh

ue

saturatio

n

photo receptorsbrain

The eye has 3 types of photoreceptors: sensitive to red, green, or blue light.

The brain transforms RGB into separate brightness and color channels (e.g., LHS).

Color Sensing / Color Perception

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 321999-2007 by Richard Alan

Peters II

Color Perception

all bands luminance chrominance

red green blue

16× pixelization of:

luminance and chrominance (hue+saturation) are perceived with different resolutions, as are red, green and blue.

8/27/2008

17

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 331999-2007 by Richard Alan

Peters II

Color Perception

all bands luminance chrominance

red green blue

16× pixelization of:

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 341999-2007 by Richard Alan

Peters II

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.

8/27/2008

18

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 351999-2007 by Richard Alan

Peters II

Color Transformations

218

222

222

185

222

222

114

122

17

106

227

236

103

171

240

160

171

240

171

121

17

166

230

240

171

121

17

114

122

17

218

222

222

185

222

222

160

171

240

103

171

240

166

230

240

106

227

236

Image aging: a transformation, , that mapped:

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 361999-2007 by Richard Alan

Peters II

The 2D Fourier Transform of a Digital Image

21 1

0 0

, , ,

ur vciR C

R C

u v

I r c u v e

I

1 1 2

1

0 0

( , )

ur vcR C i

R CRC

r c

u,v I r c e

I

Let I(r,c) be a single-band (intensity) digital image with R

rows and C columns. Then, I(r,c) has Fourier representation

where

are the R x C Fourier coefficients.

these complex exponentials are 2D sinusoids.

8/27/2008

19

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 371999-2007 by Richard Alan

Peters II

2D Sinusoids:

orientation

... are plane waves with grayscale amplitudes, periods in terms of lengths, ...

1sin

Rcos

C

2cos

2,

rcAcrI

A

= phase shift

r

c

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 381999-2007 by Richard Alan

Peters II

2D Sinusoids: ... specific orientations, and phase shifts.

r

c

r

c

8/27/2008

20

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 391999-2007 by Richard Alan

Peters II

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 .

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 401999-2007 by Richard Alan

Peters II

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

8/27/2008

21

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 411999-2007 by Richard Alan

Peters II

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

The Fourier Transform of an Image

magnitude phase

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 421999-2007 by Richard Alan

Peters II

Continuous Fourier Transform

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

dudvevucr vruci )(2,,I I

dcdrecrvu vruci )(2,I, I

The BoingBoing Bloggers

8/27/2008

22

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 431999-2007 by Richard Alan

Peters II

Discrete Fourier Transform

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

1

0

21

0

)(IC

u

R

vr

C

uciR

v

eu,vr,c

I

1

0

21

0

,I,C

c

R

rv

C

cuiR

r

ecrvu

I

The BoingBoing Bloggers

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 441999-2007 by Richard Alan

Peters II

Convolution

16,16 cr

0,0 cr

16,16 cr 16,16 cr

16,16 cr

Sum times 1/5

Sums of shifted and weighted copies of images or Fourier transforms.

8/27/2008

23

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 451999-2007 by Richard Alan

Peters II

Convolution Property of the Fourier Transform

The Fourier Transform of a product equals the convolution of the Fourier Transforms. Similarly, the Fourier Transform of a convolution is the product of the Fourier Transforms

.

bycomputed be can nconvolutio spatiala Then,

tionmultiplicapointwiserepresents

nconvolutiorepresents

.}{

Moreover,

.}{

Then,

).,( and ),( TransformsFourier

have ),( and ),( functionsLet

1GFgf

GFgf

GFgf

vuGvuF

crgcrf

-

F

F

F

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

Boundary Detection

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

8/27/2008

24

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

Boundary Detection

Finding the Corpus Callosum

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

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 481999-2007 by Richard Alan

Peters II

Nonlinear Processing: Binary Morphology

“L” shaped SE

O marks origin

Foreground: white pixels

Background: black pixels

Cross-hatched pixels are indeterminate.

8/27/2008

25

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 491999-2007 by Richard Alan

Peters II

Image Compression

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

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

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 501999-2007 by Richard Alan

Peters II

Image Compression: JPEG

JPEG

qu

alit

y le

vel File size in

bytes

8/27/2008

26

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

27 August 2008 511999-2007 by Richard Alan

Peters II

JPEG

qu

alit

y le

vel File size in

bytes

Image Compression: JPEG

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

Recognition - Shading

Lighting affects appearance

8/27/2008

27

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

8/27/2008

28

Departemen Ilmu Komputer -IPBPengantar Pengolahan Citra Digital

Classification

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