Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… ·...

110
Design of Morphological Design of Morphological Operators by Learning Operators by Learning Junior Barrera Junior Barrera [email protected] [email protected] IME IME - - USP USP

Transcript of Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… ·...

Page 1: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

Design of Morphological Design of Morphological

Operators by LearningOperators by Learning

Junior BarreraJunior Barrera

[email protected]@ime.usp.br

IMEIME--USPUSP

Page 2: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

22

LayoutLayout

�� IntroductionIntroduction

�� Binary operator design: WBinary operator design: W--operators operators

�� Binary operator design: constraint WBinary operator design: constraint W--

operatorsoperators

�� GrayGray--scale operator design: aperturesscale operator design: apertures

�� GrayGray--scale operator design: stack filtersscale operator design: stack filters

�� Conclusion Conclusion

Page 3: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

IntroductionIntroduction

Page 4: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

44

dA eA

⁄Ÿ

n

i Ÿ neA

Morphological Machine (MMach)

Page 5: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

55

PropertiesProperties

�� Any Any finite latticefinite lattice operator can be operator can be

implemented as a implemented as a programprogram of a of a MMachMMach

�� Finite lattices of practical importance are the Finite lattices of practical importance are the

lattice of lattice of binarybinary and and graygray--scale imagesscale images

Page 6: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

66

Morphological ToolboxMorphological Toolbox

�� Library of Library of hierarchical functionshierarchical functions::

�� -- primitivesprimitives: elementary operators and : elementary operators and

operations;operations;

�� -- high order operatorshigh order operators: primitives and high : primitives and high

order operators order operators

Page 7: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

77

Heuristic DesignHeuristic Design

�� DivideDivide the problem in the problem in subproblemssubproblems

�� Each Each subproblemsubproblem is solved by a is solved by a toolbox toolbox

functionfunction

�� IntegrateIntegrate the the subproblemssubproblems solutionsolution

Page 8: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

88

Automatic DesignAutomatic Design

�� Operator learning in a standard Operator learning in a standard

representationrepresentation

�� Finding an equivalent and more efficient Finding an equivalent and more efficient

representationrepresentation

Page 9: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

99

Operator Design Operator Design

Page 10: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

1010

ApplicationApplication

Page 11: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

1111

Change of RepresentationChange of Representation

dAeA

e ⁄ e ⁄ Ä Ä Ä ⁄ eA1 A2 An

y

Phrases

Operators

Page 12: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

Operator DesignOperator Design

Page 13: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

1313

The problemThe problem

Find an image operator that transforms the observed

image to the respective ideal (or “close to the ideal”)

image.

observed ideal

Page 14: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

1414

Binary image operatorsBinary image operators

Binary image :

Binary images can be understood as sets :

is a complete Boolean lattice

Binary image operators = set operators :

Page 15: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

1515

Translation invarianceTranslation invariance

translation-invariant iff

Translation of S by z :

is

Page 16: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

1616

Local definitionLocal definition

An image operator is locally defined within iff

Window :

Page 17: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

1717

WW--operatorsoperators

Translation invariance

+

local definition within

=

-operators

z

W-operators are characterized by Boolean functions.

Page 18: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

1818

1

11

1

RepresentationRepresentation

Window

X11 1X0 11X

Page 19: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

1919

Statistical HypothesisStatistical Hypothesis

X and Y are jointly stationary

),( YWSP z∩

is the same for any z in E

Page 20: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

2020

Stationary ProcessStationary Process

Page 21: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

2121

Join Stationary ProcessJoin Stationary Process

Page 22: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

2222

Error measureError measure

Loss function

Risk (expected loss) of a function :

Design goal is to find a function

with minimum risk.

X is a random set

Y is a binary random variable

Page 23: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

2323

Optimal MAE function

Example : MAE loss function

>

=

),0(),1( 0

),0(),1( 1

)(

XpXp

XpXp

MAE exampleMAE example

Page 24: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

2424

Design procedureDesign procedure

Page 25: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

2525

PAC learningPAC learning

L is Probably Approximately Correct (PAC)

For examples),( δεmm >

δεψψ −><− 1) |)()(Pr(| optRR

)1 ,0(, ∈δε

Page 26: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

2626

Edge detectionEdge detection

Test images

Training images

Page 27: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

2727

Noise filteringNoise filtering

Training images

Test images

Page 28: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

2828

Texture extraction Texture extraction (1)(1)

Training images

Page 29: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

2929

Texture extraction Texture extraction (2)(2)

Test images

Page 30: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

3030

Fracture DetectionFracture Detection

Training images Test images

Page 31: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

3131

18,10 %

3,13 %2,68 %

2,21 %2,01 %

1,82 %1,69 % 1,60 %

Noise 1 image 2 images 3 images 8 imagess 13 images 25 images 32 images

Last Image

Amount of data availableAmount of data available

Page 32: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

3232

addition: 2%

subtraction: 1%

distict patterns : 140.060

in 1.548.384

addition: 3%

subtraction: 3%

distinct patterns : 266.743

em 1.548.384

addition: 6%

subtraction: 6%

distinct patterns: 487.494

in 1.548.384

window 5x5, 6 training images

Page 33: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

3333

Size of the windowSize of the window

Error rate in function of window size

0.00%

0.10%

0.20%

0.30%

0.40%

0.50%

0.60%

0.70%

3x3 4x4 5x5 6x6 7x7

1

2

3

4

5

6

7

8

Page 34: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

Constraint DesignConstraint Design

Page 35: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

3535

optψ

Ψ

ConstraintsConstraints

Page 36: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

3636

ConstraintsConstraints

Err

or

N0N1 N2

Sample size

εdes

εdes-con

εopt

εopt-con

Page 37: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

3737

ConstraintsConstraints

Structural Constraints

- impose maximum number of elements in the basis

- use alternative structural representations(e.g., sequential)

Page 38: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

3838

ConstraintsConstraints

- consider a constraint by an envelope of operators

- consider a constraint by a multi-resolution criteria

- consider a constraint by a multi-resolution envelope criteria

Algebraic constraints

- consider a class of operators satisfying a given algebraic property (e.g., increasingness , idempotence, auto-dualism, etc)

Page 39: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

Structural ConstraintStructural Constraint

Page 40: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

Minimum number of intervals Minimum number of intervals

in the basisin the basis

Page 41: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

4141

Page 42: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

4242

Page 43: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

4343

Page 44: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

Iterative designIterative design

Page 45: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

4545

is a -operator

Motivation : composition of operators over small windows produces an operator over a larger window

Page 46: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

4646

Application exampleApplication example

test image

iteration 1

iteration 2

Page 47: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

4747

Application exampleApplication example

test image iteration 1

iteration 4 iteration 5 iteration 6

iteration 2 iteration 3

Page 48: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

Algebraic ConstraintAlgebraic Constraint

Page 49: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

4949

Increasing W-operators

increasing non-increasing

Page 50: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

5050

increasing

increasingnon-increasing

Design of increasing W-operators

Page 51: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

5151

Page 52: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

MultiMulti--resolution constraintresolution constraint

Page 53: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

5353

00

01

10

11

00

01

10

11

0

1

0 1

2 variables: 22=4 4 variables: 24=16

0000000100100011010001010110011110001001101010111100110111101111

0010

0011

0000

0001

0110

0111

0100

0101

1010

1011

1000

1001

1110

1111

1100

1101

8 variables: 28=256

x1 x2 x3 x4 x5 x6 x7 x8

z1 z2 z3 z4

w1 w2 2 variables

4 variables

8 variables

Page 54: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

5454

W0

W1

D1 = P(W1)

D0 = P(W0)

zi = pi(xi1, ... , xi9) , z = p(x) , p=(p1, .. p9)

Let φ:D1→{0,1} , it defines the operator Ψφ on Do by

Ψφ (x) = φ(p(x))

The operador Ψφ is constrained by resolution to D1

Equivalence classes defined

by

p(x) = p(y)

D0

Page 55: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

5555

Properties

Operators over D0

Operators over D0 constrained by resolution on D1

Operators over D1

Q φΨφ

Page 56: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

5656

W2

W1

W0

D2 = P(W2), D1 = P(W1), D0 = P(W0)

x ∈D0, z ∈D1, v ∈D2,

zi = pi(xi,1, ... , xi,9) , z = p(x) ,

p=(p1, .. p81)

vi = wi(xi,1, ... , xi,81) , v = w(x) ,

w=(w1, .. w9)

The equivalence classes defined byp may be different by the onesdefined by w.

p

w

Page 57: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

5757

ψ

ψ

ψ ρ

ψ ρ ρ

ψ ρ ρ

( )

( ) ( )

( ) ( ) , ( ( ))

( ) ( ) ,..., ( ( )) , ( ( ))

( ) ( ) ,..., ( ( )) , ( ( ))

,

,

,

,

x

x x

x x x

x x x x

x x x x

=

>

= >

= = >

= = >

− − −

0

1 1

1 2 1

1

0

0 0

0 0 0

0 0 0

N

N

m N m m

m N m m

if N

if N N

if N N N

if N N N

M

Page 58: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

5858

Page 59: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

5959

Page 60: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

6060

Page 61: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

6161

image noise image + noise

MultiresolutionMultiresolution NoiseNoise

Page 62: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

6262

3x3 window

Pyramid

Restauration Persisting noise

Page 63: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

6363

Page 64: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

6464

Example

W11

W10

W9

W8

W7

W6

W5

W4

W3

W2

W1

W0

Hybrid Multiresolution Filter: Experiment I

0

0.02

0.04

0.06

0.08

0.1

0.12

0.14

Ψ11 Ψ10 Ψ9 Ψ8 Ψ7 Ψ6 Ψ5 Ψ4 Ψ3 Ψ2 Ψ1 Ψ0

Window sequence

MA

E

Single operator Pyramid operator

Page 65: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

Envelope constraintEnvelope constraint

Page 66: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

6666

Independent ConstraintsIndependent Constraints

ConstraintsConstraints

Restriction of Restriction of

the operators spacethe operators space

K(K(ψψψψψψψψoptopt) ) ∈∈∈∈∈∈∈∈ Q Q ⊆⊆⊆⊆⊆⊆⊆⊆ PP((PP(W))(W))

P(P(W))

Q

K(ψψψψopt)

Independent Constraint Independent Constraint

Let be ALet be A,,BB ⊆⊆⊆⊆⊆⊆⊆⊆ PP(W) with (W) with AA⊆⊆⊆⊆⊆⊆⊆⊆BB::

hhψψψψψψψψ(x)=1 (x)=1 ∀∀∀∀∀∀∀∀ xx∈∈∈∈∈∈∈∈AA & h& hψψψψψψψψ(x)=0(x)=0∀∀∀∀∀∀∀∀xx∉∉∉∉∉∉∉∉BB, ,

∀ψ∀ψ∀ψ∀ψ∀ψ∀ψ∀ψ∀ψ :K(:K(ψψψψψψψψ) ) ∈∈∈∈∈∈∈∈QQ

A

B

P(W)

{1}

{0,1}

{0}

P(P(W))

A

B

Q

Page 67: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

6767

Independent ConstraintsIndependent Constraints

PropositionProposition: if Q is an independent restriction then exist a par of : if Q is an independent restriction then exist a par of

operatorsoperators

((αααααααα,,ββββββββ) such that, for any ) such that, for any ψ∈Ψψ∈Ψψ∈Ψψ∈Ψψ∈Ψψ∈Ψψ∈Ψψ∈ΨWW

K(K(ψψψψψψψψ) ) ∈∈∈∈∈∈∈∈Q Q ⇔⇔⇔⇔⇔⇔⇔⇔ α≤α≤α≤α≤α≤α≤α≤α≤ ψψψψψψψψ ≤β≤β≤β≤β≤β≤β≤β≤β

where K(where K(αααααααα) = ) = AA and K(and K(ββββββββ) = ) = BB

•• All independent constraint is characterized by two operators All independent constraint is characterized by two operators αααααααα and and

ββββββββ

•• The pair (The pair (αααααααα,,ββββββββ) is called ) is called ““EnvelopeEnvelope””

A

B

P(W)

{1}

{0}

{0}

A

B

P(W)

{1}

{1}

{0}

hαααα hββββ

Page 68: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

6868

Definition

Desing of two heristic filters α and β such that when we

know that α ≤ ψopt ≤ β, the restriction is defined by:

Q = {ψ : α ≤ ψ ≤ β}

and any filter ψ can be projected into the restriction by

ψ ψ α βenv = ∨ ∧( )

Page 69: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

6969

Definition

α

β

Operators over P(W)

constrained by envelope

Operators over

P(W)

ψ

ψenv

Q

Page 70: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

7070

Properties

♦ (ψopt ∨ α ) ∧ β is optimal in Q.

♦If α ≤ ψopt ≤ β then Error[ψenv] ≤ Error[ψ]

♦If α ≤ ψopt ≤ β is not true, then

LimN→∞ Error[ψenv,N] > LimN→∞ Error[ψN]

Page 71: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

7171

Example

Page 72: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

7272

Noise

Addition

Ground

Image

Noisy Image Filtered

Image

Edge

DetectedRestorationEdge

Detection

Edge Detected

Direct Edge Detection

Noise Edge DetectionNoise Edge Detection

Page 73: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

7373

Machine design of

the restoration

Human-Machine

design of the

restoration

0.28 % 0.13 %

0

0,05

0,1

0,15

0,2

0,25

0,3

Error (%)

Machine design

of the restoration

Human design of

the restoration

Restoration a) Machine design of the restoration

b) Human-machine design of the restoration

ψψψψpac designed by examples

ψψψψcon = (ψψψψpac ∩β∩β∩β∩β) ∪∪∪∪ αααα

αααα = δδδδB⊕⊕⊕⊕BεεεεB⊕⊕⊕⊕BδδδδBεεεεB and ββββ = εεεε B⊕⊕⊕⊕BδδδδB⊕⊕⊕⊕B εεεε BδδδδB

αααα and ββββ are alternating sequential filters with

P[ αααα(S) ≤≤≤≤ I ≤≤≤≤ ββββ(S) ] ≈≈≈≈ 1

B is the 3x3 square

Page 74: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

7474

Edge

Detection

a) Machine design over noisy images

b) Human design after restoration

ζζζζ pac designed by examples from noisy images

ζζζζ = Id - εεεεB

B is the 3x3 square

c) Machine design after restoration

ζζζζ pac designed by examples from restored images

Noise Edge DetectionNoise Edge Detection

Machine

design over

noisy images

Human

design after

restoration

Machine

design after

restoration

0.65 % 0.27 % 0.24 %

0

0,1

0,2

0,3

0,4

0,5

0,6

0,7

Error (%)

Machine design over

noisy images

Human design after

restoration

Machine design after

restoration

Page 75: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

7575

Machine design over

noisy images

Error = 0.65%

Human design after

restoration

Error = 0.27%

Machine design after

restoration

Error = 0.24%

Noise Edge DetectionNoise Edge Detection

Page 76: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

Envelope multiEnvelope multi--resolution resolution

constraintconstraint

Page 77: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

7777

Definition

♦ W1 ⊂ W0 , ρ:D0 → D1 is a resolution mapping

♦ α, β: D1 → {0,1} with α ≤ β

♦ ψ : D0 → {0.1}

♦ ψρ = (ψ ∧ β’) ∨ α’ , α’(x) = α(r(x)) and β’(x) = β(r(x))

=

=

=

otherwhise

xif

xif

)(

0))((0

1))((1

)(

x

x

ψ

ρβ

ρα

ψ ρ

Page 78: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

7878

ψρ

QD0

φenv

β

α

D1

φ

Definition

Ψφ

β’

α’

Page 79: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

7979

Teorema

ψ

ψρ

Q

D0

D1

φenv

β

α

φ

β’

α’

Page 80: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

8080

Piramidal Design:

Let ψi,env,N = ( ψi,N ∧ β’) ∨ α’, be the projection of the resolution

constrained filter inside the envelope (α’, β’)

ψ

ψ

ψ ρ

ψ ρ ρ

ψ ρ ρ

env mres

N

env N

m env N m m

m env N m m

if N

if N N

if N N N

if N N N

− − −

=

>

= >

= = >

= = >

( )

( ) ( )

( ) ( ) , ( ( ))

( ) ( ) ,..., ( ( )) , ( ( ))

( ) ( ) ,..., ( ( )) , ( ( ))

,

, ,

, ,

, ,

x

x x

x x x

x x x x

x x x x

0

1 1

1 2 1

1

0

0 0

0 0 0

0 0 0

M

Page 81: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

8181

Properties:

♦ ψenv-mres is a consistent estimator of ψopt

♦ If the envelope is well defined on D1, then the ρ-envelope of a

resolution constrained filter is advantageous

Page 82: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

8282

α = εB(γEφEγE)

β = δB(φEγEφE)

EB

Page 83: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

8383

Page 84: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

GrayGray--scale operator design: scale operator design:

apertureaperture

Page 85: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

8585

Spatial Translation Invariance

Page 86: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

8686

Gray-scale Translation Invariance

Page 87: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

8787( ) ( ) )(/)( xWfxf xΨ=Ψ

Locally defined in W

Page 88: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

8888

}},)(,{{))(/( kyzukzKu y −−∨∧=

Locally defined in W and K

Page 89: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

8989

0000

5555

10101010

15151515

20202020

25252525

30303030

inputinputinputinput

outputoutputoutputoutput

-2 1 2 2 2

-2 1 2 2 2

-2 1 2 2 2

-2 1 1 1 1

-2 -2 -2 -2 -2

-2 -1 0 1 2

2

1

0

-1

-2

ψβ

Aperture Operator

W { }2,1,0,1,2 −−=K

Page 90: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

9090

-2 1 2 2 2

-2 1 2 2 2

-2 1 2 2 2

-2 1 1 1 1

-2 -2 -2 -2 -2

-2 -1 0 1 2

2

1

0

-1

-2

ψβ

ψ

12 13 14 15 16

12 13 14 15 15

12 13 14 14 12

12 13 13 11 12

12 12 10 11 12

10 11 12 13 14

14

13

12

10

11

=

10 11 12 13 14

10 11 12 13 14

10 11 12 13 14

10 11 12 13 14

10 11 12 13 14

10 11 12 13 14

14

13

12

10

11

+

)(ou ψβ

2 2 2 2 2

2 2 2 2 1

2 2 2 1 -2

2 2 1 -2 -2

2 1 -2 -2 -2

10 11 12 13 14

14

13

12

10

11

Aperture Operator

Page 91: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

9191

�� Let Let a, ba, b ∈∈ Fun[Fun[W,LW,L]], , aa ≤≤ bb iffiff aa((xx) ) ≤≤ bb((xx), ), x x ∈∈ WW

�� Interval Interval [[aa,,bb] = {] = {uu ∈∈ Fun[Fun[W,LW,L]:]: aa ≤≤ uu ≤≤ bb}}

a

b|W| = 2

Page 92: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

9292

�� SupSup--generating operator:generating operator:( ) ],[1, bauuba ∈⇔=λ

0 0 0 0 0

0 0 1 1 1

0 0 1 1 1

0 0 1 1 1

0 0 0 0 0

[a,b]

ba ,λ

Page 93: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

9393

Kernel of ψ at y: K(ψ)(y) = {u ∈ Fun[W,L]: y ≤ ψ(u)}

0 1 2 2 2

0 1 2 2 2

-1 1 2 2 2

-1 1 1 1 1

-2 -1 -1 -1 -1

K(ψ)(2)K(ψ)(-1) K(ψ)(0) K(ψ)(1)K(ψ)(-2)

-2 -1 0 1 2

2

1

0

-1

-2

Page 94: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

9494

Basis of ψ at y: B(ψ) is the set of maximal intervals contained in K(ψ)

K(ψ)(2)K(ψ)(-1) K(ψ)(0) K(ψ)(1)K(ψ)(-2)

B(ψ)(2)B(ψ)(-1) B(ψ)(0) B(ψ)(1)B(ψ)(-2)

Page 95: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

9595

SupSup--representationrepresentation

( ) { }{ }1))((],[:)(: , =∈∈= yBbauMyu ba ψλψ UU

K(ψ)(2)K(ψ)(-1) K(ψ)(0) K(ψ)(1)K(ψ)(-2)

ψ(-1,-1) = 1

Page 96: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

9696

These are part of the observed and ideal images (512x512)

Observed Ideal

Page 97: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

9797

MAE x Number of ExamplesMAE x Number of Examples

Page 98: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

9898

DebluringDebluring -- Aperture x Optimal Aperture x Optimal

linearlinear

Aperture 17p x 5 x 5 Optimal linear 7x7

Page 99: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

9999

Resolution Enhancement

Page 100: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

100100

Resolution Enhancement

(0,0) (0,1)

Page 101: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

101101

Original Aperture: 3x3x21x51

Linear Bilinear

Resolution Enhancement - Results

Page 102: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

102102

Original Aperture: 3x3x21x51

Linear Bilinear

Zoom

Resolution Enhancement - Results

Page 103: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

GrayGray--scale operator design:scale operator design:

stack filtersstack filters

Page 104: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

104104

A stack filter is a gray-scale operator characterized

by a positive (i.e., increasing) Boolean function

}1])[(:max{)( =∈= fTKtf tψψ

where

})(:{][ txfWxfTt ≥∈=

Page 105: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

105105

Impulse noise removal Impulse noise removal (1)(1)

training images

Page 106: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

106106

Impulse noise removal Impulse noise removal (2)(2)

test image iteration 1

Page 107: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

107107

Impulse noise removal Impulse noise removal (3)(3)

test image iteration 5

Page 108: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

108108

Robustness Robustness (1)(1)

test image iteration 1

Page 109: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

109109

Robustness Robustness (2)(2)

test image iteration 5

Page 110: Design of Morphological Operators by Learningjb/lectures/morphological operator design/i… · Morphological Toolbox Library of hierarchical functions : - primitives : elementary

110110

Conclusion Conclusion

�� Design of Morphological Operators:Design of Morphological Operators: a a

discrete nature problemdiscrete nature problem

�� Fundamentals: Fundamentals: Algebra, Statistics, Algebra, Statistics,

CombinatoryCombinatory

�� Real problemsReal problems solutionsolution

�� Design techniques Design techniques adequate to introduce adequate to introduce

prior knowledgeprior knowledge

�� Identification of Lattice Dynamical Systems Identification of Lattice Dynamical Systems