shape representation and descriptionafalcao/mo443/slides-aula29.pdf · and erosions of s[1]....

77
Shape Representation and Description Alexandre Falc˜ ao Institute of Computing - University of Campinas [email protected] Alexandre Falc˜ ao MC920/MO443 - Indrodu¸ ao ao Proc. de Imagens

Upload: others

Post on 12-Oct-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Shape Representation and Description

Alexandre Falcao

Institute of Computing - University of Campinas

[email protected]

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 2: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

A segmented object may contain multiple boundaries.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 3: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

A segmented object may contain multiple boundaries.

We will focus on 2D boundaries represented by closed,connected and oriented curves (contours).

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 4: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

A segmented object may contain multiple boundaries.

We will focus on 2D boundaries represented by closed,connected and oriented curves (contours).

Each contour defines a shape whose properties are veryimportant for image analysis.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 5: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

Other shape representations can be derived from a contourand their properties are usually encoded in a more compactrepresentation (i.e., feature vector).

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 6: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

Other shape representations can be derived from a contourand their properties are usually encoded in a more compactrepresentation (i.e., feature vector).

Some feature vectors require specific distance functions tocompute shape similarities independently of their orientationand size.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 7: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

Other shape representations can be derived from a contourand their properties are usually encoded in a more compactrepresentation (i.e., feature vector).

Some feature vectors require specific distance functions tocompute shape similarities independently of their orientationand size.

The pair, feature extraction function and distance function, iscalled here a descriptor.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 8: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

The Euclidean IFT from a contour S (lecture 2) creates in V

multiscale contours (iso-contours) by subsequent exact dilationsand erosions of S [1].

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 9: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

Each contour is related to its internal and external skeletons(point sets with at least two equidistant pixels in the contour).

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 10: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

Each contour is related to its internal and external skeletons(point sets with at least two equidistant pixels in the contour).

The Euclidean IFT can output a labeled map L, which is usedto create internal and external multiscale skeletons.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 11: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

Each contour is related to its internal and external skeletons(point sets with at least two equidistant pixels in the contour).

The Euclidean IFT can output a labeled map L, which is usedto create internal and external multiscale skeletons.

These skeletons present a highly desirable characteristic ofbeing one-pixel-wide and connected in all scales.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 12: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

Each contour is related to its internal and external skeletons(point sets with at least two equidistant pixels in the contour).

The Euclidean IFT can output a labeled map L, which is usedto create internal and external multiscale skeletons.

These skeletons present a highly desirable characteristic ofbeing one-pixel-wide and connected in all scales.

In the presence of multiple contours, a simple variantcomputes the skeleton by influence zones (SKIZ — a point setwith equidistant pixels in at least two contours).

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 13: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

A given contour S.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 14: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

A given contour S.

Pixels along S receive a subsequentlabel from 1 to |S|.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 15: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

A given contour S.

Pixels along S receive a subsequentlabel from 1 to |S|.

The labels are propagated to forma label map L (discrete Voronoiregions).

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 16: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

A given contour S.

Pixels along S receive a subsequentlabel from 1 to |S|.

The labels are propagated to forma label map L (discrete Voronoiregions).

A multiscale skeleton is createdfrom local differences in L.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 17: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

A given contour S.

Pixels along S receive a subsequentlabel from 1 to |S|.

The labels are propagated to forma label map L (discrete Voronoiregions).

A multiscale skeleton is createdfrom local differences in L.

Skeletons are obtained bythresholding the multiscale skeletonat increasing scales.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 18: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

A given contour S.

Pixels along S receive a subsequentlabel from 1 to |S|.

The labels are propagated to forma label map L (discrete Voronoiregions).

A multiscale skeleton is createdfrom local differences in L.

Skeletons are obtained bythresholding the multiscale skeletonat increasing scales.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 19: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

A given contour S.

Pixels along S receive a subsequentlabel from 1 to |S|.

The labels are propagated to forma label map L (discrete Voronoiregions).

A multiscale skeleton is createdfrom local differences in L.

Skeletons are obtained bythresholding the multiscale skeletonat increasing scales.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 20: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

The Euclidean IFT with a smalldilation radius from an internalskeleton S creates a root map R ,

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 21: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

The Euclidean IFT with a smalldilation radius from an internalskeleton S creates a root map R ,

the aperture angles of the discreteVoronoi regions in R are used todetect salience points of theskeleton,

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 22: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

The Euclidean IFT with a smalldilation radius from an internalskeleton S creates a root map R ,

the aperture angles of the discreteVoronoi regions in R are used todetect salience points of theskeleton,

from salience points of the internaland external skeletons, we detectconvex and concave salience pointsof the contour.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 23: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

The Euclidean IFT can also speed up the computation of thelargest ellipse (tensor scale) centered at each pixel, creating aregion-based shape representation.

Orientation(s) = angle betweent1(s) and the horizontal axis.

Anisotropy(s) =

1−|t2(s)|2

|t1(s)|2.

Thickness(s) = |t2(s)|.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 24: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Introduction

By using the HSI color space, the tensor orientation at each pixel isrepresented by a distinct color.

The region-based representation stores orientation and anisotropyat each pixel.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 25: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Organization of the lecture

Muliscale skeletonization and SKIZ [1].

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 26: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Organization of the lecture

Muliscale skeletonization and SKIZ [1].

Contour and skeleton saliences [2].

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 27: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Organization of the lecture

Muliscale skeletonization and SKIZ [1].

Contour and skeleton saliences [2].

Tensor scale computation [3].

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 28: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Organization of the lecture

Muliscale skeletonization and SKIZ [1].

Contour and skeleton saliences [2].

Tensor scale computation [3].

Shape description from these representations [4].

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 29: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Organization of the lecture

Muliscale skeletonization and SKIZ [1].

Contour and skeleton saliences [2].

Tensor scale computation [3].

Shape description from these representations [4].

Combining multiple descriptors [5].

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 30: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletonization and SKIZ

Consider a binary image I = (DI , I ) with m disjoint contoursSi ⊂ DI , i = 1, 2, . . . ,m.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 31: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletonization and SKIZ

Consider a binary image I = (DI , I ) with m disjoint contoursSi ⊂ DI , i = 1, 2, . . . ,m.

By circumscribing each contour in a given orientation(clockwise), a function λp(t) assigns to each pixel t ∈ Si asubsequent integer number from 1 to |Si |.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 32: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletonization and SKIZ

Consider a binary image I = (DI , I ) with m disjoint contoursSi ⊂ DI , i = 1, 2, . . . ,m.

By circumscribing each contour in a given orientation(clockwise), a function λp(t) assigns to each pixel t ∈ Si asubsequent integer number from 1 to |Si |.

Each contour pixel also receives a number i = 1, 2, . . . ,m by afunction λc(t) to identify its contour.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 33: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletonization and SKIZ

Let S = ∪ci=1Si be the union set of all contour pixels.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 34: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletonization and SKIZ

Let S = ∪ci=1Si be the union set of all contour pixels.

The Euclidean IFT propagates contour pixel labels in Lp andcontour labels in Lc inside and outside the contours by usingA√

2 (8-neighbors) and path function feuc ,

feuc(〈t〉) =

{

0 if t ∈ S,+∞ otherwise,

feuc(πs · 〈s, t〉) = ‖t − R(πs)‖2.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 35: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletons and SKIZ

Algorithm

– Euclidean IFT with label propagation

1. For each t ∈ DI\S, set V (t)← +∞ and R(πt)← t.

2. For each t ∈ S, do3. Set V (t)← 0, Lp(t)← λp(t), and Lc(t)← λc(t).4. Insert t in Q.

5. While Q is not empty, do

6. Remove from Q a pixel s such that V (s) is minimum.

7. For each t ∈ A√

2(s) such that V (t) > V (s), do8. Compute tmp ← ‖t − R(πs)‖

2.

9. If tmp < V (t), then10. If V (t) 6= +∞, remove t from Q.

11. Set V (t)← tmp and R(πt)← R(πs).12. Set Lp(t)← Lp(s) and Lc(t)← Lc(s).13. Insert t in Q.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 36: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletons and SKIZ

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 37: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletons and SKIZ

Multiscale skeletons and SKIZ are computed from Lp(s) andLc(s), respectively, creating a difference map D(s).

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 38: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletons and SKIZ

Multiscale skeletons and SKIZ are computed from Lp(s) andLc(s), respectively, creating a difference map D(s).

SKIZ and one-pixel wide and connected skeletons are thenobtained by thresholding D(s). Higher the threshold, moresimplified become the skeletons.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 39: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletons and SKIZ

Multiscale skeletons and SKIZ are computed from Lp(s) andLc(s), respectively, creating a difference map D(s).

SKIZ and one-pixel wide and connected skeletons are thenobtained by thresholding D(s). Higher the threshold, moresimplified become the skeletons.

Multiscale skeletons and SKIZ are computed as follows.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 40: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletons and SKIZ

Each pair of contour points in Si “equidistant” to a pixel s 6∈ Sidefines two segments between them. Among the shortest segmentsfrom each pair, the length of the longest one (blue line) is assignedto D(s).

R(πt )

R(πs)

t

s

a = b

c =

d

This condition is relaxed by computing segment lengths betweenroot points (a, b, c , and d) related to s and its 4-neighbors.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 41: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletons and SKIZ

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 42: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletons and SKIZ

If Lc(s) = Lc(t) = i for all t ∈ A1(s), then

∆(s, t) = Lp(t)− Lp(s)

D(s) = max∀(s,t)∈A1

{min{∆(s, t), |Si | −∆(s, t)}}.

Note that, for clockwise contour labeling, L(a) < L(b) <L(c) < L(d), and the FIFO tie-breaking policy will favor theroot with lowest label.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 43: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Multiscale skeletons and SKIZ

If Lc(s) = Lc(t) = i for all t ∈ A1(s), then

∆(s, t) = Lp(t)− Lp(s)

D(s) = max∀(s,t)∈A1

{min{∆(s, t), |Si | −∆(s, t)}}.

Note that, for clockwise contour labeling, L(a) < L(b) <L(c) < L(d), and the FIFO tie-breaking policy will favor theroot with lowest label.

When Lc(s) 6= Lc(t) for some t ∈ A1(s), then the SKIZ is inbetween pixels s and t. Since the SKIZ is never filtered bythresholding, for Lc(t) > Lc(s), D(t) = +∞ and D(s) = 0,and for Lc(t) < Lc(s), D(s) = +∞ and D(t) = 0.

Show demo program.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 44: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Skeleton saliences

How do we compute skeleton saliences?

θ

r

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 45: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Skeleton saliences

How do we compute skeleton saliences?

θ

r

The IFT dilation of the skeletons up to a small radius r (e.g.,10) produces a small influence zone for each point.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 46: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Skeleton saliences

How do we compute skeleton saliences?

θ

r

The IFT dilation of the skeletons up to a small radius r (e.g.,10) produces a small influence zone for each point.

The area A = θr2

2 of each influence zone is related to itsaperture angle θ at each point.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 47: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Skeleton saliences

How do we compute skeleton saliences?

θ

r

The IFT dilation of the skeletons up to a small radius r (e.g.,10) produces a small influence zone for each point.

The area A = θr2

2 of each influence zone is related to itsaperture angle θ at each point.

Salience points are then obtained by thresholding θ.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 48: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

How do we compute contour saliences?

For clockwise contour labeling, a contour salience a is detectedfrom a skeleton salience c by skipping D(c)

2 pixels in eitheranti-clockwise or clockwise from the root R(πc).

πcR( )πcR( )−D(c)/2

c

= aD(c)/2b

c

a = b

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 49: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

How do we compute contour saliences?

For clockwise contour labeling, a contour salience a is detectedfrom a skeleton salience c by skipping D(c)

2 pixels in eitheranti-clockwise or clockwise from the root R(πc).

πcR( )πcR( )−D(c)/2

c

= aD(c)/2b

c

a = b

However, how do we know which orientation to go?

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 50: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Contour and skeleton saliences

Let ∆∗(s, t) = Lp(t)− Lp(s) be the one which satisfies

D(s) = max∀(s,t)∈A1

{min{∆(s, t), |Si | −∆(s, t)}}.

We go anti-clockwise, when ∆∗(s, t) > |Si | −∆∗(s, t), andclockwise in the opposite case.

πcR( ) πcR( )−D(c)/2ba = = aD(c)/2

d

s=c s=c

dt

b

t

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 51: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Tensor scale computation

As proposed by Saha [6], the tensor scale at s may be computedby tracing sample lines, finding edge points in each line, and fittingthe largest ellipse through these points.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 52: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Tensor scale computation

As proposed by Saha [6], the tensor scale at s may be computedby tracing sample lines, finding edge points in each line, and fittingthe largest ellipse through these points.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 53: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Tensor scale computation

As proposed by Saha [6], the tensor scale at s may be computedby tracing sample lines, finding edge points in each line, and fittingthe largest ellipse through these points.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 54: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Tensor scale computation

As proposed by Saha [6], the tensor scale at s may be computedby tracing sample lines, finding edge points in each line, and fittingthe largest ellipse through these points.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 55: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Tensor scale computation

The Euclidean IFT speeds up the search for each pair of edgepoints by exploiting the values in V (s) [3].

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 56: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Tensor scale computation

The Euclidean IFT speeds up the search for each pair of edgepoints by exploiting the values in V (s) [3].

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 57: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Tensor scale computation

The Euclidean IFT speeds up the search for each pair of edgepoints by exploiting the values in V (s) [3].

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 58: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Tensor scale computation

The ellipse orientation is obtained from the value of γ thatminimizes function g below.

g(γ) =∑

i=1,2,...,m

[x2iγ − y2iγ ]

where

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 59: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Tensor scale computation

The ellipse orientation is obtained from the value of γ thatminimizes function g below.

g(γ) =∑

i=1,2,...,m

[x2iγ − y2iγ ]

where

m is the number of sample lines,

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 60: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Tensor scale computation

The ellipse orientation is obtained from the value of γ thatminimizes function g below.

g(γ) =∑

i=1,2,...,m

[x2iγ − y2iγ ]

where

m is the number of sample lines,

(xiγ , yiγ ) are obtained by rotation using angle γ on the relativecoordinates (xi , yi ) of the edge points with respects = (xs , ys).

xiγ = xi cos(γ)− yi sin(γ)

yiγ = xi sin(γ) + yi cos(γ)

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 61: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Organization of the lecture

Muliscale skeletonization and SKIZ.

Contour and skeleton saliences.

Tensor scale computation.

Shape description from these representations.

Combining multiple descriptors.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 62: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Shape description

A descriptor is a pair (v , d), where

v is a feature extraction function, which assigns a vector ~s toany sample s (shape, image, spel), and

d is a distance function between samples s and t in thefeature space (e.g., d(s, t) = ‖~t −~s‖).

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 63: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Shape description

r

concave

convex

Feature vectors may represent

a multiscale fractal dimension [2]computed from the distance mapV .

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 64: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Shape description

r

concave

convex

Feature vectors may represent

a multiscale fractal dimension [2]computed from the distance mapV .

area (salience value) of the largestinfluence zone [2] for each convexand concave point obtained fromthe label map Lp.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 65: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Shape description

r

concave

convex

Feature vectors may represent

a multiscale fractal dimension [2]computed from the distance mapV .

area (salience value) of the largestinfluence zone [2] for each convexand concave point obtained fromthe label map Lp.

salience values [4] of contoursegments obtained from the labelmap Lp.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 66: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Shape description

r

concave

convex

Feature vectors may represent

a multiscale fractal dimension [2]computed from the distance mapV .

area (salience value) of the largestinfluence zone [2] for each convexand concave point obtained fromthe label map Lp.

salience values [4] of contoursegments obtained from the labelmap Lp.

In most cases, a specific distance function is required to take intoaccount possible shape rotation and scaling.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 67: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Shape descriptor based on tensor scale

For example, we have divided a contour into a fixed number ofsegments and assigned to each segment the weighted angularmean of the orientation θi at each pixel s in the influence zone ofthat segment [3]. The anisotropy αi of s is the weight.

θ = arctan

(∑ni=1 αi ∗ sin(2θi )

∑ni=1 αi ∗ cos(2θi )

)

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 68: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Shape Descriptor based on tensor scale

Feature vectors for a shape in different positions.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 69: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Shape Descriptor based on tensor scale

Matching between the feature vectors for distance computation.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 70: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Combining multiple descriptors

Let ∆ = {D1,D2, . . . ,Dk} be a collection of descriptorsDi = (vi , di ), i = 1, 2, . . . , k , needed to handle differentshape, color and texture properties.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 71: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Combining multiple descriptors

Let ∆ = {D1,D2, . . . ,Dk} be a collection of descriptorsDi = (vi , di ), i = 1, 2, . . . , k , needed to handle differentshape, color and texture properties.The combination C of their distance functions is anapplication-dependent optimization problem which creates acomposite descriptor D∗ = (∆,C ).

D*

Dk

D2

D1

d1(s,t)

d2(s,t)

dk(s,t)

*(s,t)d

(b)

......

C

t

s

vi

t

vi

s

vi(t)vi(s)

di

di (s,t)

Di

(a)

We have found C by genetic programming [5].Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 72: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Conclusion

The Euclidean IFT was exploited to derive several shaperepresentations.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 73: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Conclusion

The Euclidean IFT was exploited to derive several shaperepresentations.

These representations involved multiscale skeletons, saliencepoints, and tensor scale.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 74: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Conclusion

The Euclidean IFT was exploited to derive several shaperepresentations.

These representations involved multiscale skeletons, saliencepoints, and tensor scale.

Given that contour saliences are estimated from skeletonsaliences, the multiscale skeletons can also obtain contoursaliences in different scales.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 75: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

Conclusion

The Euclidean IFT was exploited to derive several shaperepresentations.

These representations involved multiscale skeletons, saliencepoints, and tensor scale.

Given that contour saliences are estimated from skeletonsaliences, the multiscale skeletons can also obtain contoursaliences in different scales.

There are many ways to create shape descriptors from thoserepresentations and combine their distance functions into acomposite descriptor.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 76: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

[1] A.X. Falcao, L.F. Costa, and B.S. da Cunha.Multiscale skeletons by image foresting transform and itsapplications to neuromorphometry.Pattern Recognition, 35(7):1571–1582, Apr 2002.

[2] R.S. Torres, A.X. Falcao, and L.F. Costa.A graph-based approach for multiscale shape analysis.Pattern Recognition, 37(6):1163–1174, 2004.

[3] F.A. Andalo, P.A.V. Miranda, R. da S. Torres, and A.X.Falcao.Shape feature extraction and description based on tensor scale.Pattern Recognition, 43(1):26–36, Jan 2010.

[4] R.S. Torres and A.X. Falcao.Contour salience descriptors for effective image retrieval andanalysis.Image and Vision Computing, 25(1):3–13, Jan 2007.

[5] R.S. Torres, A.X. Falcao, M.A. Goncalves, J.P. Papa,B. Zhang, W. Fan, and E.A. Fox.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens

Page 77: Shape Representation and Descriptionafalcao/mo443/slides-aula29.pdf · and erosions of S[1]. Alexandre Falc˜ao MC920/MO443 - Indrodu¸c˜ao ao Proc. de Imagens. Introduction Each

A genetic programming framework for content-based imageretrieval.Pattern Recognition, 42:217–312, Feb 2009.

[6] P.K. Saha.Tensor Scale: A local morphometric parameter withapplications to computer vision and image processing.Computer Vision and Image Understanding, 99:384–413, 2005.

Alexandre Falcao MC920/MO443 - Indroducao ao Proc. de Imagens