期末 DEMO line segment 的 GPU 實現

28
Electrical Engineering Department of National Cheng Kung University Smart Media & Intelligent Living Excellence Lab. 1 2012/08/14 指指指指 指指指指指 指指指 指指指 指指 指指 DEMO DEMO line segment line segment GPU GPU 指指 指指

description

期末 DEMO line segment 的 GPU 實現. 2012/08/14 指導教授:詹寶珠教授 報告者:陳正旻. Outline. 演算法流程介紹 ( 附實作結果 ) 時間比較和加速倍數 實作影片 總結. Flow chart. Algorithm. Line segment construction Two rules Color difference : Spatial distance :. (TIME)Line segment construction. Flow chart. Algorithm. Left. Right. - PowerPoint PPT Presentation

Transcript of 期末 DEMO line segment 的 GPU 實現

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab. 1

2012/08/14指導教授:詹寶珠教授

報告者:陳正旻

期末期末 DEMO DEMO line segmentline segment 的的 GPUGPU 實現實現

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab. 2

OutlineOutline

演算法流程介紹 ( 附實作結果 )

時間比較和加速倍數實作影片總結

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

Flow chartFlow chart

3

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

AlgorithmAlgorithm

Line segment construction

Two rules• Color difference :

• Spatial distance :

4

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

(TIME)Line segment construction(TIME)Line segment construction

5

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

Flow chartFlow chart

6

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

AlgorithmAlgorithm

Initial Disparity Computation

Matching cost :

• CAD :

• CCENSUS : Hamming distance of the two strings that stand for p and pd

7

String

R. Zabih and J. Woodfill, “Non-parametric local transforms for computing visual correspondence,” in Proc. ECCV, 1994, pp. 151–158.

d=1Left Right

2

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

(TIME)Initial Disparity Computation(TIME)Initial Disparity Computation& Matching cost& Matching cost

8

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

AlgorithmAlgorithm

Cost aggregation

Winner-take-all

9d=1

Left Right

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

(TIME)Cost aggregation(TIME)Cost aggregation& Winner-take-all& Winner-take-all

10

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

初步結果初步結果

左圖的 Depth 右圖的 Depth

11

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

Flow chartFlow chart

12

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

AlgorithmAlgorithm

Seed Pixel Detection

Two rules

13

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

(TIME)Seed Pixel Detection(TIME)Seed Pixel Detection

14

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

Flow chartFlow chart

15

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

AlgorithmAlgorithm

Scanline Propagation

• Aa , if p is in occluded regions.

• d

• Ss , if p is near depth discontinuities.

• a

• is replaced by the linearly interpolated results of and in all other conditions.

16

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

(TIME)Scanline Propagation(TIME)Scanline Propagation

17

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

Scanline PropagationScanline Propagation 之後的結果之後的結果

18

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

Flow chartFlow chart

19

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

AlgorithmAlgorithm

Disparity Refinement• Vertical voting : We collect 𝑁 disparity votes in a vertical

line segment that starts at pixel and ends at pixel

,if the color difference is smaller than the threshold value 𝜏 , the votes on disparity increase by 1.

• c

20

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

(TIME)Vertical voting(TIME)Vertical voting

21

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

Vertical votingVertical voting 之後的結果之後的結果

22

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

再加入再加入 BilateralFilterBilateralFilter 之後的最終結果之後的最終結果

23

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

GPU 運算時間

CPU 運算時間

24

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

時間比較和加速倍數時間比較和加速倍數LineSegment

漢明距離 單點 cost 總 cost

CPU 0.114000 (S) 0.481999 0.973999 0.352999

GPU 0.002498 (S) 0.004868 0.091873 0.016956

加速 約 45 ( 倍 ) 約 99 ( 倍 ) 約 11 ( 倍 ) 約 21 ( 倍 )

25

Seedpixel

ScanLine

Verticalvoting

DBF GPU 總時間

0.020000 0.017000 0.098000 2.059997

0.000033 0.000239 0.002314 0.002 0.120781

約 606 ( 倍 ) 約 71 ( 倍 ) 約 42 ( 倍 ) 約 18 ( 倍 )

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

實作影片實作影片

26

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

總結總結

GPU 加速持續改進。再加入各種不同方法使結果更好。

27

Electrical Engineering Department of National Cheng Kung University

Smart Media & Intelligent Living Excellence Lab.

Thank for your attention!

28