MegaWave http://megawave.cmla.ens-cachan.fr Jacques Froment LMBA - - PowerPoint PPT Presentation

megawave http megawave cmla ens cachan fr
SMART_READER_LITE
LIVE PREVIEW

MegaWave http://megawave.cmla.ens-cachan.fr Jacques Froment LMBA - - PowerPoint PPT Presentation

MegaWave http://megawave.cmla.ens-cachan.fr Jacques Froment LMBA UMR CNRS Universit de Bretagne-Sud, France June 27 th, 2012 J. Froment (Universit de Bretagne-Sud) 1 / 54 Outline Overview 1 Basic concept History People Present and


slide-1
SLIDE 1

MegaWave http://megawave.cmla.ens-cachan.fr

Jacques Froment

LMBA UMR CNRS Université de Bretagne-Sud, France June 27th, 2012

  • J. Froment (Université de Bretagne-Sud)

1 / 54

slide-2
SLIDE 2

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

2 / 54

slide-3
SLIDE 3

Overview

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

3 / 54

slide-4
SLIDE 4

Overview Basic concept

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

4 / 54

slide-5
SLIDE 5

Overview Basic concept

MegaWave : why ?

Main goals of MegaWave : Help researchers to write codes on signal processing and image analysis; Facilitate the sharing of codes between researchers; Enable reproducible research.

  • J. Froment (Université de Bretagne-Sud)

5 / 54

slide-6
SLIDE 6

Overview Basic concept

MegaWave : how ?

Main ideas behind MegaWave : Code an algorithm (module) in the C language without worry about input/output; Interface code is automatically generated depending on the context; Including automatic generation of documentation (excluding description of the algorithm).

  • J. Froment (Université de Bretagne-Sud)

6 / 54

slide-7
SLIDE 7

Overview History

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

7 / 54

slide-8
SLIDE 8

Overview History

Main released versions

Date Version Main changes MegaWave1, supporting lab : CEREMADE 1988

  • Initial release (C code)

MegaWave2, supporting lab : CEREMADE 1994 1.00 Initial release, support for HP-UX and Sparc SunOS 4 1995 1.02 SunOS 5 (Solaris) 1997 1.05 SGI IRIX 5 MegaWave2, supporting lab : CMLA 2000 2.00 Open kernel; work on Linux i386 2002 2.10 Lionel Moisan integrates new modules 2007 3.00 Light preprocessor removes lot of incompatibil- ity issues

  • J. Froment (Université de Bretagne-Sud)

8 / 54

slide-9
SLIDE 9

Overview History

Latest internal versions

Date Main changes 2009 Rewriting by Nicolas Limare to use and follow com- mon standards 2010-2012 (personal version) support for 64-bits processors

  • J. Froment (Université de Bretagne-Sud)

9 / 54

slide-10
SLIDE 10

Overview History

Why the name MegaWave ?

You may consider that The first code was about wavelet transforms; In the late 80’s, the prefix mega (106) was associated with a large amount of power. But the truth is out there . . .

  • J. Froment (Université de Bretagne-Sud)

10 / 54

slide-11
SLIDE 11

Overview History

The true origin of MegaWave I

This name was chosen by Jean-Michel Morel in reference to the comic

  • J. Froment (Université de Bretagne-Sud)

11 / 54

slide-12
SLIDE 12

Overview History

The true origin of MegaWave II

As described in this book that is unfortunately sold out, the Mega Wave is a wave that can take control of the human brain !

  • J. Froment (Université de Bretagne-Sud)

12 / 54

slide-13
SLIDE 13

Overview People

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

13 / 54

slide-14
SLIDE 14

Overview People

Who contributed to MegaWave ?

Jean-Michel Morel : as in charge of the image team at the CEREMADE then at the CMLA, primarily responsible for all; Jacques Froment : he created MegaWave1 then MegaWave2; try to keep the system up to date; Lionel Moisan : in charge of collecting and updating modules; main contributor in research modules; More than 30 researchers contributed in MegaWave2 by writing modules.

  • J. Froment (Université de Bretagne-Sud)

14 / 54

slide-15
SLIDE 15

Overview People

Who used MegaWave ?

More than one hundred universities and public or private research centers; Used in some universities for teaching at Masters level.

  • J. Froment (Université de Bretagne-Sud)

15 / 54

slide-16
SLIDE 16

Overview Present and future

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

16 / 54

slide-17
SLIDE 17

Overview Present and future

Current issues

The age of MegaWave may represent some disadvantages :

It does not use current standards and tools of open source softwares; It does not use generic programming.

IPOL project may decrease the value of using MegaWave

However goals of IPOL and MegaWave are different; Being a on line journal, IPOL offers the best answer to reproducible research; MegaWave offers a pleasant environment to generate standard source codes; Such codes may be adapted to follow IPOL guidelines.

The most critical issue is probably in human resources.

  • J. Froment (Université de Bretagne-Sud)

17 / 54

slide-18
SLIDE 18

Overview Content

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

18 / 54

slide-19
SLIDE 19

Overview Content

What is included in MegaWave ?

MegaWave is composed of three main parts : Set of commands to manage the system : see Volume 1, MegaWave2 User’s Guide (83 pages); Library of functions to facilitate writing of new modules : see Volume 2, MegaWave2 System Library (269 pages); Library of 350 modules, to be called by another modules or as a command : see Volume 3, MegaWave2 User’s Modules Library (668 pages).

  • J. Froment (Université de Bretagne-Sud)

19 / 54

slide-20
SLIDE 20

Examples of released modules

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

20 / 54

slide-21
SLIDE 21

Examples of released modules Fourier and wavelet transforms

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

21 / 54

slide-22
SLIDE 22

Examples of released modules Fourier and wavelet transforms

FFT in 1D and 2D

fft2dview

→ Author : Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

22 / 54

slide-23
SLIDE 23

Examples of released modules Fourier and wavelet transforms

Image rotation and translation using Fourier interpolation

fftrot

→ Author : Pascal Monasse

  • J. Froment (Université de Bretagne-Sud)

23 / 54

slide-24
SLIDE 24

Examples of released modules Fourier and wavelet transforms

Image zooming by zero-padding

fftzoom

→ Author : Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

24 / 54

slide-25
SLIDE 25

Examples of released modules Fourier and wavelet transforms

Phase randomization

frandphase

frandphase

→ Author : Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

25 / 54

slide-26
SLIDE 26

Examples of released modules Fourier and wavelet transforms

Wiener filtering

wiener

→ Author : Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

26 / 54

slide-27
SLIDE 27

Examples of released modules Fourier and wavelet transforms

Orthogonal and biorthogonal wavelet transforms

biowave2

→ Author : Jean-Pierre D’Alès

  • J. Froment (Université de Bretagne-Sud)

27 / 54

slide-28
SLIDE 28

Examples of released modules Fourier and wavelet transforms

2D wavelet packets decomposition

wp2ddecomp

→ Author : François Malgouyres

  • J. Froment (Université de Bretagne-Sud)

28 / 54

slide-29
SLIDE 29

Examples of released modules Curves and level lines representation and applications

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

29 / 54

slide-30
SLIDE 30

Examples of released modules Curves and level lines representation and applications

Geometric Affine Scale Space of Curves

Evolution equation ∂C ∂t (s, t) = κ1/3(s, t) N(s, t)

gass

→ Author : Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

30 / 54

slide-31
SLIDE 31

Examples of released modules Curves and level lines representation and applications

Generalized Curve Shortening Flow of a curve

Evolution equation ∂C

∂t = (tκ)g N

gcsf

→ Authors : Frédéric Cao, Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

31 / 54

slide-32
SLIDE 32

Examples of released modules Curves and level lines representation and applications

Detect meaningful alignments in an image

falign

→ Author : Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

32 / 54

slide-33
SLIDE 33

Examples of released modules Curves and level lines representation and applications

Detect maximal meaningful segments

falign_mdl

Authors : Lionel Moisan, Andrés Almansa

  • J. Froment (Université de Bretagne-Sud)

33 / 54

slide-34
SLIDE 34

Examples of released modules Curves and level lines representation and applications

Extract meaningful contrasted level lines

ll_boundaries2

→ Authors : Lionel Moisan, Frédéric Cao

  • J. Froment (Université de Bretagne-Sud)

34 / 54

slide-35
SLIDE 35

Examples of released modules Curves and level lines representation and applications

Extract maximal meaningful edges

ll_edges

→ Author : Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

35 / 54

slide-36
SLIDE 36

Examples of released modules Curves and level lines representation and applications

Grain filter

Use the Fast Level Set Transform (FLST)

fgrain

→ Authors : Pascal Monasse, Frédéric Guichard

  • J. Froment (Université de Bretagne-Sud)

36 / 54

slide-37
SLIDE 37

Examples of released modules Curves and level lines representation and applications

Image disocclusion

disocclusion

→ Author : Simon Masnou

  • J. Froment (Université de Bretagne-Sud)

37 / 54

slide-38
SLIDE 38

Examples of released modules Image and signal filtering

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

38 / 54

slide-39
SLIDE 39

Examples of released modules Image and signal filtering

AMSS and MCM by anisotropic diffusion

Affine Morphological Scale Space : ∂u ∂t = |Du|(curv(u))

1 3

Mean Curvature Motion : ∂u ∂t = |Du|(curv(u))

amss

→ Authors : Frédéric Guichard, Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

39 / 54

slide-40
SLIDE 40

Examples of released modules Image and signal filtering

AMSS as a stack filter

  • samss

→ Author : Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

40 / 54

slide-41
SLIDE 41

Examples of released modules Image and signal filtering

Rudin Shock filter

∂u ∂t = −sgn(∆u) · |Du|

shock

→ Author : Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

41 / 54

slide-42
SLIDE 42

Examples of released modules Image and signal filtering

Image denoising by TV minimization

(Implemented with a relaxation algorithm)

cfdiffuse

→ Author : Antonin Chambolle

  • J. Froment (Université de Bretagne-Sud)

42 / 54

slide-43
SLIDE 43

Examples of released modules Image and signal filtering

Image deblurring by TV minimization

tvdeblur

→ Author : Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

43 / 54

slide-44
SLIDE 44

Examples of released modules Image and signal filtering

Signal restoration using TV and wavelets

stvrestore

Author : Jacques Froment

  • J. Froment (Université de Bretagne-Sud)

44 / 54

slide-45
SLIDE 45

Examples of released modules Image and signal filtering

Non-Local Means image denoising

nlmeans

→ Author : Lionel Moisan

  • J. Froment (Université de Bretagne-Sud)

45 / 54

slide-46
SLIDE 46

Examples of released modules Other feature detection

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

46 / 54

slide-47
SLIDE 47

Examples of released modules Other feature detection

Canny-Deriche’s Edge Detector

canny

→ Author : Yann Guyonvarc’h

  • J. Froment (Université de Bretagne-Sud)

47 / 54

slide-48
SLIDE 48

Examples of released modules Other feature detection

Harris corner detector

harris

Author : Frédéric Cao

  • J. Froment (Université de Bretagne-Sud)

48 / 54

slide-49
SLIDE 49

Examples of released modules Other feature detection

Image segmentation

Region-growing method using the energy of Mumford and Shah

segct

Author : Georges Koepfler

  • J. Froment (Université de Bretagne-Sud)

49 / 54

slide-50
SLIDE 50

Examples of released modules Other feature detection

Texture segmentation

Multiscale version of the region-growing method using the energy of Mumford and Shah

segtxt

→ Author : Yann Guyonvarc’h

  • J. Froment (Université de Bretagne-Sud)

50 / 54

slide-51
SLIDE 51

Example of a module’s source : fftconvol.c

Outline

1

Overview Basic concept History People Present and future Content

2

Examples of released modules Fourier and wavelet transforms Curves and level lines representation and applications Image and signal filtering Other feature detection

3

Example of a module’s source : fftconvol.c

  • J. Froment (Université de Bretagne-Sud)

51 / 54

slide-52
SLIDE 52

Example of a module’s source : fftconvol.c

What fftconvol computes

Convolution in the Fourier domain

  • f an input gray level image in

with a real kernel filter

  • ut(i) =

in(i) × filter(i)

  • J. Froment (Université de Bretagne-Sud)

52 / 54

slide-53
SLIDE 53

Example of a module’s source : fftconvol.c

Source of fftconvol I

/*--------------------------- MegaWave2 Module -----------------------------*/ /* mwmodule name = {fftconvol}; version = {"1.2"}; author = {"Lionel Moisan"}; function = {"2D Fourier-convolution of a fimage"}; usage = { in->in "input Fimage", filter->filter "convolution filter in Fourier domain (Fimage)",

  • ut<-out

"output Fimage" };

  • ---------------------------------------------------------------------------*/

#include <stdio.h> #include <math.h> #include "mw.h" extern void fft2d(); // Use this module Fimage fftconvol(in,filter,out) Fimage in,filter,out; { int i,nx,ny;

  • J. Froment (Université de Bretagne-Sud)

53 / 54

slide-54
SLIDE 54

Example of a module’s source : fftconvol.c

Source of fftconvol II

Fimage re,im; nx = in->ncol; ny = in->nrow; // Size of the input image if (filter->ncol!=nx || filter->nrow!=ny) // Check image and filter size mwerror(USAGE,1,"Input image and filter dimensions do not match !\n"); re = mw_new_fimage(); im = mw_new_fimage(); // Create images <re> and <im> fft2d(in,NULL,re,im,0); // Compute the 2D Fourier transform for (i=nx*ny;i--;) { // Multiplication in the Fourier domain re->gray[i] *= filter->gray[i]; im->gray[i] *= filter->gray[i]; }

  • ut = mw_change_fimage(out,ny,nx); // Allocate memory for the output image

if (!out) mwerror(FATAL,1,"Not enough memory\n"); // If allocation failed fft2d(re,im,out,NULL,1); // Inverse 2D Fourier transform mw_delete_fimage(re); mw_delete_fimage(im); // Free memory <re> and <im> return(out); // Return the computed image (optional) }

  • J. Froment (Université de Bretagne-Sud)

54 / 54