The milena Image Processing Library Thierry G eraud, Roland - - PowerPoint PPT Presentation

the milena image processing library
SMART_READER_LITE
LIVE PREVIEW

The milena Image Processing Library Thierry G eraud, Roland - - PowerPoint PPT Presentation

The milena Image Processing Library Thierry G eraud, Roland Levillain, Guillaume Lazzara EPITA Research and Development Laboratory (LRDE) 27/06/2012 milena team (LRDE) The milena Image Processing Library 27/06/2012 1 / 18 The Olena Platform


slide-1
SLIDE 1

The milena Image Processing Library

Thierry G´ eraud, Roland Levillain, Guillaume Lazzara

EPITA Research and Development Laboratory (LRDE)

27/06/2012

milena team (LRDE) The milena Image Processing Library 27/06/2012 1 / 18

slide-2
SLIDE 2

The Olena Platform

What? Olena: a platform for Image Processing (IP), including: Milena: an IP library in C++ Some Python bindings over Milena Dedicated (applied) modules

e.g. for Document Image Analysis (DIA)

Who? Authors: EPITA Research and Development Laboratory (LRDE) Users/public: IP practitioners How? Requirements: a C++98/03 (or more recent) compiler Distribution:

▸ tarballs (.tar.gz, .tar.bz2) ▸ Debian packages (.deb) ▸ MacPorts package, ▸ next winter: RPM package(s) (.rpm) milena team (LRDE) The milena Image Processing Library 27/06/2012 2 / 18

slide-3
SLIDE 3

Olena: Model, Organization & Infrastructure

Model Free and Open Source Software License: GNU General Public Licence, version 2 Virtually all material is public (code, documentation, access to tools, etc.) Infrastructure Based on Free Software Public source code repository (Git) Automatic build and continuous integration (BuildBot) Ticket management/bug tracker (Trac) Mailing lists (Mailman) Online (HTML & PDF) reference documentation (Doxygen) Wiki (TWiki) Organization 2 maintainers (permanent staff) More than 50 contributors for almost 15 years

milena team (LRDE) The milena Image Processing Library 27/06/2012 3 / 18

slide-4
SLIDE 4

A Common Use Case

A couple of algorithms on 2D images... input image

  • → component

labeling

  • → influence zone

transform ...so classical that they are featured by every IP library.

milena team (LRDE) The milena Image Processing Library 27/06/2012 4 / 18

slide-5
SLIDE 5

A Common Use Case

A very basic problem to solve: text line identification input

milena team (LRDE) The milena Image Processing Library 27/06/2012 4 / 18

slide-6
SLIDE 6

A Common Use Case

We have this intermediate result: word segmentation

milena team (LRDE) The milena Image Processing Library 27/06/2012 4 / 18

slide-7
SLIDE 7

A Common Use Case

an idea: identify each line space = label the 1st column points

milena team (LRDE) The milena Image Processing Library 27/06/2012 4 / 18

slide-8
SLIDE 8

A Common Use Case

an idea (cont’d): a point belongs to a given line space...

milena team (LRDE) The milena Image Processing Library 27/06/2012 4 / 18

slide-9
SLIDE 9

A Common Use Case

an idea (cont’d): ...if it is in the influence zone of the corresponding label

milena team (LRDE) The milena Image Processing Library 27/06/2012 4 / 18

slide-10
SLIDE 10

A Common Use Case

How difficult is it to get this result... ...with commonly used IP software / environments?

milena team (LRDE) The milena Image Processing Library 27/06/2012 4 / 18

slide-11
SLIDE 11

A Common Use Case

Possible answers: I just cannot do it. :-(

Just pick one.

milena team (LRDE) The milena Image Processing Library 27/06/2012 5 / 18

slide-12
SLIDE 12

A Common Use Case

Possible answers: I just cannot do it. :-( Maybe I can do it but I’m not too sure about that... :-(

Just pick one.

milena team (LRDE) The milena Image Processing Library 27/06/2012 5 / 18

slide-13
SLIDE 13

A Common Use Case

Possible answers: I just cannot do it. :-( Maybe I can do it but I’m not too sure about that... :-( I can do it but... I need to copy-paste-modify some code. :-(

Just pick one.

milena team (LRDE) The milena Image Processing Library 27/06/2012 5 / 18

slide-14
SLIDE 14

A Common Use Case

Possible answers: I just cannot do it. :-( Maybe I can do it but I’m not too sure about that... :-( I can do it but... I need to copy-paste-modify some code. :-( I can do it; yet it will take many steps (and hence some time)... :-(

Just pick one.

milena team (LRDE) The milena Image Processing Library 27/06/2012 5 / 18

slide-15
SLIDE 15

A Common Use Case

Possible answers: I just cannot do it. :-( Maybe I can do it but I’m not too sure about that... :-( I can do it but... I need to copy-paste-modify some code. :-( I can do it; yet it will take many steps (and hence some time)... :-( I can do it in a very few lines lines of code. :-)

Just pick one.

milena team (LRDE) The milena Image Processing Library 27/06/2012 5 / 18

slide-16
SLIDE 16

A Common Untruth

“If I need to process some particular images

▸ e.g., parts of images, 3D images, videos, or huge 2D images, ▸ 2D+t data, n-D data, graphs, meshes, etc.

it’s normal: that my tool can’t do it, that I should get a specific tool.”

milena team (LRDE) The milena Image Processing Library 27/06/2012 6 / 18

slide-17
SLIDE 17

A Common Untruth

“If I need to process some particular images

▸ e.g., parts of images, 3D images, videos, or huge 2D images, ▸ 2D+t data, n-D data, graphs, meshes, etc.

it’s normal: that my tool can’t do it, that I should get a specific tool.” No, that’s NOT normal at all!

milena team (LRDE) The milena Image Processing Library 27/06/2012 6 / 18

slide-18
SLIDE 18

A Common Untruth

“If I need to process some particular images

▸ e.g., parts of images, 3D images, videos, or huge 2D images, ▸ 2D+t data, n-D data, graphs, meshes, etc.

it’s normal: that my tool can’t do it, that I should get a specific tool.” No, that’s NOT normal at all! Some clues: a tool has a perimeter but this perimeter should not to be so limited... do not accept to be so limited, just change your tool!

milena team (LRDE) The milena Image Processing Library 27/06/2012 6 / 18

slide-19
SLIDE 19

Main Objective

The milena Library

Favor the potential for having features (idea of capability / non-limitation) versus the number of provided features (idea of immediate availability).

milena team (LRDE) The milena Image Processing Library 27/06/2012 7 / 18

slide-20
SLIDE 20

Main Objective

The milena Library

Favor the potential for having features (idea of capability / non-limitation) versus the number of provided features (idea of immediate availability). Thus we propose: a library that is not dedicated

▸ to an IP applicative domain, ▸ to a class of IP operators.

a library where any theoretically possible processing... ...is (or will be) possible in practice!

milena team (LRDE) The milena Image Processing Library 27/06/2012 7 / 18

slide-21
SLIDE 21

Genericity

some image types

T A

fill labeling influence zone ...

classical decomposition: algorithms and image types

milena team (LRDE) The milena Image Processing Library 27/06/2012 8 / 18

slide-22
SLIDE 22

Genericity

V S

bool rgb8 grey12 image2d graph mesh

A

fill labeling influence zone ...

T

possible uses of fill

not to be limited = covering as much as possible the space of possibilities

milena team (LRDE) The milena Image Processing Library 27/06/2012 8 / 18

slide-23
SLIDE 23

Genericity

Myths: “with a generic library, one is forced to code in a generic way” (no) “if it’s generic, it’s much pain for the user” (no)

milena team (LRDE) The milena Image Processing Library 27/06/2012 9 / 18

slide-24
SLIDE 24

Genericity

Myths: “with a generic library, one is forced to code in a generic way” (no) “if it’s generic, it’s much pain for the user” (no) “a library is either generic or not” (no) “to obtain a generic lib, adding the template keyword suffices” (no)

milena team (LRDE) The milena Image Processing Library 27/06/2012 9 / 18

slide-25
SLIDE 25

Genericity

Myths: “with a generic library, one is forced to code in a generic way” (no) “if it’s generic, it’s much pain for the user” (no) “a library is either generic or not” (no) “to obtain a generic lib, adding the template keyword suffices” (no)

milena features

make it and keep it simple for the user, efficient so usable in industrial context, an effective high level of genericity.

(and that was very hard to get those three features at the same time...) milena team (LRDE) The milena Image Processing Library 27/06/2012 9 / 18

slide-26
SLIDE 26

About User-Friendliness

Provide many value types + image types + other IP classical entities,

milena team (LRDE) The milena Image Processing Library 27/06/2012 10 / 18

slide-27
SLIDE 27

About User-Friendliness

Provide many value types + image types + other IP classical entities,

the user just has to code IP solutions or algorithms .

milena team (LRDE) The milena Image Processing Library 27/06/2012 10 / 18

slide-28
SLIDE 28

About User-Friendliness

Provide many value types + image types + other IP classical entities,

the user just has to code IP solutions or algorithms .

Provide many tools so that

milena team (LRDE) The milena Image Processing Library 27/06/2012 10 / 18

slide-29
SLIDE 29

About User-Friendliness

Provide many value types + image types + other IP classical entities,

the user just has to code IP solutions or algorithms .

Provide many tools so that

▸ an IP chain means “passing objects to procedures”, milena team (LRDE) The milena Image Processing Library 27/06/2012 10 / 18

slide-30
SLIDE 30

About User-Friendliness

Provide many value types + image types + other IP classical entities,

the user just has to code IP solutions or algorithms .

Provide many tools so that

▸ an IP chain means “passing objects to procedures”,

just like in C

milena team (LRDE) The milena Image Processing Library 27/06/2012 10 / 18

slide-31
SLIDE 31

About User-Friendliness

Provide many value types + image types + other IP classical entities,

the user just has to code IP solutions or algorithms .

Provide many tools so that

▸ an IP chain means “passing objects to procedures”,

just like in C

▸ the writing of algorithms is very close to the practitioner’s language. milena team (LRDE) The milena Image Processing Library 27/06/2012 10 / 18

slide-32
SLIDE 32

About User-Friendliness

Provide many value types + image types + other IP classical entities,

the user just has to code IP solutions or algorithms .

Provide many tools so that

▸ an IP chain means “passing objects to procedures”,

just like in C

▸ the writing of algorithms is very close to the practitioner’s language.

Keep it simple!

milena team (LRDE) The milena Image Processing Library 27/06/2012 10 / 18

slide-33
SLIDE 33

About User-Friendliness

Provide many value types + image types + other IP classical entities,

the user just has to code IP solutions or algorithms .

Provide many tools so that

▸ an IP chain means “passing objects to procedures”,

just like in C

▸ the writing of algorithms is very close to the practitioner’s language.

Keep it simple!

so that the user can really focus on IP (not on programming).

milena team (LRDE) The milena Image Processing Library 27/06/2012 10 / 18

slide-34
SLIDE 34

Sample Runs

Some kinds of images we may need to process:

milena team (LRDE) The milena Image Processing Library 27/06/2012 11 / 18

slide-35
SLIDE 35

Sample Runs

Some results that we can get: In milena, the very same algorithm runs on those images.

milena team (LRDE) The milena Image Processing Library 27/06/2012 11 / 18

slide-36
SLIDE 36

Hum... YADAI!

milena team (LRDE) The milena Image Processing Library 27/06/2012 12 / 18

slide-37
SLIDE 37

Hum...

Yet Another Dilation Algorithm Implementation!

sorry...

milena team (LRDE) The milena Image Processing Library 27/06/2012 12 / 18

slide-38
SLIDE 38

Ease of Use

Translation of an algorithm ▼

D : domain of ima N : neighborhood V : type of values of ima ∀ p ∈ D

  • ut(p) ← inf(V )

∀ n ∈ N (p)

  • ut(p) ← sup(out(p), ima(n))

milena team (LRDE) The milena Image Processing Library 27/06/2012 13 / 18

slide-39
SLIDE 39

Ease of Use

Translation of an algorithm into C++ with milena: ▼ ▼

D : domain of ima N : neighborhood V : type of values of ima ∀ p ∈ D

  • ut(p) ← inf(V )

∀ n ∈ N (p)

  • ut(p) ← sup(out(p), ima(n))

mln piter(I) p(D); // p ∈ D mln niter(N) n(N , p); // n ∈ N (p) typedef mln value(I) V ; for all(p)

  • ut(p)

= mln inf(V ); for all(n) if (ima . has(n))

  • ut(p) = sup(out(p), ima(n));

milena team (LRDE) The milena Image Processing Library 27/06/2012 13 / 18

slide-40
SLIDE 40

Ease of Use

Translation of an algorithm into C++ with milena: ▼ ▼

D : domain of ima N : neighborhood V : type of values of ima ∀ p ∈ D

  • ut(p) ← inf(V )

∀ n ∈ N (p)

  • ut(p) ← sup(out(p), ima(n))

mln piter(I) p(D); // p ∈ D mln niter(N) n(N , p); // n ∈ N (p) typedef mln value(I) V ; for all(p)

  • ut(p)

= mln inf(V ); for all(n) if (ima . has(n))

  • ut(p) = sup(out(p), ima(n));

Highly generic / Easy to read / Really that hard to write?

milena team (LRDE) The milena Image Processing Library 27/06/2012 13 / 18

slide-41
SLIDE 41

Tackling Practical Problems

Different domains:

▸ medical (anatomic pathology, 2D MRI, 2D+t MRI, ultrasound), ▸ astronomy / satellite images,

what huge images! ▸ document images / natural images, ▸ 3D objects / meshes, ▸ videos.

Different tasks:

▸ filtering, registration, segmentation, ▸ pattern recognition.

Industrial products integrating IP solutions based on milena:

milena team (LRDE) The milena Image Processing Library 27/06/2012 14 / 18

slide-42
SLIDE 42

Tackling Practical Problems

Different domains:

▸ medical (anatomic pathology, 2D MRI, 2D+t MRI, ultrasound), ▸ astronomy / satellite images,

what huge images! ▸ document images / natural images, ▸ 3D objects / meshes, ▸ videos.

Different tasks:

▸ filtering, registration, segmentation, ▸ pattern recognition.

Industrial products integrating IP solutions based on milena: We’ve said we favor capabilities, yet we also have some (in fact, many) features immediately available.

milena team (LRDE) The milena Image Processing Library 27/06/2012 14 / 18

slide-43
SLIDE 43

Back to the Initial Example

What we need:

’label’ is a 2D image of labels having the same domain as the ’input’ image fill ’label’ with zeros (’connected component labeling’ step) label the points of watershed line restricted to the first column and paste the result into ’label’ (’influence zone transform’ step) compute the influence zones of ’label’ only on the watershed frontiers and paste the result into ’label’ (’visualization’ step) ’output’ is a colorization with RGB of the ’label’ image fill in white the ’output’ image only for object points

that is, just some IP classic work!

milena team (LRDE) The milena Image Processing Library 27/06/2012 15 / 18

slide-44
SLIDE 44

Back to the Initial Example

The actual code with milena: that is, the IP classic work applied!

milena team (LRDE) The milena Image Processing Library 27/06/2012 15 / 18

slide-45
SLIDE 45

Insight of the Core Abstractions

The few basic concepts (image, neighborhood, etc.) used in IP are mapped into milena:

Box Object Image Site_Set Site Value Value_Set Grid_Point Gray_Level Color Site_Iterator Value_Iterator Object Iterator Grid_Delta_Point Window Neighborhood Weighted_Window Object Function Accumulator Object Function_v2v Function_vv2v Function_v2b

That’s not many to “learn”...

milena team (LRDE) The milena Image Processing Library 27/06/2012 16 / 18

slide-46
SLIDE 46

State of the Project

Mature project: usable as-is, right now

▸ Stable core ▸ Late work emphasized on algorithms and applications ▸ Some cleanup tasks planned though

Future Work

▸ Make users’ life easier ☀ Better documentation (tutorials, examples, etc.) ☀ More non-C ++ APIs (Python, Ruby, etc.) ☀ More non-programming tools (GUIs, etc.) ▸ Formal work on abstractions, properties and algorithms ☀ < see publications on our web site > milena team (LRDE) The milena Image Processing Library 27/06/2012 17 / 18

slide-47
SLIDE 47

The End

Not the end my friend! The project is living and keeps growing...

Any questions?

  • lena@lrde.epita.fr

http://olena.lrde.epita.fr

milena team (LRDE) The milena Image Processing Library 27/06/2012 18 / 18