vlsi signal processing lab, institute of electronics national chiao tung university, hsinchu, taiwan...
Post on 20-Dec-2015
223 views
TRANSCRIPT
2007/07/19
VL
SI S
ign
al P
roc
es
sin
g L
ab
, Ins
titute
of E
lec
tron
ics
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Segmentation with raster sliding local window
Nelson ChangInstitute of Electronics,
National Chiao Tung University
2007/07/19 2
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Outline
• Stereo Matching with Segment• Traditional Watershed-based Segmentation• Downfall of tradition segmentation methods• Proposed Raster Sliding Local Window Method• Result• Future work
2007/07/19 3
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Census Diffusion WITHOUT Segmentation
2007/07/19 4
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Census Diffusion WITH segmentation
2007/07/19 5
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Mean Shift vs. Watershed
Mean Shift
Watershed
2007/07/19 6
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Traditional Watershed-based Segmentation
• Steps– Generate Gradient Map– Reconstruction/Global Denoise– Watershed flooding or Rain dropping– Region Merging
2007/07/19 7
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
What makes an algorithm efficient to implement?
• Regular– Simple control– High data reusability
• Parallel– More scalable
• Small storage– Lower cost– More fast memory usage
state 0
state 1state 2
state 0
state 1state 2
state 3
state 4
PE PE PE PE PE
PE
PE
PE
4x speed up!!
Data reuse!!!
Simple FSM
Fast SRAM
Slow SDRAM
Temporary Data
Temporary Data
2007/07/19 8
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Traditional Watershed and Topoggan
• Watershed Flooding– Bottom-up
• Finds the minimum first
Irregular jumpy access pattern
HW: hard to reuseSW: low cache hit
2007/07/19 9
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Traditional Watershed and Topoggan
• Topoggan Rain Dropping– Top-down
• Finds the maximum peak first• Drop rain• Back trace the path
Back trace water flow path(tree traversal)
Irregular access start pointHW: less chance to reuse
SW: more cache missMore regular local access
pattern than watershed
High data dependencyHW: less parallelism
availableSW: not much impact
2007/07/19 10
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Our Goal
• Regular process and access pattern• Avoid tree traversal/tree traversal• Minimize iteration count
2007/07/19 11
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Overview (1/3)
• Flowchart
Read image information
gradient
Local-approach segmentation
start
Done
2007/07/19 12
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Gradient Generation (0th Iteration)
• Color space– YUV– Select the maximal gradient among the three components
• Gradient - Mathematical morphology – ABS(Dilation – Erosion)
• Dilation : Max in 3x3 square window
• Erosion : min in 3x3 square window
16 9 8
7 10 10
6 10 5
Gradient = 16-5 = 11
2007/07/19 13
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Local approachLocal
approach
Local de-noise
Basin/plateau?
Assign 3x3 window to
same regionDo nothing
Done image?
yes no
no
a
a
x has label?
N(x) ≥ x & N(x) has no label
Diffuse label upward
Do nothing
Done image?
Done
yes
yes no
yes
no
2007/07/19 14
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Local Denoise (1st Iteration)
i j k
l x m
n o p
Neighbor of x N(x) = {i, j, k, l, m, n, o, p}Gradient of x G(x)Gradient after local denoise G’
For each N(x), If | G(x) - G(N(x)) | < TH, G’(N(x) = G(x) Else G’(N(x)) = G(x)
19 24 82
37 30 38
10 13 12
G
19 30 82
30 30 30
10 13 12
G’
TH=10
2007/07/19 15
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
An Example of Local Denoise
• G’ (Gradient after local denoise) of an overlapping pixel in two neighboring windows may be different
19 24 82
37 30 38
10 13 12
G
19 30 82
30 30 30
10 13 12
G’
TH=1042
10
29
24 82 38
38 38 10
10 13 38
G’
2007/07/19 16
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Adaptive Bi-threshold
• TH for the next window changes– Current window is a plateau/basin
• Next TH = TH_max
– Else• Next TH = TH_min
Plateau/Basin
Use TH_max
Possible Edge/Hill
Use TH_min
Current Next
2007/07/19 17
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Basin/Plateau Detection (1st Iteration)
Neighbor of x N(x) = {i, j, k, l, m, n, o, p}Gradient of x G(x)Gradient after local denoise G’Segment (Region) Label of x L(x)
For all N(x), If G’(N(x)) – G’(x) ≥ 0, L(x) = all L(N(x)) Else L(x) = no label
20 45 20
62 20 31
32 20 20
G’ L
No original label on N(x)
L
One N(x) already has labelBasin
2007/07/19 18
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Segment Label Aliasing (1st Iteration)
• For a basin/plateau
L
More than one N(x) already having different label
Set label alias
=
=
===
=
===
Label Alias Table
update
2007/07/19 19
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Label Upward Diffusion (2nd~Nth Iteration)
Neighbor of x N(x) = {i, j, k, l, m, n, o, p}Gradient of x G(x)Segment (Region) Label of x L(x)
For each N(x), If L(N(x)) = no label AND G(N(x)) – G(x) ≥ 0, L(N(x))=L(x) Else L(N(x)) = no label
19 24 82
37 30 38
10 13 12
G L
This can be done for more than 1 iterations
2007/07/19 20
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Label Replacement (N+1 Iteration)
• Update each pixel’s label– Use Label Alias Table– Similar to region (segment) merging
=
===
=
===
Label Alias Table
2007/07/19 21
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Segmentation with Raster Sliding Local Window
Watershed
Raster Sliding Window
2007/07/19 22
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Results
2007/07/19 23
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
2007/07/19 24
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
2007/07/19 25
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
2007/07/19 26
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Ranking
• CDS stereo matching performance comparison on Middleburry website
2007/07/19 27
VL
SI S
ign
al P
roc
es
sin
g L
ab
Na
tion
al C
hia
o T
un
g U
niv
ers
ity, H
sin
ch
u, T
aiw
an
Platform-Based Design Group
Future work
• Complexity analysis – Algorithmic Complexity– Operation Complexity– SW execution– Storage Requirement
• Hardware implementation– ISCAS’09
• Refine performance– Boundary improvement– Label alias issue