73
1 丁丁丁 (Jian-Jiun Ding) National Taiwan University 丁丁丁 丁丁丁 723 丁 丁丁丁 丁丁丁 531 丁 丁丁丁丁(02)33669652 Major Digital Signal Processing Digital Image Pr ocessing

1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

Embed Size (px)

Citation preview

Page 1: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

1

丁建均 (Jian-Jiun Ding)

National Taiwan University

辦公室:明達館 723 室, 實驗室:明達館 531 室

聯絡電話: (02)33669652

Major : Digital Signal Processing

Digital Image Processing

Page 2: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

2Research Fields

[A. Time-Frequency Analysis]

(1) Time-Frequency Analysis (page 4)

(2) Music Signal Analysis (page 17)

(3) Fractional Fourier Transform (page 20)

(4) Wavelet Transform (page 34)

[B. Image Processing]

(5) Image Compression (page 37)

(6) Edge and Corner Detection (page 45)

(7) Segmentation (page 49)

(8) Pattern Recognition (Face, Character) (page 54)

: main topics that I researched in recent years

Page 3: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

3[C. Fast Algorithms]

(9) Fast Algorithms

(10) Integer Transforms (page 56)

(11) Number Theory, Haar Transform, Walsh Transform

[D. Applications of Signal Processing]

(12) Optical Signal Processing (page 62)

(13) Acoustics

(14) Bioinformatics (page 64)

[E. Theories for Signal Processing]

(15) Quaternions (page 68)

(16) Eigenfunctions, Eigenvectors, and Prolate Spheroidal Wave Function

(17) Signal Analysis (Cepstrum, Hilbert, CDMA)

Page 4: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

41. Time-Frequency Analysis

http://djj.ee.ntu.edu.tw/TFW.htm

Fourier transform (FT)

Time-Domain Frequency Domain

Some things make the FT not practical:

(1) Only the case where t0 t t1 is interested.

(2) Not all the signals are suitable for analyzing in the frequency domain.

It is hard to analyze the signal whose instantaneous frequency varies with time.

2j f tX f x t e dt

Page 5: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

5Example: x(t) = cos( t) when t < 10,

x(t) = cos(3 t) when 10 t < 20,

x(t) = cos(2 t) when t 20 (FM signal)

0 5 10 15 20 25 30-1

-0.5

0

0.5

1

-5 0 5-2

-1

0

1

2f(t)

Fouriertransform

Page 6: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

6

x(t) = cos( t) when t < 10, x(t) = cos(3 t) when 10 t < 20,

x(t) = cos(2 t) when t 20 (FM signal)

Left : using Gray level to represent the amplitude of X(t, f)

Right : slicing along t = 15

0 5 10 15 20 25 30

-5

-4

-3

-2

-1

0

1

2

3

4

5

f -axis

t -axis-5 0 5

-0.5

0

0.5

t -axis

Using Time-Frequency analysis

Page 7: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

7Several Time-Frequency Distribution

Short-Time Fourier Transform (STFT) with Rectangular Mask

2,t B j f

t BX t f x e d

Gabor Transform

2 2 ( )( ) 2,t

j ftxG t f e e x d

Wigner Distribution Function

* 2, / 2 / 2 j fxW t f x t x t e d

Gabor-Wigner Transform (Proposed)

, ( , ) ( , )x x xD t G t W t

avoid cross-term

less clarity

with cross-term

high clarity

avoid cross-term

high clarity

Page 8: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

8Cohen’s Class Distribution

S Transform

* 2, / 2 / 2 j txA x t x t e dt

where

, , , exp 2 ( )x xC t f A j t f d d

2 2( , ) exp exp 2xS t f x f t f j f d

Hilbert-Huang Transform

Page 9: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

9

1

( ) exp( ( ))N

k kk

x t a j t

31 2 '( ) '( )'( ) '( ), , , ,

2 2 2 2Nt tt t

Instantaneous Frequency 瞬時頻率

If

then the instantaneous frequency of x(t) are

自然界瞬時頻率會隨時間而改變的例子

音樂,語音信號 , Doppler effect, seismic waves, optics, radar system,

rectangular function, ………………………

In fact, in addition to sinusoid-like functions, the instantaneous frequencies

of other functions will inevitably vary with time.

Page 10: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

10

(1) Finding Instantaneous Frequency

(2) Music Signal Analysis

(3) Sampling Theory

(4) Modulation and Multiplexing

(5) Filter Design

(6) Random Process Analysis

(7) Signal Decomposition

(8) Electromagnetic Wave Propagation

(9) Optics

(10) Radar System Analysis

Applications of Time-Frequency Analysis

(11) Signal Identification

(12) Acoustics

(13) Biomedical Engineering

(14) Spread Spectrum Analysis

(15) System Modeling

(16) Image Processing

(17) Economic Data Analysis

(18) Signal Representation

(19) Data Compression

(20) Seismology

(21) Geology

Page 11: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

11

Conventional Sampling Theory

Nyquist Criterion1

2t B

New Sampling Theory

(1) t can vary with time

(2) Number of sampling points == Area of time frequency distribution

Page 12: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

12假設有一個信號,

The supporting of x(t) is t1 t t1 + T, x(t) 0 otherwise

The supporting of X( f ) 0 is f1 f f1 + F, X( f ) 0 otherwise

根據取樣定理, t 1/F , F=2B, B: 頻寬

所以,取樣點數 N 的範圍是

N = T/t TF

重要定理:一個信號所需要的取樣點數的下限,等於它時頻分佈的面績

Page 13: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

13

Modulation and Multiplexing

not overlapped

spectrum of signal 1

spectrum of signal 2

B1-B1

B2-B2

Page 14: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

14Improvement of Time-Frequency Analysis

(1) Computation Time

(2) Tradeoff of the cross term problem and clarification

Page 15: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

15

-10 -5 0 5 10

-10

-5

0

5

10-10 -5 0 5 10

-10

-5

0

5

10

-

axis

t -axis

left: x1(t) = 1 for |t| 6, x1(t) = 0 otherwise, right: x2(t) = cos(6t 0.05t2)

WDF

Gabor

-10 -5 0 5 10

-10

-5

0

5

10-10 -5 0 5 10

-10

-5

0

5

10

-

axis

t -axis

Page 16: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

16

Gabor-Wigner Transform

avoiding the cross-term problem and high clarity

1.5 0.25, ( , ) ( , )f f fC t G t W t

-10 -5 0 5 10

-10

-5

0

5

10-10 -5 0 5 10

-10

-5

0

5

10

-

axis

t -axis

Page 17: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

172. Music Signal Analysis

time (sec)

freq

uenc

y H

z

Fs=44100Hz window size=0.2sec

0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6

100

150

200

250

300

350

400

450

500

550

600

Fs=44100Hz window size=0.2sec

time (sec)

freq

uenc

y H

z

0.2 0.4 0.6 0.8 1 1.2 1.4 1.6100

150

200

250

300

350

400

450

500

550

600

Using the time-frequency analysis

聲音檔: http://djj.ee.ntu.edu.tw/Chord.wav

SoMiDo

LaMiDo

LaFaRe

Page 18: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

18聲音檔: http://djj.ee.ntu.edu.tw/air.mp3

time (sec)

freq

uenc

y H

z

0 1 2 3 4 5 6 7 8

100

200

300

400

500

600

700

800

900

1000

Fs=44100Hz window size=0.2sec

time (sec)

freq

uenc

y H

z

0 1 2 3 4 5 6 7 8 9100

200

300

400

500

600

700

800

900

1000

time-frequency analysis

Page 19: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

19

目標: 音樂信號搜尋

( 運用音的高低和拍子 )

音樂信號壓縮

Page 20: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

203. Fractional Fourier Transform Performing the Fourier transform a times (a can be non-integer)

Fourier Transform (FT)

generalization

Fractional Fourier Transform (FRFT)

, = a/2

When = 0.5, the FRFT becomes the FT.

dttfeF tj

2

1

dttfj

uFt

juju

j

eee t

22 cot2csccot

2

2

cot1

Page 21: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

21

Fractional Fourier Transform (FRFT)

, = a/2.

When = 0: (identity)

When = 0.5:

When is not equal to a multiple of 0.5, the FRFT is equivalent to doing /(0.5 ) times of the Fourier transform.

when = 0.1 doing the FT 0.2 times;

when = 0.25 doing the FT 0.5 times;

when = /6 doing the FT 1/3 times;

dttfj

uFt

juju

j

eee t

22 cot2csccot

2

2

cot1

Page 22: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

22

Physical Meaning: Transform a Signal into the Fractional domain, which is the intermediate of the time domain and the frequency domain.

-5 0 5-1

0

1

2

-5 0 5-1

0

1

2

-5 0 5-1

0

1

2

-5 0 5-1

0

1

2

-5 0 5-1

0

1

2

-5 0 5-1

0

1

2

f(t): rectangle

F(w): sinc function

Page 23: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

23Time domain Frequency domain fractional domain

Modulation Shifting Modulation + Shifting

Shifting Modulation Modulation + Shifting

Differentiation j2f Differentiation and j2f

−j2f Differentiation Differentiation and −j2f

0 0 0exp 2 ( ) exp 2 (cos s )injFRFT j f t f t e j f u F u f t

is some constant phase

( ) 2 ( )s (n os)i cFRFT f t j u F u F u

Page 24: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

24

Conventional filter design:

x(t): input x(t) = s(t) (signal) + n(t) (noise) y(t): output (We want that y(t) s(t)) H(): the transfer function of the filter.

Filter design by the fractional Fourier transform (FRFT):

(replace the FT and the IFT by the FRFTs with parameters and )

txFTHIFTty

txFRFTuHFRFTty

Example: Filter Design

Why do we use the fractional Fourier transform?

To solve the problems that cannot be solved by the Fourier transform

Page 25: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

25When x(t) = triangular signal + chirp noise exp[j 0.25(t 4.12)2]

-10 -5 0 5 10-0.5

0

0.5

1

1.5

-10 -5 0 5 10-1

0

1

2

-10 -5 0 5 10-1

0

1

2

-10 -5 0 5 10-0.5

0

0.5

1

1.5

Fourier transform of x(t) x(t) = signal + noise

fractional Fourier transform of x(t)

(separable)

(non-separable)

recovered signal

Page 26: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

26

The Fourier transform is suitable to filter out the noise that is a combination of sinusoid functions exp(j0t).

The fractional Fourier transform (FRFT) is suitable to filter out the noise that is a combination of higher order exponential functions exp[j(nk tk + nk-1 tk-1 + nk-2 tk-2 + ……. + n2 t2 + n1 t)]

For example: chirp function exp(jn2 t2)

With the FRFT, many noises that cannot be removed by the FT will be filtered out successfully.

Page 27: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

27

horizon: t-axis, vertical: f-axis

FRFT = with angle

The Gabor Transform for the FRFT of the rectangular function.

-5 0 5-5

0

5

-5 0 5-5

0

5

-5 0 5-5

0

5

-5 0 5-5

0

5

-5 0 5-5

0

5

-5 0 5-5

0

5

[Theorem] The FRFT with parameter is equivalent to the clockwise rotation operation with angle for Wigner distribution functions (or for Gabor transforms)

= 0 (identity), /6 2/6 /2 (FT) 4/6 5/6

From the view points of Time-Frequency Analysis:

[Ref 1] S. C. Pei and J. J. Ding, “Relations between Gabor transforms and fractional Fourier transforms and their applications for signal processing,” IEEE Trans. Signal Processing, vol. 55, no. 10, pp. 4839-4850, Oct. 2007.

Page 28: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

28 Filter designed by the fractional Fourier transform

o F F ix t O O x t H u

f-axis

Signal noise

t-axis

FRFT FRFT

noise Signal

cutoff line

Signal

cutoff line

noise

( ) ( ( )) ( )o ix t IFT FT x t H f比較: Filter Designed by the Fourier transform

Page 29: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

29以時頻分析的觀點,傳統濾波器是垂直於 f-axis 做切割的

t-axis

f0

f-axis

cutoff linepass band

stop band

而用 fractional Fourier transform 設計的濾波器是,是由斜的方向作切割

u0

f-axis

cutoff line

pass band

stop band

cutoff line 和 f-axis 在逆時針方向的夾角為

Page 30: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

30

-10 -5 0 5 10-10

-8

-6

-4

-2

0

2

4

6

8

10

Signal

noise

t-axis

fractional axis

Gabor Transform for signal + 0.3exp[j0.06(t1)3 j7t]

Advantage: Easy to estimate the character of a signal in the fractional domain Proposed an efficient way to find the optimal parameter

Page 31: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

31

In fact, all the applications of the Fourier transform (FT) are also the applications of the fractional Fourier transform (FRFT), and using the FRFT instead of the FT for these applications may improve the performance.

Filter Design : developed by us improved the previous works

Signal synthesis (compression, random process, fractional wavelet transform)

Correlation (space variant pattern recognition)

Communication (modulation, multiplexing, multiple-path problem)

Sampling

Solving differential equation

Image processing (asymmetry edge detection, directional corner detection)

Optical system analysis (system model, self-imaging phenomena)

Wave propagation analysis (radar system, GRIN-medium system)

Page 32: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

32 Invention:

[Ref 2] N. Wiener, “Hermitian polynomials and Fourier analysis,” Journal of Mathematics Physics MIT, vol. 18, pp. 70-73, 1929.

Re-invention

[Ref 3] V. Namias, “The fractional order Fourier transform and its application to quantum mechanics,” J. Inst. Maths. Applics., vol. 25, pp. 241-265, 1980.

Introduction for signal processing

[Ref 4] L. B. Almeida, “The fractional Fourier transform and time-frequency representations,” IEEE Trans. Signal Processing, vol. 42, no. 11, pp. 3084- 3091, Nov. 1994.

Recent development

Pei, Ding (after 1995), Ozaktas, Mendlovic, Kutay, Zalevsky, etc.

Page 33: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

33 My works related to the fractional Fourier transform (FRFT)

Extensions: Discrete fractional Fourier transform

Fractional cosine, sine, and Hartley transform,

Two-dimensional form, N-D form,

Simplified fractional Fourier transform

Fractional Hilbert transform,

Solving the problem for implementation

Foundation theory: relations between the FRFT and the well-known time-frequency analysis tools (e.g., the Wigner distribution function and the Gabor transform)

Applications: sampling, encryption, corner and edge detection, self-imaging phenomena, bandwidth saving, multiple-path problem analysis, random process analysis, filter design

Page 34: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

344. Wavelet Transform

只將頻譜分為「低頻」和「高頻」兩個部分,大幅簡化了 Fourier transform

( 對 2-D 的影像,則分為四個部分 )

x[n]

g[n]

2

x1,L[n]

x1,H[n]

2

h[n]

「低頻」部分

「高頻」部分

Example: g[n] = [1, 1], h[n] = [1, -1]

or

0.0106 0.0329 0.0308 0.1870 0.0280 0.6309 0.7148 0.2304g n

0.2304 0.7148 0.6309 0.0280 0.1870 0.0308 0.0329 0.0106h n

Page 35: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

35

The result of the wavelet transform for a 2-D image

lowpass for x

lowpass for y

lowpass for x

highpass for y

highpass for x

lowpass for y

highpass for x

highpass for y

Page 36: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

36

-- JPEG 2000 (image compression)

-- filter design

-- edge and corner detection

-- pattern recognition

-- biomedical engineering

Applications for Wavelets

Page 37: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

375. Image Compression

Conventional JPEG method:

Separate the original image into many 8*8 blocks, then using the DCT to code each blocks.

DCT: discrete cosine transform

PS: 感謝 2008 年畢業的黃俊德同學

Page 38: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

38

壓縮的基本原理:

影像在經過 discrete cosine transform (DCT) 之後,大部分的能量都集中在低頻

DCT

Page 39: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

39

JPEG 是當前最普及的影像壓縮格式。

問題:壓縮率高的時候,會產生 blocking effect

Compression ratio = 53.4333RMSE = 10.9662

Page 40: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

40New Method: Edge-Based Segmentation and Compression

和小時候畫圖的方法類似

Page 41: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

41

Image Segment Compression

Bit stream

ImageSegmentation

Boundary Compression

Image Segment

Boundary

An image

• Segmentation-based image compression

Page 42: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

42

Original Image By JPEG

An 100x100 image Bytes: 1295, RMSE: 2.39

By Proposed Method

Bytes: 456, RMSE: 2.54

Page 43: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

43

50 100

50

100

50 100

50

10050 100

50

100

原圖 (10000 bytes)

使用 JPEG (233 bytes)

50 100

50

100

使用 JPEG (692 bytes)

使用新方法 (165 bytes)

Page 44: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

44

技術上的問題:

(1) 如何找到物體的邊緣並切割? ( 努力中 )

(2) 如何針對不規則的區域,找到 orthogonal transform ( 已解決 )

(3) 如何避免讓邊緣區域的高頻成分影響到壓縮的結果 ( 已解決 )

(4) 如何用最小的資料量,對邊界的部分做紀錄 ( 已解決 )

(5) 如何用最小的資料量,對內部的部分做紀錄 ( 努力中 )

(6) 減少壓縮和解壓縮的運算時間 ( 努力中 )

Page 45: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

456. Edge and Corner Detection

Why should we perform edge and corner detection?

--Segmentation

--Compression

20 40 60 80 100

10

20

30

40

50

60

70

80

90

100

20 40 60 80 100

20

40

60

80

10020 40 60 80

20

40

60

80

Page 46: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

46

0 20 40 60 80 100-1

0

1

2

0 20 40 60 80 100-1

0

1

2

0 20 40 60 80 100-1

0

1

2

0 20 40 60 80 100-1

0

1

2

Input Difference

Simplest way for edge detection: differentiation

Page 47: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

47

Other ways for edge detection: convolution with a longer odd function

Doing difference x[n] x[n1] = x[n] (convolution) with h[n].

h[n] = 1 for n = 0,

h[n] = -1 for n = 1,

h[n] = 0 otherwise.

x[n]

Page 48: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

48

50 100 150 200 250

50

100

150

200

25050 100 150 200 250

50

100

150

200

250

by Harris’ algorithm by proposed algorithm

Corner Detection

Page 49: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

497. Segmentation

Important for compression

biomedical engineering

object identification

Page 50: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

50

Conventional method:

97.87 sec

New method:

1.02 sec

Page 51: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

51

未受過傷的老鼠肌肉纖維 受過傷的老鼠肌肉纖維

Page 52: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

52

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

未受過傷的老鼠肌肉纖維「分區」的結果

Page 53: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

53

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

50100150200250

受過傷的老鼠肌肉纖維「分區」的結果

Page 54: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

548. Pattern Recognition

應用很廣: security,

identification,

computer vision …………

including face recognition

character recognition

Page 55: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

55

最簡單的方法: matched filter

但技術上的問題頗多……… .

scaling

shadow

rotation

partially distortion

其他的方法: 特徵拮取

臉有哪些特徵?

, , , , ,y m n x m n h m n x m n h

Page 56: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

56

xAy

),()3,()2,()1,(

),3()3,3()2,3()1,3(

),2()3,2()2,2()1,2(

),1()3,1()2,1()1,1(

NNANANANA

NAAAA

NAAAA

NAAAA

A

10. Integer Transform Conversion Integer Transform: The discrete linear operation whose entries are summations of 2k.

, ak = 0 or 1 or , C is an integer. k

kkanmA 2,

b

CnmA

2,

Page 57: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

57

310.0520.0210.0

320.0273.0593.0

113.0584.0297.0

A

16/516/816/3

16/516/416/9

16/216/916/5

B

713.1110.1006.1

649.0274.0006.1

625.0961.0006.11A

16/2716/1816/16

16/1016/416/16

16/1016/1516/16~B

IBB ~

Problem: Most of the discrete transforms are non-integer ones.

DFT, DCT, Karhunen-Loeve transform, RGB to YIQ color transform

--- To implement them exactly, we should use floating-point processor

--- To implement them by fixed-point processor, we should approximate it by an integer transform.

However, after approximation, the reversibility property is always lost.

Page 58: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

58Integer RGB to YCbCr Transform

310.0520.0210.0

320.0273.0593.0

113.0584.0297.0

A0.25 0.5 0.25

1 1 0

0 1 1

B

1 0.75 0.25

1 0.25 0.25

1 0.25 0.75

B

713.1110.1006.1

649.0274.0006.1

625.0961.0006.11A

B B IThis is used in JPEG 2000.

Page 59: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

59

[Integer Transform Conversion]:

Converting all the non-integer transform into an integer transform that achieve the following 6 Goals:

A, A-1: original non-integer transform pair, B, B ̃: integer transform pair

(Goal 1) Integerization , , bk and b- k are integers.

(Goal 2) Reversibility .

(Goal 3) Bit Constraint The denominator 2k should not be too large.

(Goal 4) Accuracy B A, BA A-1 (or B A, BA -1A-1)

(Goal 5): Less Complexity

(Goal 6) Easy to Design

kkb

nmB2

, kkb

nmB2

~,

~

IBB ~

Page 60: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

60

Development of Integer Transforms:

(A) Prototype Matrix Method (Partially my work)(suitable for 2, 4, 8 and 16-point DCT, DST, DFT)

(B) Lifting Scheme

(suitable for 2k-point DCT, DST, DFT)

(C) Triangular Matrix Scheme

(suitable for any matrices, satisfies Goals 1 and 2)

(D) Improved Triangular Matrix Scheme (My works)

(suitable for any matrices, satisfies Goals 1 ~ 6)

Page 61: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

61

References Related to the Integer Transform

[Ref. 1] W. K. Cham, “Development of integer cosine transform by the principles of dynamic symmetry,” Proc. Inst. Elect. Eng., pt. 1, vol. 136, no. 4, pp. 276-282, Aug. 1989.

[Ref. 2] S. C. Pei and J. J. Ding, “The integer Transforms analogous to discrete trigonometric transforms,” IEEE Trans. Signal Processing, vol. 48, no. 12, pp. 3345-3364, Dec. 2000.

[Ref. 3] T. D. Tran, “The binDCT: fast multiplierless approximation of the DCT,” IEEE Signal Proc. Lett., vol. 7, no. 6, pp. 141-144, June 2000.

[Ref. 4] P. Hao and Q. Shi., “Matrix factorizations for reversible integer mapping,” IEEE Trans. Signal Processing, vol. 49, no. 10, pp. 2314-2324, Oct. 2001.

[Ref. 5] S. C. Pei and J. J. Ding, “Reversible Integer Color Transform with Bit-Constraint,” accepted by ICIP 2005.

[Ref. 6] S. C. Pei and J. J. Ding, “Improved Integer Color Transform,” in preparation

Page 62: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

62

12. Optical Signal Processing and Fractional Fourier Transform

lens, (focal length = f)

free space, (length = z1) free space, (length = z2)

f = z1 = z2 Fourier Transform

f z1, z2 but z1 = z2 Fractional Fourier Transform (see page 20)

f z1 z2 Fractional Fourier Transform multiplied by a chirp

Page 63: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

63Depth recovery:

如何由照片由影像的模糊程度,來判斷物體的距離

註:感謝 2008 年畢業的的林于哲同學

Page 64: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

64

There are four types of nucleotide in a DNA sequence: adenine (A), guanine (G), thymine (T), cytosine (C)

Unitary Mapping

bx[] = 1 if x[] = ‘A’, bx[] = 1 if x[] = ‘T’, bx[] = j if x[] = ‘G’, bx[] = j if x[] = ‘C’.

y = ‘AACTGAA’, by = [1, 1, j, 1, j, 1, 1].

14. Discrete Correlation Algorithm for DNA Sequence Comparison

[Reference] S. C. Pei, J. J. Ding, and K. H. Hsu, “DNA sequence comparison and alignment by the discrete correlation algorithm,” submitted.

Page 65: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

65

Discrete Correlation Algorithm for DNA Sequence Comparison

For two DNA sequences x and y, if

where

Then there are s[n] nucleotides of x[n+] that satisfies x[n+] = y[].

Example: x = ‘GTAGCTGAACTGAAC’, y = ‘AACTGAA’,

.

x = ‘GTAGCTGAACTGAAC’, y (shifted 7 entries rightward) = ‘AACTGAA’.

1 22Re

4nz n z n L

s n

1 x yz n b n b n

]0,1,3,1,0,0,2,7,2,0,0,1,6,2,0,1,1,1,2,0,0[141312721016 n

s n

Page 66: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

66

Example: x = ‘GTAGCTGAACTGAAC’, y = ‘AACTGAA’,

s[n] = .

Checking:

x = ‘GTAGCTGAACTGAAC’, y = ‘AACTGAA’. (no entry match)

x = ‘GTAGCTGAACTGAAC’, y = (shifted 2 entries rightward) ‘AACTGAA’. (6 entries match)

x = ‘GTAGCTGAACTGAAC’, y (shifted 7 entries rightward) = ‘AACTGAA’. (7 entries match)

]0,1,3,1,0,0,2,7,2,0,0,1,6,2,0,1,1,1,2,0,0[141312721016 n

Page 67: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

67

Advantage of the Discrete Correlation Algorithm:

---The complexity of the conventional sequence alignments is O(N2)

---For the discrete correlation algorithm, the complexity is reduced to O(N log2N) or O(N log2N + b2) b: the length of the matched subsequences

Experiment: Local alignment for two 3000-entry DNA sequences

Using conventional dynamic programming Computation time: 87 sec. Using the proposed discrete correlation algorithm: Computation time: 4.13 sec.

Page 68: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

6815. Quaternion 翻譯成“四元素”, Generalization of complex number

Complex number: a + ib i2 = 1

real part imaginary part

Quaternion: a + ib + jc + kd i2 = j2 = k2 = 1

real part 3 imaginary parts

[Ref 18] S. C. Pei, J. J. Ding, and J. H. Chang, “Efficient implementation of quaternion Fourier transform,” IEEE Trans. Signal Processing, vol. 49, no. 11, pp. 2783-2797, Nov. 2001.

[Ref 19] S. C. Pei, J. H. Chang, and J. J. Ding, “Commutative reduced biquaternions for signal and image processing,” IEEE Trans. Signal Processing, vol. 52, pp. 2012-2031, July 2004.

Page 69: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

69Application of quaternion a + ib + jc + kd:

--Color image processing

a + iR + jG + kB represent an RGB image

--Multiple-Channel Analysis

4 real channels or 2 complex channels

a

b

c

d

a+jb

c+jd=

Page 70: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

70實驗室研究的規定(1) 原則上,一週 meeting 一次

(a) 碩二上學期的其中二週 ( 腦力激盪 ) 和碩二下學期 4 月 5 月 ( 準備碩士論文口試 ) ,將一週 meeting 二次

例外:

(b) 碩一上下學期可以選三週不必 meeting ,碩二上學期每個學期可以選二週不必 meeting ,以準備學校的考試(c) 碩二下學期碩士論文口試 (5 月底 ) 結束之後,只需再 meeting 一次即可。

(2) 碩一升碩二的暑假,要參加國內的研討會 CVGIP

Take it easy ,雖然是學術研討會,就當作是旅行就可以了。

(3) 畢業之前,都要有自己創新的新點子

創新,是研究所教育和大學教育之間最大的不同

(d) 農曆新年休息二週,預官考試休息一週。

Page 71: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

71

(5) 畢業之前,希望大家至少能曾經幫忙寫過一篇研討會論文

(6) 每週 meeting 所規定的工作,儘可能達成。

但如果已經盡了力仍然難以達成目標,我是可以接受的。

(7) 只要有事情,不管是什麼原因,一律都可以請假,或延後 meeting 時間。

但如果請假一週,將來要選一週補回來 (也就是那一週要 meeting 二次 )

(4) 碩一上學期和下學期四月以前,同學們可以自由選擇有興趣的題目來研究,每三個月可以換一次題目。

到了碩一下學期四月,則要從我所列出的 10 個研究領域,選擇一個領域 ( 自由選擇 ) ,來當成將來碩士論文的研究主題。

Page 72: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

72

(10) 這一屆的同學,第一次 meeting 的時間是 2010 年 7 月底。

(9) 每學期會有二至三次的導生會,歡迎學生多多參加。

(8) 每三個月將請同學針對自己所研究的領域,做一次口頭報告。

一方面,讓其他同學了解你的研究 (你也同時了解其他同學的研究 ) ,一方面,也訓練演講和報告的能力。

Page 73: 1 丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室 聯絡電話: (02)33669652 Major : Digital Signal Processing

73

研究所的生活,和大學比起來,更有彈性 ,但是也離近入社會更近。

希望各位同學能妥善運用時間,好好充實自已,

並且多訓練自己「創造發明」以及「思考」的能力