Planting, Growing, and Pruning Trees: Connected Filters Applied to - - PowerPoint PPT Presentation

planting growing and pruning trees connected filters
SMART_READER_LITE
LIVE PREVIEW

Planting, Growing, and Pruning Trees: Connected Filters Applied to - - PowerPoint PPT Presentation

Planting, Growing, and Pruning Trees: Connected Filters Applied to Document Image Analysis Guillaume Lazzara, Thierry G eraud, Roland Levillain EPITA Research and Development Laboratory (LRDE) April 8, 2014 G. Lazzara, T. G eraud, R.


slide-1
SLIDE 1

Planting, Growing, and Pruning Trees: Connected Filters Applied to Document Image Analysis

Guillaume Lazzara, Thierry G´ eraud, Roland Levillain

EPITA Research and Development Laboratory (LRDE)

April 8, 2014

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 1

slide-2
SLIDE 2

Quotation

Reviewer 1: I wasn’t overly impressed with this paper until I saw Figure 9.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 2

slide-3
SLIDE 3

Quotation

Reviewer 1: I wasn’t overly impressed with this paper until I saw Figure 9.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 2

slide-4
SLIDE 4

Quotation

Reviewer 1: I wasn’t overly impressed with this paper until I saw Figure 9.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 2

slide-5
SLIDE 5
  • Hum. . .

We know that mathematical morphology can often look impressive. . . . . . yet, today you just need to understand ≤ and ⊂. . .

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 3

slide-6
SLIDE 6
  • Hum. . .

We know that mathematical morphology can often look impressive. . . . . . yet, today you just need to understand ≤ and ⊂. . .

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 3

slide-7
SLIDE 7
  • Hum. . .

We know that mathematical morphology can often look impressive. . . . . . yet, today you just need to understand ≤ and ⊂. . .

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 3

slide-8
SLIDE 8
  • Fig. 9

Sample uses of connected operators. Top: input images; Bottom: filtered images (results).

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 4

slide-9
SLIDE 9

The Meta Outline

Why this talk? MM filters are good for DIA people! Why is that interesting? Connected filters are little known. How does this work? By planting, growing and pruning trees. What can it be used for? Denoising, image simplification, object identification, etc.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 5

slide-10
SLIDE 10

The Meta Outline

Why this talk? MM filters are good for DIA people! Why is that interesting? Connected filters are little known. How does this work? By planting, growing and pruning trees. What can it be used for? Denoising, image simplification, object identification, etc.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 5

slide-11
SLIDE 11

The Meta Outline

Why this talk? MM filters are good for DIA people! Why is that interesting? Connected filters are little known. How does this work? By planting, growing and pruning trees. What can it be used for? Denoising, image simplification, object identification, etc.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 5

slide-12
SLIDE 12

The Meta Outline

Why this talk? MM filters are good for DIA people! Why is that interesting? Connected filters are little known. How does this work? By planting, growing and pruning trees. What can it be used for? Denoising, image simplification, object identification, etc.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 5

slide-13
SLIDE 13

The Meta Outline

Why this talk? MM filters are good for DIA people! Why is that interesting? Connected filters are little known. How does this work? By planting, growing and pruning trees. What can it be used for? Denoising, image simplification, object identification, etc.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 5

slide-14
SLIDE 14

The Meta Outline

Why this talk? MM filters are good for DIA people! Why is that interesting? Connected filters are little known. How does this work? By planting, growing and pruning trees. What can it be used for? Denoising, image simplification, object identification, etc. Evangelization from the Church of Mathematical Morphology :-)

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 5

slide-15
SLIDE 15

Three Messages from the Church

  • Regarding. . .

. . . Mathematical Morphology (MM) Refresh your vision of MM → forget ε and δ! . . . Connected Filters Powerful, simple, and well-suited to DIA. . . . Methodology Advocate gray-level morphological strategies (vs approaches based on binarization).

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 6

slide-16
SLIDE 16

Three Messages from the Church

  • Regarding. . .

. . . Mathematical Morphology (MM) Refresh your vision of MM → forget ε and δ! . . . Connected Filters Powerful, simple, and well-suited to DIA. . . . Methodology Advocate gray-level morphological strategies (vs approaches based on binarization).

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 6

slide-17
SLIDE 17

Three Messages from the Church

  • Regarding. . .

. . . Mathematical Morphology (MM) Refresh your vision of MM → forget ε and δ! . . . Connected Filters Powerful, simple, and well-suited to DIA. . . . Methodology Advocate gray-level morphological strategies (vs approaches based on binarization).

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 6

slide-18
SLIDE 18

Three Messages from the Church

  • Regarding. . .

. . . Mathematical Morphology (MM) Refresh your vision of MM → forget ε and δ! . . . Connected Filters Powerful, simple, and well-suited to DIA. . . . Methodology Advocate gray-level morphological strategies (vs approaches based on binarization).

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 6

slide-19
SLIDE 19

Departing From this Typical DIA Workflow

document image binarization binary image connected component labeling label image page segmen- tation high-level analysis component "classifi- cation" low-level analysis of components

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 7

slide-20
SLIDE 20

Departing From this Typical DIA Workflow

document image binarization binary image connected component labeling label image page segmen- tation high-level analysis component "classifi- cation" low-level analysis of components

Starting with binarization is hell!

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 7

slide-21
SLIDE 21

Components and Decomposition Principle

u = D E B A C F O A connected component of the set [u ≤ 1] = { p ∈ D, u(p) ≤ 1 } is included (so ⊂) into a component of the set [u ≤ 2] ⇒ Connected components can be arranged into trees. . .

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 8

slide-22
SLIDE 22

Components and Decomposition Principle

u = D E B A C F O A connected component of the set [u ≤ 1] = { p ∈ D, u(p) ≤ 1 } is included (so ⊂) into a component of the set [u ≤ 2] ⇒ Connected components can be arranged into trees. . .

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 8

slide-23
SLIDE 23

Components and Decomposition Principle

u = D E B A C F O A connected component of the set [u ≤ 1] = { p ∈ D, u(p) ≤ 1 } is included (so ⊂) into a component of the set [u ≤ 2] ⇒ Connected components can be arranged into trees. . .

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 8

slide-24
SLIDE 24

Components and Decomposition Principle

u = D E B A C F O A connected component of the set [u ≤ 1] = { p ∈ D, u(p) ≤ 1 } is included (so ⊂) into a component of the set [u ≤ 2] ⇒ Connected components can be arranged into trees. . .

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 8

slide-25
SLIDE 25

Components and Trees

D E B A C F O

(d) min-tree (b) max-tree (a) image (c) tree of shapes

3 2 1 A C, D, E O B F B A, F C D E O 3 2 1 A O F B C D E > 2

2

> 2 > 2 > 0

2 1

>

4

> > >

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 9

slide-26
SLIDE 26

Mathematical Morphology: Connected Operators

An interesting class of filters: Not based on structuring elements (so not like ε or δ) Considering all the connected components obtained by thresholding the image. Don’t shift contours; don’t create new ones. Intuitive, powerful, and efficient. Can be implemented as tree filtering.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 10

slide-27
SLIDE 27

Min/Max-Tree Implementation [Berger et al., 2007]

find-root(x) 1 if zpar(x) = x then return x 2 else { zpar(x) ← find-root(zpar(x)) ; return zpar(x) } compute-tree(f) 1 for each p, zpar(p) ← undef 2 R ← reverse-sort(f) // maps R into an array 3 for each p ∈ R in direct order 4 parent(p) ← p ; zpar(p) ← p 5 for each n ∈ N(p) such as zpar(n) undef 6 r ← find-root(n) 7 if r p then { parent(r) ← p ; zpar(r) ← p } 8 deallocate(zpar) 9 return pair(R, parent) // a ‘‘parent’’ function canonize-tree(parent, f) 1 for each p ∈ R in reverse order 2 q ← parent(p) 3 if f(parent(q)) = f(q) then parent(p) ← parent(q) 4 return parent // a ‘‘canonized’’ parent function

←− tree computation (no code missing!)

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 11

slide-28
SLIDE 28

Min/Max-Tree Implementation [Berger et al., 2007]

find-root(x) 1 if zpar(x) = x then return x 2 else { zpar(x) ← find-root(zpar(x)) ; return zpar(x) } compute-tree(f) 1 for each p, zpar(p) ← undef 2 R ← reverse-sort(f) // maps R into an array 3 for each p ∈ R in direct order 4 parent(p) ← p ; zpar(p) ← p 5 for each n ∈ N(p) such as zpar(n) undef 6 r ← find-root(n) 7 if r p then { parent(r) ← p ; zpar(r) ← p } 8 deallocate(zpar) 9 return pair(R, parent) // a ‘‘parent’’ function canonize-tree(parent, f) 1 for each p ∈ R in reverse order 2 q ← parent(p) 3 if f(parent(q)) = f(q) then parent(p) ← parent(q) 4 return parent // a ‘‘canonized’’ parent function

←− tree computation (no code missing!) image filtering −→ add about 10 lines of code. . .

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 11

slide-29
SLIDE 29

Connected Operators as Tree Filtering

input image initial tree filtered image tree construction attribute computation

9 7 6 4 6 4 1 9 7 6 6

attribute-based tree pruning tree with attributed nodes image reconstruction pruned tree

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 12

slide-30
SLIDE 30

Tree Pruning and Morphological Operations

Various trees leading to various operators. Pruning a max-tree Algebraic opening. Pruning a min-tree Algebraic closing. Pruning a tree of shapes Grain filter.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 13

slide-31
SLIDE 31

Structural vs Algebraic Openings

Initial image. Structural opening with a disk (r = 15). Algebraic opening (λ = πr2).

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 14

slide-32
SLIDE 32

Structural vs Algebraic Openings

Initial image. Structural opening with a disk (r = 15). Algebraic opening (λ = πr2).

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 15

slide-33
SLIDE 33

Application: Filtering Everything But Boxes

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 16

slide-34
SLIDE 34

Application: Showing Filtered Lines

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 17

slide-35
SLIDE 35

Application: An Image Featuring Almost Only Text

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 18

slide-36
SLIDE 36

Connected Filters: Conclusion

Benefits Non destructive (preserve contours). Sound and strong mathematical properties [Soille, 2004, Najman and Talbot, 2010]. Take into account all components. Really intuitive to use. Very extensible (many attributes). Efficient.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 19

slide-37
SLIDE 37

Connected Filters: Conclusion

Applications in Document Image Analysis Line extraction Foreground/background separation Text identification Page segmentation Region classification Object (e.g. logo) spotting Document repairing Denoising “Smart” binarization Image compression Etc.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 20

slide-38
SLIDE 38

Implementation: The Olena Platform

Code and tools available in Olena, a free software image processing platform. http://olena.lrde.epita.fr Milena A generic and efficient C++ image processing library [Levillain et al., 2010]. Scribo A framework for Document Image Analysis [Lazzara et al., 2011].

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 21

slide-39
SLIDE 39

Thank You!

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 22

slide-40
SLIDE 40

Bibliography I

Berger, C., G´ eraud, T., Levillain, R., Widynski, N., Baillard, A., and Bertin, E. (2007). Effective component tree computation with application to pattern recognition in astronomical imaging. In Proceedings of the IEEE International Conference on Image Processing (ICIP), volume 4, pages 41–44. Lazzara, G., Levillain, R., G´ eraud, T., Jacquelet, Y., Marquegnies, J., and Cr´ epin-Leblond, A. (2011). The SCRIBO module of the Olena platform: a free software framework for document image analysis. In Proceedings of the International Conference on Document Analysis and Recognition (ICDAR).

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 23

slide-41
SLIDE 41

Bibliography II

Levillain, R., G´ eraud, T., and Najman, L. (2010). Why and how to design a generic and efficient image processing framework: The case of the Milena library. In Proceedings of the IEEE International Conference on Image Processing (ICIP), pages 1941–1944. Najman, L. and Talbot, H., editors (2010). Mathematical Morphology—From Theory to Applications. ISTE & Wiley. Soille, P . (2004). Morphological Image Analysis: Principles and Applications. Springer, 2 edition.

  • G. Lazzara, T. G´

eraud, R. Levillain (EPITA) Connected Filters Applied to Document Image Analysis 2014-04-08 24