丁建均 (jian-jiun ding) national taiwan university 辦公室:明達館 723 室,...

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

Upload: alvin-mccoy

Post on 30-Dec-2015

206 views

Category:

Documents


0 download

DESCRIPTION

丁建均 (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室. 聯絡電話: (02)33669652 Major : Digital Signal Processing Digital Image Processing. Research Fields [A. Image Processing] (1) Image Compression (page 4) - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

1

丁建均 (Jian-Jiun Ding)

National Taiwan University

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

聯絡電話: (02)33669652

Major : Digital Signal Processing

Digital Image Processing

Page 2: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

2Research Fields

[A. Image Processing]

(1) Image Compression (page 4)

(2) Edge and Corner Detection (page 14)

(3) Segmentation (page 17)

(4) Pattern Recognition (Face, Character, Video) (page 24)

(5) Optical Image Processing (page 28)

(6) Others: Biomedical Image Processing, Banknote Reconstruction, Dehaze, Scene Classification (page 37)

[B. Time-Frequency Analysis]

(7) Time-Frequency Analysis (page 44)

(8) Music Signal Analysis (page 61)

(9) Wavelet Transform (page 65)

紅字是目前有同學在研究的領域

Page 3: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

3

[C. Fast Algorithms]

(10) Integer Transforms (including Walsh transforms, Number Theory) (page 69)

[D. Applications of Signal Processing]

(11) Bioinformatics (page 75)

(12) 3-D Accelerometer (page 79)

[E. Other Topics]

(13) ECG Signal Analysis (page 82)

(14) Structure Similarity

(15) Others (Quaternion, Filter Design, …)

實驗室的規定 (page 86)

Page 4: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

41. 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 5: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

5

壓縮的基本原理:

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

DCT

Page 6: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

6

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

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

Compression ratio = 53.4333RMSE = 10.9662

Page 7: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

7New Method: Edge-Based Segmentation and Compression

和小時候畫圖的方法類似

Page 8: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

8

Image Segment Compression

Bit stream

ImageSegmentation

Boundary Compression

Image Segment

Boundary

An image

• Segmentation-based image compression

Page 9: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

9

Original Image By JPEG

An 100x100 image Bytes: 1295, RMSE: 2.39

By Proposed Method

Bytes: 456, RMSE: 2.54

Page 10: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

10

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 11: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

11

折衷的方法:

既不按照 88 的方格來做切割,也不完全按照物體的形狀

Triangular and Trapezoid ( 梯形 ) Block Segmentation

50 100

50

100

J. J. Ding, Y. W. Huang, P. Y. Lin, S. C. Pei, H. H. Chen, and Y. H. Wang, "Two-dimensional orthogonal DCT expansion in trapezoid and triangular blocks and modified JPEG image compression," IEEE Trans. Image Processing, vol. 22, issue 9, pp. 3664-3675, Sept. 2013

Page 12: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

12

技術上的問題:

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

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

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

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

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

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

(7) 減少 buffer size 的需求,讓演算法能在手機中執行 ( 努力中 )

(8) 如何在少影響人眼視覺的前提下,讓資料量減少至極限? ( 努力中 )

J. J. Ding, P. Y. Lin, J. D. Huang, T. H. Lee, and H. H. Chen, “Morphology-based shape adaptive compression,” Lecture Notes in Computer Science, vol. 6524, pp. 168-176, Jan. 2011

J. J. Ding, H. H. Chen, and W. Y. Wei, “Adaptive Golomb code for joint geometrically distributed data and its application in image coding,” IEEE Trans. Circuits Syst. Video Technol., vol. 23, issue 4, pp. 661-670, Apr. 2013

Page 13: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

13

什麼是影像壓縮技術的極限?

Page 14: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

142. Edge and Corner Detection

Why should we perform edge and corner detection?

--Segmentation

--Compression

--Efficient for Processing

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 15: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

15

The most efficient way to trace an object in video:

(1) Edges

(2) Corners

(3) SIFT Points

(4) SURF, FAST, BRISK, ORB, FREAK….. Other Feature Points

當前 edge detection 技術 已經有很好的效果 (Ex: Canny’s algorithm)但 corner detection 的結果,仍常受到 noise 影響

Page 16: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

16

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 17: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

17

3. Segmentation

Important for (i) compression

(ii) biomedical engineering

(iii) pattern recognition, object identification

Page 18: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

18

Conventional method:

97.87 sec

New method:

1.02 sec

2009 年的成果

Page 19: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

2015 年的成果(These results are obtained without tuning any parameter)

Page 20: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

Some segmentation results(These results are obtained without tuning any parameter)

Page 21: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

Some segmentation results(These results are obtained without tuning any parameter)

Page 22: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

22

我們的方法原圖來自於 Berkeley segmentation database

Page 23: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

23

我們的方法原圖來自於 http://www.indonetwork.co.id/ud_barokah_co/1196034

Page 24: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

244. Pattern Recognition

應用很廣: security,

identification,

computer vision …………

including face recognition

character recognition

Page 25: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

25文字辨識: (1) 辨識所寫的文字 (2) 辨識筆跡 ( 辨識書寫者 )這部分的研究,和政府機關合作

A

B

1

文字辨識

Page 26: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

26

Class 1

Class 2

Class 3

人臉辨識

Page 27: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

27

最簡單的方法: matched filter

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

scaling

shadow

rotation

partially distortion

目前較常用的方法: Feature Extraction + Machine Learning

臉有哪些特徵?

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

Page 28: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

285. Optical Image Processing

Depth recovery:

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

並且進一步重建出清楚的影像

這部分的研究,目前正在和工研院以及 Qualcomm 合作

Page 29: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

29

, , , ,b m n i m n k m n m n

Model for Blurred Images

i[m, n]: the original image b[m, n]: blurred image

k[m, n]: some point spread function *: convolution

σ[m, n]: noise

A blurred image may cause from

(1) defocus ( 和工研院合作 )

(2) hand-shaking ( 和 Qualcomm 合作 )

Page 30: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

30

, , , ,b m n i m n k m n m n

Alternative ways:

(1) Wiener filter (2) Richardson-Lucy Methods

(3) Fourier Optics (4) Norm-Prior Based Methods (Levin, Krishnan)

(5) Others

,,

,

FT b m ni m n IFT

FT k m n

What is the problem?

Simplest way

Page 31: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

31

Blurred Image

Reconstructed ImageBlurred Image

Reconstructed Image

W. D. Chang, J. J. Ding, Y. Chen, C. W. Chang, and C. C. Chang, “Edge-membership based blurred image reconstruction algorithm,” APSIPA Annual Summit and Conference, Hollywood, USA, Dec. 2012

Page 32: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

32Blurred Image

Page 33: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

33

Y. Chen, J. J. Ding, W. S. Lai, Y. J. Chen, C. W. Chang, and C. C. Chang, “High quality image deblurring scheme using the pyramid hyper-Laplacian L2 norm priors algorithm,” Advances in Multimedia Information Processing, Lecture Notes in Computer Science, vol. 8294, pp. 134-145, Dec. 2013

Reconstructed Image

Page 34: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

34

• Blurred:

• Deblurred:

手晃動造成的手機模糊影像還原

Page 35: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

35

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

f z1 z2 Fractional Fourier Transform multiplied by a chirp

Page 36: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

36Light Field Camera

Page 37: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

376. Other Applications of Image Processing

(1) Biomedical Image Processing ( 曾經和應力所、光電所合作 )

(2) Banknote Reconstruction ( 曾經和政府機關合作 )

(3) Image Dehaze ( 影像去霧去霾,曾經和 Qualcomm 合作 )

(4) Scene Classification ( 目前和 Qualcomm 合作 )

(5) Motion Identification by Videos ( 目前和 Qualcomm 合作 )

(6) Subpixel rendering ( 目前瑞鼎合作 )

Page 38: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

38

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

Page 39: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

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

Page 40: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

40

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

J. J. Ding, Y. H. Wang, L. L. Hu, W. L. Chao, and Y. W. Shau, “Muscle injury determination by image segmentation,” VCIP, accepted, Tainan, Nov. 2011

Page 41: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

41 大腦核磁共振影像 (Brain MRI Image)

(a) Brain MRI Image (b) White Matter ( 白質 )

(c) Gray Matter ( 灰質 ) (d) 腦髓液蛋白,頭蓋骨

http://mouldy.bic.mni.mcgill.ca/brainweb/

Page 42: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

42

Banknote Reconstruction

Page 43: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

43

Dehaze

將受到霾害或是霧的影響所照出來的照片,還原成和沒有霧的情形一樣

Scene Classification

Images

Outdoors

Indoors

Mountain

River

Ocean

Street

Page 44: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

44

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

7. Time-Frequency Analysis

Page 45: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

45Example: 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

x(t)

Page 46: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

46

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 47: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

47Several 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 48: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

48Cohen’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 49: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

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

音樂

語音信號

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 50: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

50Applications of Time-Frequency Analysis

(1) Finding Instantaneous Frequency

(2) Signal Decomposition

(3) Filter Design

(4) Sampling Theory

(5) Modulation and Multiplexing

(6) Electromagnetic Wave Propagation

(7) Optics

(8) Radar System Analysis

(9) Random Process Analysis

(10) Music Signal Analysis

(11) Biomedical Engineering

(12) Acoustics

(13) Spread Spectrum Analysis

(14) System Modeling

(15) Image Processing

(16) Economic Data Analysis

(17) Signal Representation

(18) Data Compression

(19) Seismology

(20) Geology

(21) Astronomy, Space Technology

(22) Oceanography

Page 51: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

51

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 52: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

52

Modulation and Multiplexing

not overlapped

spectrum of signal 1

spectrum of signal 2

B1-B1

B2-B2

Page 53: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

53• 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.

1

2j tF e f t dt

dttfj

uFt

juju

j

eee t

22 cot2csccot

2

2

cot1

When = 0.1 performing the FT 0.2 times;

When = 0.25 performing the FT 0.5 times;

When = /6 performing the FT 1/3 times;

Page 54: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

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

54

Page 55: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

55以時頻分析的觀點,傳統濾波器是垂直於 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 56: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

56

-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 57: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

57Improvement of Time-Frequency Analysis

(1) Computation Time

(2) Tradeoff of the cross term problem and clarification

註:時頻分析技術的研究,曾經和國家太空中心合作

( 福衛六號的分析 )

Page 58: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

58

2006.5 2007 2007.5 2008 2008.5 2009 2009.5 2010 2010.5 20110

50

100

150

200

250

300

350

400

450

500

衛星功率信號的時頻圖

Page 59: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

59時頻分析的應用範圍:從海底到太空

ocean crust

satellite

speech, music, voice

over 1000m

over 700 km

vocal signal

communication signal

geology

oceanography

astronomy

Page 60: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

60

由於硬體和輔體技術的快速提升,時頻分析,是未來信號處理的主要趨勢

Page 61: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

618. Music Signal Analysis

目標: 音樂信號搜尋 (Query by Humming)

( 運用音的高低和拍子 )

音樂信號壓縮 ( 當前 MP3 能將音樂壓縮至原信號的 1/5)

Page 62: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

62

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 63: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

63聲音檔: 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 64: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

64

目前的成果: 20秒長度的哼歌,辨識成功率為 100%

但仍有不少精益求精的空間

Page 65: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

659. 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 66: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

66

x[m, n]

g[n]

h[n]

2

2

along n

along n

v1,L[m, n]

v1,H[m, n]

g[m]

h[m]

along m

2 x1,L[m, n]

2along m

x1,H1[m, n]

g[m]

h[m]

along m

along m

2

2

x1,H2[m, n]

x1,H3[m, n]

2-D 的情形

m 低頻 , n 低頻

m 高頻 , n 低頻

m 低頻 , n 高頻

m 高頻 , n 高頻

L-points

L-points

M ×N

n

m ,x m n

Page 67: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

67

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 68: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

68

-- JPEG 2000 (image compression)

-- filter design

-- edge and corner detection

-- pattern recognition

-- biomedical engineering

Applications for Wavelets

Page 69: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

6910. Integer Transform

Discrete Fourier transform (DFT):

2[ , ] expA m n j mn

N

Discrete cosine transform (DCT):

2[ , ] cosmA m n k mn

N

RGB to YCbCr Transform

0.299 0.587 0.114

0.5 0.419 0.081

0.169 0.331 0.5

A

如果它們的 entries 都是整數 ( 或是 C/2b) 該有多好

DFT, DCT 很常用,但是,他們都是無理數… ..

Page 70: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

70

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

• 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 71: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

71

0.299 0.587 0.114

0.5 0.419 0.081

0.169 0.331 0.5

A5 /16 9 /16 2 /16

8 /16 7 /16 1/16

3 /16 5 /16 8 /16

B

1

1 1.4017 0.0009

1 0.7142 0.3437

1 0.0010 1.7722

A

16/16 22/16 0

16/16 11/16 5/16

16/16 0 28/16

B

1 10 / 256 10 / 256

7 / 256 246 / 256 3 / 256

4 / 256 4 / 256 1

B B I

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

DFT, DCT, Karhunen-Loeve transform, RGB to YCbCr 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 72: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

72

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1[ , ]

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

1 1 1 1 1 1 1 1

W m n

1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000 1.0000

1.3870 1.1759 0.7857 0.2759 -0.2759 -0.7857 -1.1759 -1.3870

1.3066 0.5412 -0.5412 -1.30

DCT

66 -1.3066 -0.5412 0.5412 1.3066

1.1759 -0.2759 -1.3870 -0.7857 0.7857 1.3870 0.2759 -1.1759

1.0000 -1.0000 -1.0000 1.0000 1.0000 -1.0000 -1.0000 1.0000

0.7857 -1.3870 0.2759 1.1759 -1.1759 -0.2759 1.3870 -0.7857

0.5412 -1.3066 1.3066 -0.5412 -0.5412 1.3066 -1.3066 0.5412

0.2759 -0.7857 1.1759 -1.3870 1.3870 -1.1759 0.7857 -0.2759

Walsh transform

(applied by CDMA)

Page 73: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

73Integer RGB to YCbCr Transform

0.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

B B I

This is used in JPEG 2000.

0.299 0.587 0.114

0.5 0.419 0.081

0.169 0.331 0.5

A

1

1 1.4017 0.0009

1 0.7142 0.3437

1 0.0010 1.7722

A

Page 74: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

74

[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, BD A-1 (or B A, BD -1A-1)

(Goal 5): Less Complexity

(Goal 6) Easy to Design

kkb

nmB2

, kkb

nmB2

~,

~

IBB ~

Page 75: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

75

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].

11. Bioinformatics

Page 76: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

76

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 77: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

77

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 78: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

78

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 79: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

7912. 3-D Accelerometer ( 三軸加速器 )

許多儀器 (甚至包括智慧型手機 ) 都有配置三軸加速器

x-axis

y-axis

z-axis

如何根據 x, y, z 三個軸的加速度的變化,來判斷姿勢和動作

Page 80: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

80

y-axis

z-axis

y-axisz-axis

y: 0

z: -9.8

y: -9.8sin θ

z: -9.8cos θ

tilted by θ

Page 81: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

81

三軸加速器應用:

動作辨別 (遊戲機 )

運動 (訓練,計步器 )

醫療復健,如 Parkinson 患者照顧( 目前這部分的研究,和台大公衛學院合作 )

Page 82: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

8213. ECG ( 心電圖 ) Signal Analysis

R R

P PQ QS S

T T

典型心電圖

目前和台大醫院合作

Page 83: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

83

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-10

0

10

20

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-10

0

10

20

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5-5

0

5

10

15

(a) The Original Signal (The First ECG Signal in 9.bmp)

(b) Find the Baseline

(c) Subtracted by the Baseline

Page 84: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

84

0 1000 2000 3000 4000 5000 6000 7000 8000-40

-20

0

20

40

0 500 1000 1500 2000 2500 3000 3500 4000-10

0

10

20

30

實際上量測到的心電圖

Page 85: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

85

Can we perform health examination by the ibon machine in 7-11 or at home?

Q1: Telehealth (遠距醫療 )

Q2: Wrist-type Photoplethysmographic (PPG) Signal Analysis (脈膊信號分析 )

Page 86: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

86實驗室研究的規定(1) 原則上,一週 meeting 一次,方式為老師和同學一對一討論

(b) 碩二下準備碩士論文口試前的二至四個月,將一週 meeting 二次

例外:(a) 為了方便準備期中和期末考,修二門課以上可以選三週不必 meeting ,

修一門課每個學期可以選二週不必 meeting

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

Take it easy ,雖然是學術研討會,就當作是旅行就可以了,費用由老師 補助

(3) 希望每位同學,都有自己創新的新點子

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

(d) 農曆新年休息二週

(c) 口試後只需再 meeting 一至二週

Page 87: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

87

(5) 希望大家至少都能曾經幫忙寫過論文

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

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

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

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

(7) 若有事情 meeting 的時間可以自由調整,但不可缺 meeting

Page 88: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

88

(10) 這一屆的同學,第一次 meeting 的時間在 2016 年 8月初。

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

(8) 每個學期,將請同學做一次口頭報告。 ( 內容可以是自己的研究,也可以 是任何一個有意思、且你願意和同學們分享的新知 )

一方面,訓練演講和報告的能力

一方面,希望同學們除了自己的研究之外,也可以藉此了解他人的研究, 以及各種學術上的新知

Page 89: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

89

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

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

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

Page 90: 丁建均  (Jian-Jiun Ding) National Taiwan University 辦公室:明達館 723 室, 實驗室:明達館 531 室

90

鼓勵各位同學多多發揮創意

從不同角度來研究問題

無論是訊號處理和影像處理,都是變化多、富有彈性

很容易創新的領域

歡迎同學們多多展現天馬行空的創意和想像力