42
1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs— Israel) David Malah Technion - Israel Institute of Technology Department of Electrical Engineering Signal and Image Processing Laboratory

1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

Embed Size (px)

Citation preview

Page 1: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

1

Self-dual Morphological Methods Using Tree

Representation

Alla VichikRenato Keshet (HP Labs—

Israel)David Malah

Technion - Israel Institute of Technology Department of Electrical Engineering

Signal and Image Processing Laboratory

Page 2: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

2

This work introduces a general framework for tree-based morphological processing Heart of the scheme: A complete inf-

semilattice (CISL) on a tree-representation domain

Given a tree, we show how to use this CISL to process images

Particular case Extreme-watershed tree Applications shown

Outline

Page 3: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

3Trees in Image Processing A common use of trees:

Represent flat zones of a given image by a tree scheme

Prune tree branches Reconstruct the image Result: Connected filtering

A couple of examples: Binary partition trees (P. Salambier and L.

Garrido, 2000)

Tree of Shapes (P. Monasse and F. Guichard, 2000)

Page 4: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

4Self-Duality

Operator is self-dual, if (f)=-(-f). Same treatment of dark and light objects. Important to many applications, including filtering.

Linear operators are self-dual; Morphological operators are usually not.

Many trees are self-dual and yield self-dual morphological filters

Original Image Erosion by cross SE

Close-open

Open-close

Page 5: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

5The Problem

Trees do not yield morphological adjunctions, openings, closings, etc. Usually connected filters

Size criterion can not be implemented

How to obtain self-dual adjunctions, using trees?

Page 6: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

6

Morphology on Semilattices

Binary (60’s)

Grayscale (70’s)

Lattices (1988)

Semilattices (1998)

Page 7: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

7

Self-duality on inf-semilattices

0

-1 +1

Order: -1 < 0 <1

0

0

Original image-1

Order: -1 > 0 < 1

Flat erosion

+1-1

+1

SE

Traditional complete lattice

DifferenceInf-semilattice(Keshet 1998)

Page 8: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

8Shape-tree semilattice (Keshet, 2005)

Uses the datum of the tree of shapes to define a complete inf-semilattice

Self-dual morphological operators result

A

B

C D 1

0

3 A(0)

B(1)

C(3) D(0)

Tree of Shapes

Page 9: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

9

Our Contribution

Backgroundinf-semilattices

Shape Treesemilattice

Trees

Tree ofShapes

General framework for tree-basedmorphological operators

Extrema-Watershed Tree - basedmorphological operators

Page 10: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

10Tree-based morphology

General framework for tree-based morphology

InputIm age

Tree-domainmorphological

operators

TFiltered

Im age -1T

Tree representation

Page 11: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

11Trees

A tree t = (V, E) is a connected graph with no loops, where V is a set of vertices and E a set of edges connecting vertices.

A rooted tree is a tree with a root vertex.

root

Page 12: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

12

Natural order on rooted trees On a rooted tree, there is a natural

partial order: A vertex a is smaller than b if a is in the

(unique) path connecting b to the root

Rooted Tree

root

b

a

c

Page 13: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

13

Natural order on rooted trees This order turns the

set of vertices into a complete inf-semilattice The least element is the

root The infimum is the

common ancestor (e.g., a is the infimum of {b,c})

Rooted Tree

root

b

a

c

Page 14: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

14Tree representation Tree : t = (V, E) Mapping function : M : R2 V Tree representation : T = (t, M)

TR EEV2

root

V1

V5

V1

V3

V2

V4T

he mapping function

V4V3

V6

Page 15: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

15

The tree representation order For all T1=(t1, M1) and T2=(t2, M2)

V1

V2 V3

V4

V1

V2 V3

V2V3

V4V2 V3V1

T2 T1

V1

Page 16: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

16The tree representation infimum

The tree representation infimum is given by T=(t, M) t is the infimum of the trees t1 and t2, M is the infimum of the mapping functions M1 and M2.

V1

V2 V3

V4

V2V3

V4

T2 V1

V2 V3

V2 V3V1

T1

V5

V5

V1

V2 V3

V2 V3V1

T

V1

Page 17: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

17Tree-domain morphological operators

For flat erosions & dilations: Infima/suprema of translated maps Same tree

Page 18: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

18Tree-domain morphological operators

General framework for tree-based morphology

InputImage T

FilteredImage -1T

Tree representation

Page 19: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

19

What we would like to have: A semilattice of images, associated to each tree transform The order of tree representation induces an order

for images However, the inf-semilattice of tree

representations does not necessarily induce an inf-semilattice of images

For some trees (e.g., the tree of shapes) an image semilattice is obtained

For which trees we get an induced image semilattice? Issue under investigation

Semilattice of images

Page 20: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

20Extrema-Watershed Tree

Example of new operators, obtained from the general framework

Based on new self-dual tree-representation, called Extrema-Watershed Tree (EWT). The tree is built by merging the flat

zones. Smallest extrema (dark or bright)

regions are merged in every step.

Page 21: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

21Building Extrema-Watershed Tree

Extrem a w atershed tree

3

21

V3 V4

V6V1 V2

V5

V0

V7

root

V0

V5

V4

V3

V5

V4V3

V0

V2

V1

V4

V3

V1V2

V4V3

V0

V5 V6

V5

V6

Page 22: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

22EWT-based morphology

EWT erosion and opening are obtained from the general framework.

General framework for tree-based morphology

EWTInputIm age

Tree-domainmorphological

operatorsEWT -1T

FilteredIm ageT

Tree representation

Page 23: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

23Example: EWT Erosion

Original Image EWT-based Erosion by SE 11x11

Page 24: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

24Properties of EWT Self-dual Implicit hierarchical decomposition

Tree is created in watershed-like process Small area extrema are leaves Bigger flat zones are close to root Vertices connected in the tree usually

have similar gray levels

Page 25: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

25Applications

Self-dual morphological preprocessing. Non-connected de-noising. Opening by reconstruction:

Pre-processing for car license plate number recognition

Initial step for dust and scratch removal

Potential for segmentation.

Page 26: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

26Filtering example

Noisy Source Image

EWT opening

Traditional opening-closing

Traditional closing-opening

Page 27: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

27Filtering example

Noisy Source Image Opening by reconstruction EWT

Page 28: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

28Conclusions We presented a general framework for

tree-based morphological image processing Given a tree representation, corresponding

morphological operators are obtained Based on a complete inf-semilattices of

tree representations Particular case

Self-dual morphology based on a new tree – EWT

Some applications are presented

Page 29: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

29

Thank you!

Page 30: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

30Example 2

Original Image Opened by reconstruction Image (EWT)

Page 31: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

31Pre-processing for car license plate number recognition

The OCR algorithm includes coefficient of recognition quality, that enables to measure recognition improvements, when using different pre-processing algorithms.

Iquasi−self−dual = 256 − OR(256 − OR(Ioriginal))

Method used Recognition res.

Quality

Without pre-processing 20-687-07 3.47

Averaging filter 70-587-02 3.65

Median filter 70-587-07 3.75

Regular opening by reconstruction 79-687-07 3.65

Regular quasi dual opening by reconstruction

70-587-07 3.79

EWT filter 70-587-07 3.84

Page 32: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

License plate image corrupted with noise

License plate image in gray scale, as used by the OCR

License plate image filtered by EWT-based opening by reconstruction

SE

Page 33: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

License plate image filtered with an averaging filter

License plate image filtered with regular self dual opening by reconstruction

License plate image filtered with a median filter

License plate image filtered with regular opening by reconstruction

Page 34: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

34Initial step for dust and scratch removal

Top-hat (TH) filter - includes all details that were filtered out by opening by reconstruction (OR): TH = Ioriginal−OR(Ioriginal)

As the energy level of the top hat image is lower, and as the dust and scratch removal is better, so the filter is declared to be more efficient.

Qualitative evaluation of the extent of dust and scratch removal

Energy level of the top-hat image:

Method used Cross SE SE 3x3 SE 5x5

Averaging filter 1799 2643 3979

Median filter 1233 1971 3162

EWT filter 1376 1737 2895

Page 35: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

Top hat using median Top hat using an averaging filter

Original image Top hat by reconstruction based on EWTCross

SE

Page 36: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

Top hat using median Top hat using an averaging filter

Original image Top hat by reconstruction based on EWT

Page 37: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

Top hat using median Top hat using an averaging filter

Original image Top hat by reconstruction based on EWTSE

5x5

Page 38: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

Top hat using median Top hat using an averaging filter

Original image Top hat by reconstruction based on EWT

Page 39: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

39Further research topics

Finding necessary conditions for tree representation To assure existence of images semilattice,

induced by trees semilattice. More applications based on general

framework. Developing more useful tree representations Further exploration of segmentation capability

using trenches Real time implementation of the proposed

algorithms.

Page 40: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

40The tree representation infimum

a

r

dc

a

r

bd

a

r

d Cr

a

r

M 1(x)=b M 2(x)=c

t1 t2 t2t1

P (M 1(x))=at2

t1P (M 2(x))=a

t2t1

a

r

bd

a

r

dc

a

r

Infimum of the trees is the intersection of the trees. For each point in E, the infimum mapping function is obtained

by calculating the infimum vertex of the projections of the original mapping functions onto the infimum tree.

Page 41: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

41

Binary partition trees Are obtained from the partition of the flat zones. The leaves of the tree are flat zones of the image. The remaining nodes are obtained by merging. The root node is the entire image support.

(P. Salembier and L. Garrido, 2000)

Page 42: 1 Self-dual Morphological Methods Using Tree Representation Alla Vichik Renato Keshet (HP Labs—Israel) David Malah Technion - Israel Institute of Technology

42Tree of Shapes Represents an image as hierarchy of shapes. Build according to the inclusion order. Each father vertex area includes also all sons

area. Self-dual.

fTConCompFillHole

fTConCompFillHole

nxfExfT

C

n

n

n

A

B

C D 1

0

3

(P. Monasse and F. Guichard, 2000)

A(0)

B(1)

C(3) D(0)

Tree of Shapes