Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on...

122
Image Foresting Transform A graph-based approach to image processing Alexandre Xavier Falc ˜ ao [email protected] www.ic.unicamp.br/˜afalcao/ift.html. Institute of Computing State University of Campinas Campinas - SP - Brazil A.X. Falc ˜ ao – p.1/122

Transcript of Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on...

Page 1: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Image Foresting TransformA graph-based approach to image processing

Alexandre Xavier Falcao

[email protected]

www.ic.unicamp.br/˜afalcao/ift.html.

Institute of Computing

State University of Campinas

Campinas - SP - Brazil

A.X. Falcao – p.1/122

Page 2: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Contributors

Jorge Stolfi, Institute of Computing, State University ofCampinas, Campinas, SP, Brazil.

Roberto Lotufo, Faculty of Electrical and ComputerEngineering, State University of Campinas, Campinas,SP, Brazil.

Luciano Costa, Institute of Physics, University of SaoPaulo, Sao Carlos, SP, Brazil.

Fernando Cendes, Dept. of Neurology, Faculty ofMedical Sciences, University of Campinas, Campinas,SP, Brazil.

Bruno Cunha, Ricardo Torres, Felipe Bergo, GabrielaCastellano, Romaric Audigier, Celso Suzuki, EduardoPicado, and Carlos Camolesi.

A.X. Falcao – p.2/122

Page 3: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Goals of research

The design, efficient implementation, and evaluation of ef-

fective image processing operators based on connectivity.

A.X. Falcao – p.3/122

Page 4: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Motivation

UnificationImage operators can be derived from a single algorithm,favoring hardware-based implementations and theunderstanding of how operators relate to each other.

EfficiencyThe IFT algorithm usually runs in linear time. Furtheroptimizations are possible for specific applications.

SimplicityAn image operator requires a simple choice of parameters ofthe IFT algorithm and a local processing of its output.

A.X. Falcao – p.4/122

Page 5: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Purpose of the lecture

What may you expect from this lecture?

Get a different way of looking at image processingproblems.

Understand the IFT and how it works for severalapplications.

Make it easier to use the C source code of the IFTalgorithm, which is available for download atwww.ic.unicamp.br/˜afalcao/ift.html.

A.X. Falcao – p.5/122

Page 6: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

What is it all about?

Many image operators can be directly/indirectly related to a partition

of the image into influence zones associated with root pixels, where

the zone of each root consists of the pixels that are more closely

connected to that root than to any other, in some appropriate sense.

r

r

1

2

3

t

r

Pixel

is more closely connected to root �� .

A.X. Falcao – p.6/122

Page 7: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

What is it all about?

The IFT unifies these image operators by computing an

optimum-path forest in a directed graph derived from the image.

The roots of the forest are drawn from a given set of seed

pixels, which may also consist of all image pixels.

The influence zone of a root � consists of the pixels reached

from � by a path of minimum cost, considering the cost of all

paths in the graph from the seed set to that pixels.

The IFT algorithm outputs three attributes for each image pixel:

an optimum path from the root set, the cost of that path, and its

corresponding root.

An image operator is reduced to a simple local processing of

these attributes.

A.X. Falcao – p.7/122

Page 8: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Region-based image segmentation

An object can be defined by pixels whose root belongs to a

given set of internal pixels.

A.X. Falcao – p.8/122

Page 9: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Image filtering

A filtered image can be obtained from the cost attribute.

A.X. Falcao – p.9/122

Page 10: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Optimum boundary tracking

The path attribute can be used to find an optimum curve that

is constrained to pass through a given sequence of land-

marks (pixel sets) on the object’s boundary.

A.X. Falcao – p.10/122

Page 11: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Euclidean distance transform (EDT)

The EDT of a given shape and its exact dilations/erosions

can be obtained from the cost attribute.

A.X. Falcao – p.11/122

Page 12: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Multiscale skeletonization

MS-skeletons can be obtained from the root attribute and

thresholded into one-pixel-wide and connected skeletons.

A.X. Falcao – p.12/122

Page 13: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Multiscale fractal dimension

0.8

0.85

0.9

0.95

1

1.05

1.1

1.15

1.2

1.25

1.3

1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

Frac

tal D

imen

sion

(F)

Log(r)

The self-similarity of a shape can be expressed in various

scales from the cost attribute.

A.X. Falcao – p.13/122

Page 14: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Salience points of a shape

Higher curvature points of a shape can be located from the

root attribute.A.X. Falcao – p.14/122

Page 15: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Outline

Graph concepts

Images as graphs

Image Foresting Transform

The IFT algorithm

Applications

Current work

A.X. Falcao – p.15/122

Page 16: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Directed graphs

A directed graph is a pair

� ��� �

, where

is a set of nodesand is a set of ordered pairs of nodes.

b

ie

a

c

dj

f

g

h

A.X. Falcao – p.16/122

Page 17: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Paths

A path is a sequence

��� � � �� � � � �� �

of distinct nodes inthe graph, such that

��� � � �� � � for

� � � � � � �.

A path is trivial if

� � �

.

Path �� � denotes the concatenation of two paths, � and�, where � ends at

and � begins at

.

tτπ

Path � � � � ��� � �denotes the concatenation of the

longest prefix � of � and the last arc

��� � �

.

A.X. Falcao – p.17/122

Page 18: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Path-cost functions

A path-cost function is a mapping that assigns to eachpath � a cost

� � � , in some ordered set

!of cost values.

A function

is said monotonic-incremental (MI) when

� � � � � " � � � � � � ��� � � � � � � � # ��� � � �

where

" � �

is a handicap cost value and # satisfies:$ % & $ ' $ % # �� � � & $ # ��� � �and $ # ��� � � & $, for$ � $ % � !

and

��� � � � .

A.X. Falcao – p.18/122

Page 19: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Examples of MI cost functions

Additive cost function

)(* + � � � � � " � � � )(* + � � � ��� � � � � )(* + � � �-, . ��� � � �

where . ��� � �

is a fixed non-negative arc weight.

Max-arc cost function

+/0 � � � � � " � � � +/0 � � � ��� � � � � 1 23 4 +/0 � � � � . ��� � �5 �

where . ��� � �

is a fixed arc weight.

A.X. Falcao – p.19/122

Page 20: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Examples of MI cost functions

b

fe

a

c

2 1

23

7

64

3 0g 3

4

5

d

1.

" ��6 � � �

,

+/0 � ��6 � 7 � 8 � 9 � � � :

and

)(* + � ��6 � 7 � 8 � 9 � � � �;

.

2.

" ��6 � � <

,

+/0 � ��6 � 7 � 8 � 9 � � � <

and

)(* + � ��6 � 7 � 8 � 9 � � � � :

.

A.X. Falcao – p.20/122

Page 21: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Predecessor map and spanning forest

A predecessor map is a function

=

that assigns to eachnode

� �

either some other node in

�, or a distinctive

marker > � ? @� �

— in which case

is the root of the map.

A spanning forest is a predecessor map which takesevery node to > � ? in a finite number of iterations (i.e. itcontains no cycles).

b

a

c

dj

ie

f

g

h

A.X. Falcao – p.21/122

Page 22: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Paths of the forest

For any node

� �

, there is a path

= A � �

which is obtainedin backward by following the predecessor nodes along thepath.

b

a

c

dj

ie

f

g

h

For example, path

= A � 8 � � ��6 � 7 � 8 � , where

= � 8 � � 7

,

= � 7 � � 6 ,and

= ��6 � � > � ?; and path

= A � � � � � � �

, where

= � � � � > � ?.

A.X. Falcao – p.22/122

Page 23: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Optimum-path forest

An optimum-path forest is a spanning forest

=, where � = A � � �

is minimum for all nodes

� �

. Consider costfunction

)(* + in the example below.

2 2

00

00

0a

f d

ge

b c

01

2

0

20

31

300

1

2

0 43 4

0

4

a

3b c

d

e

f

g

A.X. Falcao – p.23/122

Page 24: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Dijkstra’s algorithm

Dijkstra’s algorithm can be slightly modified to computeoptimum-path forests for MI cost functions.

Dijkstra’s algorithm also works for non-MI cost functionsunder weaker conditions which are applied to onlyoptimum paths.

A.X. Falcao – p.24/122

Page 25: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Smooth path-cost functions

A cost function

is smooth if for any node

� �, there is an

optimum path � ending at

which either is trivial, or has theform � � ��� � �

where

1.

� � � � � � � ,2. � is optimum,

3. for any optimum path � % ending at � ,

� � % � ��� � � � � � � � .

s

t

ττ ’

These conditions apply to only optimum paths.

A.X. Falcao – p.25/122

Page 26: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

An image as a directed graph

A grayscale image

B

is a pair

� ��� C �

, where

�is a finite

set of pixels (points in

D

) and

C

assigns to each pixel � �

a value

C � �

in some arbitrary value space.

An adjacency relation is a binary relation betweenpixels of

, which is usually translation-invariant.

Once has been fixed, imageB

can be interpreted as adirected graph, whose nodes are the image pixels in

and whose arcs are defined by .

A.X. Falcao – p.26/122

Page 27: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Examples of adjacency relations

Euclidean relation: A pixel

� � $E � FE �

is adjacent to a pixel� � � $ ( � F ( �

(i.e. arc

��� � � � ) if

� $ E � $ ( � , � FE � F ( � �HG .

(A) (B)

(A) IJ K

and (B) IJ LM.

A.X. Falcao – p.27/122

Page 28: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Examples of adjacency relations

Box-shaped relation.Arc

�� � � � if

N $OE � $ ( N � / and

N FE � F ( N � P .

Set-based relation.Arc

�� � � � if

� � � 4 � � � � � � � � � � � � � �5.

x

y

s

(C)

A.X. Falcao – p.28/122

Page 29: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Connectivity relation

A pixel

is said connected to a pixel � if there is a pathfrom � to

in the graph.

The cost of a path in the graph is determined by anapplication-specific smooth path-cost function whichusually depends on local image properties along thepath, such as brightness, gradient, and pixel position.

This notion of connectivity can be exploited in many different ways.

For example, consider the labeling of components using symmetric

connectivity relations...

A.X. Falcao – p.29/122

Page 30: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Labeling of components

A.X. Falcao – p.30/122

Page 31: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Labeling of components

For example, consider Euclidean adjacency relation withG � Q

for labeling letters of a binary text;

A.X. Falcao – p.31/122

Page 32: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Labeling of components

Euclidean adjacency relation withG � Q <

for labeling wordsof a text; and

A.X. Falcao – p.32/122

Page 33: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Labeling of components

box-shaped adjacency relation with 6 � R;

and7 � <

forlabeling lines of a text.

A.X. Falcao – p.33/122

Page 34: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Labeling of components

Consider now

��� � � � if

� $ E � $ ( � , � FE � F ( � � �; ;andN C � � � C �S ��� � � N � �; ;

, where

S ��� �

is the initial pixel of thefirst path that reached � .

A.X. Falcao – p.34/122

Page 35: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Labeling algorithm

Input: Image

B � � � � C �

and adjacency relation .Output: Labeled image

T � � � � U �

, where

U � � � ; initially.Auxiliary: FIFO

V

and variable

? � �

initially.

1. For all W � �

, such that

U � W � � ; , do

2. Set

U � W � X ?

and insert W in V.

3. While

V @ � Y

do

4. Remove � fromV

.

5. For all

, such that

��� � � � and

U � � � ; , do

6. SetU � � X U ��� �

and insert

in

V

.

7. Set

? X ?, �.

A.X. Falcao – p.35/122

Page 36: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Image Foresting Transform

The IFT takes an image

Z

, a smooth path-cost function[

and an

adjacency relation

\

; and returns an optimum-path forest

].

2222222222 1111111111 2222222222 5555555555 8888888888 5555555555 4444444444 5555555555

1111111111 0000000000 1111111111 4444444444 5555555555 2222222222 1111111111 2222222222

2222222222 1111111111 2222222222 5555555555 4444444444 1111111111 0000000000 1111111111

5555555555 2222222222 5555555555 8888888888 4444444444 1111111111 0000000000 1111111111

2222222222 1111111111 2222222222 5555555555 5555555555 2222222222 1111111111 2222222222

1111111111 0000000000 1111111111 4444444444 8888888888 5555555555 4444444444 5555555555

1111111111 1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 3333333333

1111111111 1111111111 1111111111 3333333333 3333333333 1111111111 1111111111 1111111111

1111111111 1111111111 1111111111 3333333333 3333333333 1111111111 1111111111 1111111111

3333333333 1111111111 3333333333 3333333333 3333333333 1111111111 1111111111 1111111111

1111111111 1111111111 1111111111 3333333333 3333333333 1111111111 1111111111 1111111111

1111111111 1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 3333333333

A

^

-connected image graph and the optimum forest for max-arc func-

tion

[`_a b withc d � e J f d � ehg K

and i dkj�l � e J m f d � eon f dkj e m

.

A.X. Falcao – p.36/122

Page 37: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Tie-breaking

The optimum-path forest

=

may not be unique, because apixel may be reached from two or more roots at the sameminimum cost. This ambiguity requires tie-breaking policies.

FIFO policyAny connected set

p

of pixels with minimum cost withrespect to two or more roots tends to be equallypartitioned among the respective trees.

LIFO policyThe pixels in

p

will all get assigned to a single tree.

A.X. Falcao – p.37/122

Page 38: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

IFT algorithm

The algorithm first identifies a root set and thencomputes optimum paths within wavefronts that growfrom each root pixel.

During this process, the algorithm propagates for eachpixel

its predecessor

= � �

in the optimum path withterminus

, the cost

q � �

of that path, and itscorresponding root

S � �

.

The process stops when the wavefronts encounter eachother.

A priority queueV

stores the pixels of the wavefrontsand controls their shapes, by favoring growth towarddirections of minimum-cost paths or according toFIFO/LIFO policy in the case of ties.

A.X. Falcao – p.38/122

Page 39: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

FIFO tie-breaking

Consider the max-arc function

+/0 with

" � � � C � �,. ��� � � � N C � � � C �� � N

, and a

:

-connected image graph.

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

1111111111 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 1111111111

A.X. Falcao – p.39/122

Page 40: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

FIFO tie-breaking

After the first iteration of the algorithm.

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

1111111111 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

1111111111 1111111111 5555555555 5555555555 5555555555 5555555555 2222222222 1111111111

A.X. Falcao – p.40/122

Page 41: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

FIFO tie-breaking

After the second iteration of the algorithm.

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

1111111111 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 1111111111

1111111111 1111111111 5555555555 5555555555 5555555555 5555555555 1111111111 1111111111

A.X. Falcao – p.41/122

Page 42: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

FIFO tie-breaking

After the third iteration of the algorithm.

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

1111111111 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

1111111111 1111111111 5555555555 5555555555 5555555555 5555555555 2222222222 1111111111

1111111111 1111111111 5555555555 5555555555 5555555555 5555555555 1111111111 1111111111

A.X. Falcao – p.42/122

Page 43: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

FIFO tie-breaking

After 15 iterations of the algorithm.

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

1111111111 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 1111111111

1111111111 1111111111 5555555555 5555555555 5555555555 5555555555 1111111111 1111111111

1111111111 1111111111 3333333333 5555555555 5555555555 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 5555555555 5555555555 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 5555555555 5555555555 3333333333 1111111111 1111111111

A.X. Falcao – p.43/122

Page 44: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

FIFO tie-breaking

The resulting optimum-path forest.

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

A.X. Falcao – p.44/122

Page 45: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

LIFO tie-breaking

Consider the same max-arc function

+/0 with" � � � C � �

,. ��� � � � N C � � � C �� � N

, and

:

-connected image graph.

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

1111111111 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 1111111111

A.X. Falcao – p.45/122

Page 46: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

LIFO tie-breaking

After the first iteration of the algorithm.

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 1111111111

1111111111 2222222222 5555555555 5555555555 5555555555 5555555555 1111111111 1111111111

A.X. Falcao – p.46/122

Page 47: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

LIFO tie-breaking

After the second iteration of the algorithm.

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 1111111111

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 1111111111 1111111111

1111111111 2222222222 5555555555 5555555555 5555555555 5555555555 1111111111 1111111111

A.X. Falcao – p.47/122

Page 48: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

LIFO tie-breaking

After the third iteration of the algorithm.

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 2222222222

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 2222222222 1111111111

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 1111111111 1111111111

2222222222 2222222222 5555555555 5555555555 5555555555 5555555555 1111111111 1111111111

1111111111 2222222222 5555555555 5555555555 5555555555 5555555555 1111111111 1111111111

A.X. Falcao – p.48/122

Page 49: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

LIFO tie-breaking

After 15 iterations of the algorithm.

2222222222 2222222222 5555555555 5555555555 5555555555 3333333333 1111111111 1111111111

2222222222 2222222222 5555555555 5555555555 5555555555 3333333333 1111111111 1111111111

2222222222 2222222222 5555555555 5555555555 5555555555 3333333333 1111111111 1111111111

2222222222 2222222222 5555555555 5555555555 5555555555 3333333333 1111111111 1111111111

1111111111 1111111111 5555555555 5555555555 5555555555 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 5555555555 5555555555 3333333333 1111111111 1111111111

A.X. Falcao – p.49/122

Page 50: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

LIFO tie-breaking

The resulting optimum-path forest.

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

1111111111 1111111111 3333333333 3333333333 3333333333 3333333333 1111111111 1111111111

A.X. Falcao – p.50/122

Page 51: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

IFT algorithm with FIFO policy

1. For all pixels

� �

do

2.

q � � X � � � �

,

= � � X > � ?, S � � X .3. If

q � �sr , t, insert

in

V

.

4. While

V @ � Y

do

5. Remove a pixel � from

Vsuch that

q ��� �

is minimum.

6. For all

, such that

��� � � � and

q � �su q ��� �

, do

7. 8 X � = A ��� � � ��� � � �.

8. If 8r q � �

then

9. If

q � � @ � , t, remove

from

V

.

10.

q � � X 8, = � � X � ,

S � � X S �� �

, insert

in

V

.

A.X. Falcao – p.51/122

Page 52: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

IFT algorithm with LIFO policy

1. For all pixels

� �

do

2.

q � � X � � � �

,

= � � X > � ?, S � � X , insert

in

V

.

3. While

V @ � Y

do

4. Remove a pixel � from

V

such thatq ��� �

is minimum.

5. For all

, such that

��� � � � and � V

, do

6. 8 X � = A ��� � � ��� � � �.

7. If 8 � q � �

then

8. Remove

from

V,

q � � X 8, = � � X � ,S � � X S ��� �, insert

in

V

.

A.X. Falcao – p.52/122

Page 53: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Unfair partitions with FIFO

Function

+/0 with

" � � � C � �

and . ��� � � � N C � � � C ��� � N.

5555555555 5555555555 5555555555 5555555555 5555555555 5555555555 5555555555 5555555555

5555555555 5555555555 5555555555 5555555555 5555555555 5555555555 5555555555 5555555555

5555555555 5555555555 5555555555 5555555555 5555555555 5555555555 5555555555 5555555555

5555555555 5555555555 5555555555 5555555555 5555555555 5555555555 5555555555 5555555555

5555555555 5555555555 5555555555 5555555555 5555555555 5555555555 5555555555 5555555555

1111111111 5555555555 5555555555 5555555555 5555555555 5555555555 5555555555 1111111111

4444444444 4444444444 4444444444 4444444444 4444444444 4444444444 4444444444 4444444444

4444444444 4444444444 4444444444 4444444444 4444444444 4444444444 4444444444 4444444444

4444444444 4444444444 4444444444 4444444444 4444444444 4444444444 4444444444 4444444444

4444444444 4444444444 4444444444 4444444444 4444444444 4444444444 4444444444 4444444444

4444444444 4444444444 4444444444 4444444444 4444444444 4444444444 4444444444 4444444444

1111111111 4444444444 4444444444 4444444444 4444444444 4444444444 4444444444 1111111111

(a) Image graph (b) Optimum forest

Other tie-breaking policies may be incorporated to the cost function.

A.X. Falcao – p.53/122

Page 54: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Priority queue

If

V

is a binary heap, the algorithm will run inv ��w , > xzy { > � time and

v � > � storage, where w � N N

and > � N � N

.

In most applications, we can find a small integer

|

suchthat

� � � ��� � � � � � � � � |

and � � � � � � � % � � � |

(excluding, t values). The cost of pixels in

V

will beintegers in the range

} q� � q, | ~, for some cost

q

thatvaries during the algorithm. Then

V

can be a circularqueue of

|, �

entries; and the algorithm will run inv ��w , >, | �

time andv � >, | �

storage.

For small adjacency relations (sparse graphs), w >, the

algorithm will run in linear time

v � > � .A.X. Falcao – p.54/122

Page 55: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Circular priority queue

C max

minC

Q A

0123

4

K−4

K−3K−2

K−1K

A.X. Falcao – p.55/122

Page 56: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Detection of regional minima

A regional minimum is a maximal connected setp� �

ofsame gray value, such that

C ��� � r C � �

for any arc��� � � �

where � � p

and

@� p

.

9999999999 9999999999 4444444444 8888888888 9999999999 2222222222 2222222222 3333333333

2222222222 2222222222 4444444444 5555555555 9999999999 0000000000 0000000000 8888888888

3333333333 3333333333 6666666666 5555555555 9999999999 3333333333 0000000000 7777777777

4444444444 4444444444 8888888888 5555555555 9999999999 9999999999 9999999999 8888888888

5555555555 5555555555 6666666666 9999999999 9999999999 9999999999 9999999999 8888888888

5555555555 5555555555 5555555555 6666666666 9999999999 9999999999 9999999999 4444444444

A.X. Falcao – p.56/122

Page 57: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Cost function for regional minima

� �� � � � � � C � � � for all

� �

,

� �� � � � ��� � � � � � �� � � � � if

C �� � � C � �,, t otherwise.

All image pixels are root candidates.

Any optimum path starts at a regional minimum andnever goes downhill.

A.X. Falcao – p.57/122

Page 58: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Regional minima with FIFO

9999999999 9999999999 4444444444 8888888888 9999999999 2222222222 2222222222 3333333333

2222222222 2222222222 4444444444 5555555555 9999999999 0000000000 0000000000 8888888888

3333333333 3333333333 6666666666 5555555555 9999999999 3333333333 0000000000 7777777777

4444444444 4444444444 8888888888 5555555555 9999999999 9999999999 9999999999 8888888888

5555555555 5555555555 6666666666 9999999999 9999999999 9999999999 9999999999 8888888888

5555555555 5555555555 5555555555 6666666666 9999999999 9999999999 9999999999 4444444444

2222222222 2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 0000000000

2222222222 2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 0000000000

2222222222 2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 0000000000

2222222222 2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 0000000000

2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 0000000000 0000000000

2222222222 2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 4444444444

(a) Image graph (b) Optimum forest

The regional minima form the root set of the forest and each

minimum

p

is a connected component of this set.

A.X. Falcao – p.58/122

Page 59: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Regional minima with LIFO

9999999999 9999999999 4444444444 8888888888 9999999999 2222222222 2222222222 3333333333

2222222222 2222222222 4444444444 5555555555 9999999999 0000000000 0000000000 8888888888

3333333333 3333333333 6666666666 5555555555 9999999999 3333333333 0000000000 7777777777

4444444444 4444444444 8888888888 5555555555 9999999999 9999999999 9999999999 8888888888

5555555555 5555555555 6666666666 9999999999 9999999999 9999999999 9999999999 8888888888

5555555555 5555555555 5555555555 6666666666 9999999999 9999999999 9999999999 4444444444

2222222222 2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 0000000000

2222222222 2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 0000000000

2222222222 2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 0000000000

2222222222 2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 0000000000

2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 0000000000 0000000000

2222222222 2222222222 2222222222 2222222222 0000000000 0000000000 0000000000 4444444444

(a) Image graph (b) Optimum forest

The number of minima is the number of roots, and their ex-

tent is detected by selecting the pixels

where

C � � � C �S � � �

.

A.X. Falcao – p.59/122

Page 60: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Seed pixels

In some applications, we would like to use a smooth costfunction

but constrain the search to paths that start in agiven set

�� �

of seed pixels. This constraint can bemodeled by defining

� � � � � � � � � if � starts in

� �, t otherwise.

It is valid for any MI function, but not for all smooth costfunctions— in which case the IFT algorithm outputs anon-optimum spanning forest.

A seed

may not become root, because there may beanother path from

�cheaper than

� �

.

A.X. Falcao – p.60/122

Page 61: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Region-based image segmentation

Consider an MR image

B � � � � C �

of a brain, where theobject of interest is the left caudate nucleus.

A.X. Falcao – p.61/122

Page 62: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

The IFT-watershed approach

A gradient image

� � � ��� � �

obtained from

B

with the seedsselected inside and outside the left caudate nucleus.

A.X. Falcao – p.62/122

Page 63: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Cost function for the caudate nucleus

The path-cost function can be the maximum pixel intensityalong the path.

��� / � � � � � � C � � � if � �

, and, t otherwise. ��� / � � � � ��� � � � � 1 23 4 ��� / � � � � � C � �5 �

36

4

9

0

0

00

0

4

39

6

A.X. Falcao – p.63/122

Page 64: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Left caudate nucleus

Result of the IFT with FIFO policy and

-neighborhood,where the object was obtained from the root map

S.

A.X. Falcao – p.64/122

Page 65: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Left caudate nucleus

Result of the IFT with LIFO policy and

-neighborhood,where the object was obtained from the root map

S.

A.X. Falcao – p.65/122

Page 66: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Differential IFT

The differential IFT (DIFT) allows to computesequences of IFTs in a differential way.

At each iteration, trees may be marked for deletion andseeds added for a new dispute among the remainingroots.

The optimum forest, costs, and roots are updated,without running the algorithm from the beginning.

The DIFT algorithm takes time proportional to the numberof pixels whose optimum values need to be updated.

A.X. Falcao – p.66/122

Page 67: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Differential IFT

Tb

Tc

Tb

Tc

Td

Tb

Ta

Tc c

b

a

c d

b

c d

b

An optimum forest with trees

�a ,��� , and

��� rooted at pixels �, �

, and

� (left).

�a is marked for removal and

is added as seed (center).

The dispute involves

�, �, and

�, where

and � are represented by

pixels of

� � and�� along the bold and dashed lines (i.e. frontier

pixels between�a and these trees). The new optimum forest (right).

A.X. Falcao – p.67/122

Page 68: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

3D interactive segmentation

The DIFT algorithm has been used for multiple-objectinteractive 3D segmentation of MR-brain images usingthe watershed and fuzzy-connected approaches.

It has provided efficiency gains from 10 to 17 withrespect to our IFT implementations of these techniques.

It has reduced the user’s waiting time from 19–36seconds to 2–3 seconds to visualize in 3D the results ofeach iteration, using data sets of sizes 5-9Mvoxels andan 1.1GHz Athlon PC with 384MB RAM.

A.X. Falcao – p.68/122

Page 69: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

2D example of DIFT-watershed

Seed selection for ventricles and caudate nuclei (left). First result

shows part of the ventricles missing and part of the background as

caudate nuclei (right).

A.X. Falcao – p.69/122

Page 70: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

2D example of DIFT-watershed

Seed selection for correction. The green region shows a single tree

marked for removal (left). Corrected segmentation (right).

A.X. Falcao – p.70/122

Page 71: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Segmentation from the cost map

In some situations, objects are darker/brighter than theirnearby background.

An MR image of a wrist where the bigger bone is the object of inter-

est for segmentation.

A.X. Falcao – p.71/122

Page 72: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Cost function for the wrist

First, suppose that the object was darker than its nearbybackground. ��� / � � � � assigns to � the maximum pixel intensity along

it (i.e. once � starts in a certain gray level, its cost cannever go down).

If a single seed was selected inside the object, theresulting cost map using

�� / � would be darker insideand brighter outside it.

Then, the object could be segmented by simplethresholding.

A.X. Falcao – p.72/122

Page 73: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Cost function for the wrist

The dual operation applies to the case of the wrist boneand results from the complement of the cost map obtainedby using a cost function

� ��� / � � � � � � | � C � � � if � �, and, t otherwise.� ��� / � � � � ��� � � � � 1 23 4 � ��� / � � � � � | � C � �5 �

where

|

is the maximum ofC

.

A.X. Falcao – p.73/122

Page 74: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Bone of the wrist

Seed selection (left) and the complement of the cost map obtained

by using

�[��� a � cost function (right).

A.X. Falcao – p.74/122

Page 75: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Bone of the wrist

The holes within the bone (left) can be closed if we applythe same strategy using

�� / � cost function and one pixel ofthe image border as seed (right).

A.X. Falcao – p.75/122

Page 76: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Bone of the wrist

The bone is segmented by thresholding the last image.

A.X. Falcao – p.76/122

Page 77: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Filtering by reconstruction

It is known that holes may appear in 3D renditionswhenever we use one-voxel to one-pixel projection.

A.X. Falcao – p.77/122

Page 78: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Filtering by reconstruction

A simple morphological closing operation using a disk ofradius

Q

(Euclidean adjacency) as structuring elementcloses the holes, but also looses details.

A.X. Falcao – p.78/122

Page 79: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Cost function for the skull

(A) (B)

(A) The original image in blue and the closed image in (red). The

closed image is taken as a handicap cost image in the

[ �� a � function.

(B) The resulting cost map is shown in red.

A.X. Falcao – p.79/122

Page 80: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Cost function for the skull

The cost function becomes a simple variation of �� / � .

)(� �� � � � � � " � � � )( � � � � � � ��� � � � � 1 2 3 4 )(� �� � � � � C � �5 �

where

" � � & C � �

, for all

� �

. The cost map

q

is the result

of the morphological superior reconstruction of

C

from

"

.

A.X. Falcao – p.80/122

Page 81: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Filtering by reconstruction

The operation is called closing by reconstruction.

A.X. Falcao – p.81/122

Page 82: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Filtering by reconstruction

Function

(� �� has also a dual function, which providesin

q

the inferior reconstruction of

C

from"

, when" � � � C � �

for all

� �

.

Together they provide many other image operators,such as area closing/opening,leveling, closing ofbasins, opening of domes, h-basins, h-domes, etc.

The root map

S

obtained from (� �� function is the

catchment basins of the watershed transform of

q

froma grayscale marker

", when

C � � r " � �

for all

� �

.

If we use seed pixels, the root map

S

is the catchmentbasins of the watershed from markers, and markerimposition is obtained whenever

" � � r C � �

for LIFOpolicy and

" � � � C � �

for FIFO policy.

A.X. Falcao – p.82/122

Page 83: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Segmentation by local reconstruction

A CT image of a knee where one seed

is selected inside the femur

with handicap

c d � e�� f d � e, but less than the brightness of the femur’s

border (left). The interior of the bone can be extracted from the root

map

(right).

A.X. Falcao – p.83/122

Page 84: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Local superior reconstruction

The local superior reconstruction is a variant which fills upone or more basins, selected by a seed set

�, up to levels

specified by given handicaps

" � �su C � �

for � �

. Its costfunction is

�� ( � � � � � � � � " � �

, if

� �, and, t otherwise,

�� (� �� � � � ��� � � � � ��� � � � � � � if

�� � � � � � u C � �

,, t � otherwise.

It has been used for image filtering by area closing and im-

age segmentation.

A.X. Falcao – p.84/122

Page 85: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Boundary tracking

Consider the problem of finding an optimum curve that isconstrained to pass through a given sequence� � � �� � � � � �

of

landmarks (pixel sets) on the object’sboundary, in that order, starting in � and ending in � .

MR-image where the talus is the object of interest.

A.X. Falcao – p.85/122

Page 86: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Boundary tracking

If

is MI, the curve consists of

� � �

segments�� � � �� � � � ��  � , where �� is an

-optimum pathconnecting � to � �� .

The problem can be solved by

� � �executions of the

IFT, where each stage can be terminated as soon asthe last pixel of the target set � �� is removed from thequeue.

The curve is obtained from the predecessor maps=�  � � =�   �� � � � =� .

The curve can be closed by making

¡� � ¡� andcomputing an extra path from the last to the first pixel ofthe opened curve.

A.X. Falcao – p.86/122

Page 87: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Cost function for the talus

PE � /� � � � � � �¢£

£¥¤; � if

� � �

and � ¡� ,q� � � � if

�u �and

� ¡� ,, t � otherwise. PE � /� � � � � ��� � � � � PE � /� � � � �, . ��� � � �

where . ��� � � � | � 1 23 4 � ��� � � � ¦ ��� � � � ; 5

, where

� ��� � �

is a

gradient vector estimated at the midpoint of arc

��� � �

; 6 �� � �

is the arc

��� � �

rotated 90 degrees counter-clockwise; and

|

is an upper bound forN � ��� � � � 6 ��� � � N

.

A.X. Falcao – p.87/122

Page 88: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Boundary orientation

t s

G(s,t)

t s

G(s,t)

a(s,t)

a(s,t)

Figure on the left shows when the cost assignment will not favor

dkj l � e

orientation and the other way around is shown on the right.

A.X. Falcao – p.88/122

Page 89: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Optimum boundary of the talus

Result of the IFTs with FIFO policy and

§

-neighborhood.

A.X. Falcao – p.89/122

Page 90: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Live wire

Live wire becomes a particular case of this optimumformulation for boundary tracking, where the sets

¡� arechosen by the user during image segmentation.

A.X. Falcao – p.90/122

Page 91: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Live wire

A.X. Falcao – p.91/122

Page 92: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Live-wire-on-the-fly

Note that its most recent variant, called live-wire-on-the-fly,is another example of IFT being computed in a differentialway.

A.X. Falcao – p.92/122

Page 93: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Euclidean distance transform (EDT)

The EDT of a given seed set

� � �

assigns to each imagepixel

� �

a value

q � �

, which is the minimum Euclideandistance from

to

.

A fish contour (left) and its EDT (right).

A.X. Falcao – p.93/122

Page 94: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Cost function for the EDT

�� * � � � � � � ; � if

� �

, and, t otherwise. �� * � � � � ��� � � � � � $OE � $� � , � FE � F� � �

where ¨ is the initial pixel of � (or better,

S ��� �

during the

execution of the algorithm). The EDT can be obtained by

computing the IFT with FIFO policy and the squared root of

its resulting cost map

q.

A.X. Falcao – p.94/122

Page 95: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Example of the EDT

Consider a directed graph whose nodes are the imagepixels of a binary image

B

and whose arcs are defined by an�

-neighborhood relation. The seed set

�is composed by

contour pixels.

0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000

0000000000 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000

0000000000 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000

0000000000 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000

0000000000 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000

0000000000 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000

0000000000 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000

0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000

A.X. Falcao – p.95/122

Page 96: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

The Euclidean distance map

2222222222 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 2222222222

1111111111 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 1111111111

1111111111 0000000000 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000 1111111111

1111111111 0000000000 1111111111 4444444444 4444444444 4444444444 4444444444 1111111111 0000000000 1111111111

1111111111 0000000000 1111111111 4444444444 4444444444 4444444444 4444444444 1111111111 0000000000 1111111111

1111111111 0000000000 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000 1111111111

1111111111 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 1111111111

2222222222 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 2222222222

The cost map

©

shows the squared Euclidean distance values.

©

can be used to compute the multiscale fractal dimension of

ª

.

A.X. Falcao – p.96/122

Page 97: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Discrete Voronoi regions

The influence zones of the contour pixels definediscrete Voronoi regions in the root map

S.

Each contour pixel

� �

can be associated with asubsequent integer number

U � �

from�

to

«, while

circumscribing the contour.

A label map

U

may be created from the root map

S

bysetting

U � � X U �S � � �

, or the labels may be propagatedduring the algorithm.

The label mapU

can be used to compute multiscale skele-

tons and salience points along the contour.

A.X. Falcao – p.97/122

Page 98: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Discrete Voronoi regions

24242424242424242424 24242424242424242424 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 7777777777 7777777777

24242424242424242424 24242424242424242424 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 7777777777 7777777777

23232323232323232323 23232323232323232323 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 8888888888 8888888888

22222222222222222222 22222222222222222222 22222222222222222222 2222222222 3333333333 4444444444 5555555555 9999999999 9999999999 9999999999

21212121212121212121 21212121212121212121 21212121212121212121 21212121212121212121 16161616161616161616 15151515151515151515 10101010101010101010 10101010101010101010 10101010101010101010 10101010101010101010

20202020202020202020 20202020202020202020 20202020202020202020 17171717171717171717 16161616161616161616 15151515151515151515 14141414141414141414 11111111111111111111 11111111111111111111 11111111111111111111

19191919191919191919 19191919191919191919 18181818181818181818 17171717171717171717 16161616161616161616 15151515151515151515 14141414141414141414 13131313131313131313 12121212121212121212 12121212121212121212

19191919191919191919 19191919191919191919 18181818181818181818 17171717171717171717 16161616161616161616 15151515151515151515 14141414141414141414 13131313131313131313 12121212121212121212 12121212121212121212

The label map

Ushows the influence zone of each contour

pixel.

A.X. Falcao – p.98/122

Page 99: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Some observations

Although

�� * � is not smooth for some combinations of

and ,

-neighborhood seems to be enough for mostpractical situations.

Even when

�� * � is not smooth, and the IFT can notoutput exact distance values,

�-connected regions are

essential to obtain one-pixel-wide and connectedskeletons.

A.X. Falcao – p.99/122

Page 100: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Multiscale skeletons

Internal and external multiscale skeletons of a close curve�­¬ �

can be obtained from the label map

Uby assigning to

each pixel � � �

a difference value

® �� � � 1 23¯ ° (²± E ³µ´ ¶ 4 1 ·¹¸ 4 U � � � U ��� � � « � � U � � � U �� � �5 5 �

where

«

is the number of contour pixels and is the

:

-

neighborhood relation.

A.X. Falcao – p.100/122

Page 101: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Example of MS-skeletons

24242424242424242424 24242424242424242424 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 7777777777 7777777777

24242424242424242424 24242424242424242424 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 7777777777 7777777777

23232323232323232323 23232323232323232323 1111111111 2222222222 3333333333 4444444444 5555555555 6666666666 8888888888 8888888888

22222222222222222222 22222222222222222222 22222222222222222222 2222222222 3333333333 4444444444 5555555555 9999999999 9999999999 9999999999

21212121212121212121 21212121212121212121 21212121212121212121 21212121212121212121 16161616161616161616 15151515151515151515 10101010101010101010 10101010101010101010 10101010101010101010 10101010101010101010

20202020202020202020 20202020202020202020 20202020202020202020 17171717171717171717 16161616161616161616 15151515151515151515 14141414141414141414 11111111111111111111 11111111111111111111 11111111111111111111

19191919191919191919 19191919191919191919 18181818181818181818 17171717171717171717 16161616161616161616 15151515151515151515 14141414141414141414 13131313131313131313 12121212121212121212 12121212121212121212

19191919191919191919 19191919191919191919 18181818181818181818 17171717171717171717 16161616161616161616 15151515151515151515 14141414141414141414 13131313131313131313 12121212121212121212 12121212121212121212

0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000

0000000000 0000000000 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000

0000000000 1111111111 2222222222 1111111111 1111111111 1111111111 1111111111 3333333333 1111111111 0000000000

0000000000 1111111111 0000000000 4444444444 10101010101010101010 11111111111111111111 5555555555 1111111111 1111111111 0000000000

0000000000 1111111111 1111111111 0000000000 5555555555 1111111111 5555555555 1111111111 1111111111 0000000000

0000000000 1111111111 1111111111 4444444444 1111111111 1111111111 1111111111 3333333333 1111111111 0000000000

0000000000 1111111111 2222222222 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000

0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000

The label map

º

(left) and the skeleton scale map

»

inside the object

only (right).

A.X. Falcao – p.101/122

Page 102: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Example of MS-skeletons

0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000

0000000000 0000000000 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000

0000000000 1111111111 2222222222 1111111111 1111111111 1111111111 1111111111 3333333333 1111111111 0000000000

0000000000 1111111111 0000000000 4444444444 10101010101010101010 11111111111111111111 5555555555 1111111111 1111111111 0000000000

0000000000 1111111111 1111111111 0000000000 5555555555 1111111111 5555555555 1111111111 1111111111 0000000000

0000000000 1111111111 1111111111 4444444444 1111111111 1111111111 1111111111 3333333333 1111111111 0000000000

0000000000 1111111111 2222222222 1111111111 1111111111 1111111111 1111111111 1111111111 1111111111 0000000000

0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000

0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000

0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000

0000000000 0000000000 1111111111 0000000000 0000000000 0000000000 0000000000 1111111111 0000000000 0000000000

0000000000 0000000000 0000000000 1111111111 1111111111 1111111111 1111111111 0000000000 0000000000 0000000000

0000000000 0000000000 0000000000 0000000000 1111111111 0000000000 1111111111 0000000000 0000000000 0000000000

0000000000 0000000000 0000000000 1111111111 0000000000 0000000000 0000000000 1111111111 0000000000 0000000000

0000000000 0000000000 1111111111 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000

0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000 0000000000

One-pixel wide and connected skeletons (right) can be obtained by

thresholding

»(left) at various scales.

A.X. Falcao – p.102/122

Page 103: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

MS-skeletons for the fish contour

Labeled contour (left) and label map

º

(right).

A.X. Falcao – p.103/122

Page 104: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Multiscale skeletons

MS-skeletons (left) and a skeleton obtained by thresholding (right).

A.X. Falcao – p.104/122

Page 105: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Multiscale skeletons

The skeletons become more simplified as the threshold increases.

A.X. Falcao – p.105/122

Page 106: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Salience points

The salience points of a curve can be informally defined asits higher curvature points.

Convex points are shown in blue and concave points in red.

A.X. Falcao – p.106/122

Page 107: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Salience values

Consider a small radius � forming a narrow band

¼

of sizeL �

around a curve

ª

.

Each salience point has two influence areas within

¼, one

outside and one inside

ª

.

Convex points have higher influence areas outside than inside,

and the other way around is true for concave points.

½ ½ ½ ½ ½½ ½ ½ ½ ½½ ½ ½ ½ ½½ ½ ½ ½ ½½ ½ ½ ½ ½¾ ¾ ¾ ¾ ¾¾ ¾ ¾ ¾ ¾¾ ¾ ¾ ¾ ¾¾ ¾ ¾ ¾ ¾¿ ¿ ¿¿ ¿ ¿¿ ¿ ¿¿ ¿ ¿¿ ¿ ¿ À ÀÀ ÀÀ ÀÀ À

Á Á ÁÁ Á Á Â ÂÂ ÂÃ Ã Ã ÃÃ Ã Ã ÃÃ Ã Ã ÃÄ Ä Ä ÄÄ Ä Ä ÄÄ Ä Ä Ä

A

B

The salience value of a point is its highest influence area.

A.X. Falcao – p.107/122

Page 108: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Detection of salience points

The salience value

Å

of a point relates to the apertureangle

Æ

by the formula

Å � Ç� È .Å

can be coomputed from the histogram of the labelmap

U

.

Salience points can be detected by thresholding

Æ

.

Small values of ¨ reduce cross-influence in this methodfrom opposite parts of the contour which come close toeach other.

The method works fine for skeletons, but not for contours

which are usually more intricate shapes.

A.X. Falcao – p.108/122

Page 109: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Detection of salience points on contours

Salience points of the contour can be related to salience points of

its internal and external skeletons by means of the skeleton scale

map

»

and root map

.

b a

dc

c

ba

d

For a clockwise labeled contour: if

� d � e J �

, � is reached by skippingÉ Ê � Ë Ì pixels in anti-clockwise from

(left); and if

� d � e J �

, � is reached

from

by skippingÉ Ê � Ë Ì pixels in clockwise (right). But, how do we

know if the root of � is �

or

?A.X. Falcao – p.109/122

Page 110: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Detection of salience points on contours

The skeleton scale value at a pixel j Í Î

is

» dkj e J Ï ÐÑÒ ÊÔÓÔÕ Ö ËØ× Ù Ú Ï ÛÝÜ Ú º d � eon º dj el Þn d º d � eon º dkj e eß ß l

where

Þ

is the number of contour pixels and\

is the^

-neighborhood relation.

The root of � will be

wheneverº d � eon º dkj e � Þn d º d � e n º dkj e e, where

º d � e J º d � e

andº dj e J º d � e

.

The root of � will be�

wheneverº d � eon º dkj eáà Þn d º d � e n º dkj e e

, where

º d � e J º d � e

andº dj e J º d � e.

A.X. Falcao – p.110/122

Page 111: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Signed ms-skeletons

The solution is to sign the ms-skeletons

®

.

1. For all pixels � � �

, do

2. Set

â +/0 X � t.3. For all pixels

, such that

�� � � � Å, do

4. Set

â X 1 ·¸ 4 U � � � U ��� � � « � � U � � � U ��� � �5

and

ã X , �

.

5. If

â � } « � � U � � � U ��� � � ~, then set ã X � �

.

6. If

âu â +/0 , then set

â +/0 X â

and � �sä > X ã.7. Set

® ��� � X � � ä > å â +/0 .

A.X. Falcao – p.111/122

Page 112: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Salience points of a contour

Salience points on the internal (left) and external (center) skeletons.

Salience points on the contour (right).

A.X. Falcao – p.112/122

Page 113: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Contour salience descriptor

The contour salience descriptor consists of the relativeposition of each salience point along the contour withrespect to a starting point, the salience values for thesepoints, and a matching algorithm.

-0.3-0.25-0.2

-0.15-0.1

-0.050

0.050.1

0.150.2

0 0.2 0.4 0.6 0.8 1

Infl

uenc

e A

rea

Contour point

A B

C

D E

FG

H I

J

K

A.X. Falcao – p.113/122

Page 114: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Fractal dimension

The Fractal dimension of a set

by Minkowski-Bouligand isa number

æ

within

}; � Q ~

.

æ � Q � x · 1� ç èx¸ � Å � ¨ � �

x¸ � ¨ � �where

Å � ¨ � is the area of

dilated by a radius ¨. It represents

the self-similarity of

for ¨ close to;

. Note that,

Å

is simply

the cummulative histogram of the Euclidean distance map

which can be obtained from the cost map

q

.

A.X. Falcao – p.114/122

Page 115: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Euclidean distance map

A.X. Falcao – p.115/122

Page 116: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Standard approach for computing

8.5

9

9.5

10

10.5

11

11.5

12

12.5

13

1 2 3 4 5 6

Log

(A)

Log(r)

observed valuesfitted straight line

A shape similar to the Koch star, which has

æêé �� Që

(left). A

line is fitted to the curve (right), and its first derivative is used

to estimateæ

(æ é �� Q R

).

A.X. Falcao – p.116/122

Page 117: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Multiscale fractal dimension

We use polynomial regression for fitting (left) and

ìbecomes a

polynomial curve, called multiscale fractal dimension (right).

8.5

9

9.5

10

10.5

11

11.5

12

12.5

13

1 2 3 4 5 6

Log

(A)

Log(r)

observed valuespolynomial regression

0.8

0.85

0.9

0.95

1

1.05

1.1

1.15

1.2

1.25

1.3

1 1.5 2 2.5 3 3.5 4 4.5 5 5.5

Frac

tal D

imen

sion

(F)

Log(r)

Note that, the maximum value of the curve is close to 1.26, providing

much richer description of the self-similarity of

ª

.

A.X. Falcao – p.117/122

Page 118: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Shape analysis

Multiscale Fractal Dimention (MFD) and ContourSalience Descriptor (CSD) have been compared toCurvature Scale Space (CSS), Bean Angle Statistics(BAS), Moment Invariants (MIV), Fourier Descriptors(FD), and Simple Fractal Dimension (SFD) for shapeclassification using a database of 11,000 fish contoursand 1,100 classes.

CSD was the most effective among them, for thisparticular application, and MFD was competitive withFD and BAS, and superior to SFD and MIV.

A.X. Falcao – p.118/122

Page 119: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Combining image operators

Image of blood cells (left). Area opening by IFT (center). Threshold-

ing and morphological opening (right).

A.X. Falcao – p.119/122

Page 120: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Combining image operators

Distance transform by IFT (left). Regional maxima by IFT (center).

Local reconstruction by IFT (right).

A.X. Falcao – p.120/122

Page 121: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Current work

Procedures for automatic seed selection duringinteractive 3D segmentation.

More effective path-cost functions for 3D segmentationof MR-images of the brain and the evaluation of themethods.

Methods that combine boundary tracking and activecontours for image segmentation.

Automatic image operators based on the DIFT.

3D multiscale skeletonization.

Further improvements on multiscale fractal dimensionand contour salience descriptor.

A.X. Falcao – p.121/122

Page 122: Image Foresting Transformafalcao/talks/ift04.pdffective image processing operators based on connectivity. A.X. Falcao˜ – p.3/122 Motivation Unification Image operators can be derived

Conclusion

The IFT provides a different way to look at imageprocessing operations.

To develop an image operator based on the IFT, oneneeds to

relate the operator to an optimum image partitionproblem with connectivity restriction,find suitable adjacency relation and smoothpath-cost function, andapply some local processing to the output of the IFTalgorithm.

A.X. Falcao – p.122/122