$30 off During Our Annual Pro Sale. View Details »

Generic Image Processing With Climb – 5th ELS

vjeux
May 10, 2012

Generic Image Processing With Climb – 5th ELS

vjeux

May 10, 2012
Tweet

More Decks by vjeux

Other Decks in Education

Transcript

  1. Generic Image Processing with Climb
    Laurent Senta – Didier Verna
    LRDE
    EPITA Research Lab
    April 30, 2012
    lrde.epita.fr

    View Slide

  2. Outline
    • Introduction
    • Using Climb
    • Developping Climb
    • Going Further
    • Conclusion
    2

    View Slide

  3. INTRODUCTION
    3

    View Slide

  4. Generic Image Processing
    4
    Images: Roland Levillain. Software Architecture for Generic Image Processing Tools
    I
    A
    H B
    D
    C
    E
    F
    G
    I
    A
    H B
    D
    C
    E
    F
    G
    segmentation

    View Slide

  5. Genericity Purpose
    5
    Graphic: Laurent Najman. Point de vue d'un théoricien sur l'intérêt de la généricité pour le traitement d'images
    algorithms
    values
    type
    structures
    type
    segmentation
    graph
    2dmatrix
    3dmatrix
    bool grayscale rgb
    S x V x A combinations

    View Slide

  6. Climb
    • Generic Image Processing library
    – Common Lisp
    • Inspired by Olena: C++, 10 years old
    – Dynamic vs Static
    – Usability, maintainability, performance,…
    • Still in beta
    6
    Compilers sbcl
    Dependencies iterate, lisp-magick, cl-heap, lisp-unit, cl-gtk2

    View Slide

  7. Architecture
    7
    The different layers of the library
    Generic types Morphers
    Image Algorithms
    Chaining
    Operator
    GUI

    View Slide

  8. USING CLIMB
    8

    View Slide

  9. Algorithms
    9
    original grayscale
    median filter
    Otsu threshold
    dilation erosion
    jitter

    View Slide

  10. (setf img (image-load ‘images/lena128gray.jpg’))
    (setf ot-img (otsu img))
    (setf dil-img (dilation ot-img (4-connectivity)))
    (save dil-img ‘out/lena-dilated.png’)
    Chaining Operator
    Chaining algorithms with the $ operator
    10
    (save (erosion (otsu (image-load ‘images/lena128gray.jpg’))
    (4-connectivity))
    ‘out/lena-eroded.png’)
    image-load ‘images/lena128gray.jpg’
    otsu
    dilation (4-connectivity)
    save ‘out/lena-eroded.png’
    ($ (image-load ‘images/lena128gray.jpg’)
    (otsu)
    (dilation (4-connectivity))
    (save ‘out/lena-eroded.png’))

    View Slide

  11. dilation
    diff
    erosion
    otsu
    to-gray
    image-load
    Chaining Operator
    11
    More complex chaining

    View Slide

  12. DEVELOPPING CLIMB
    12

    View Slide

  13. • matrix[x, y] → pixelvalue
    • graph.getNode(label) → nodevalue
    • model[x, y, z] → voxelvalue
    • matrix[x, y] → pixelvalue
    • graph.getNode(label) → nodevalue
    • model[x, y, z] → voxelvalue
    Image Definition
    13
    I
    A
    H B
    D
    C
    E
    F
    G
    Image access
    image(site) = value
    (setf (iref image site) value)
    Generalization:
    Lisp:

    View Slide

  14. (value-inverse )
    (iref image site)
    (setf (iref image site)
    )
    Values and Sites
    14
    Values:
    Site:
    bool grayscale RGB
    x
    y
    I
    A
    H B
    D
    C
    E
    F
    G
    2d-point label

    View Slide

  15. Browsing Images
    15
    x
    y
    Site-set:
    (let ( )
    (loop :for s :=
    :while s
    ))
    (domain (image-domain image))
    (site-set-next domain)

    I
    A
    H B
    D
    C
    E
    F
    G

    View Slide

  16. (let ( )
    (loop :for s :=
    :while s
    ))

    (site-set-next neighbors)
    (neighbors (site-set-window window site))
    Browsing Images
    16
    x
    y
    Site-set-window:
    I
    A
    H B
    D
    C
    E
    F
    G

    View Slide

  17. Morphers
    17
    Transforming images with morphers
    Value morpher Structure morpher

    View Slide

  18. GOING FURTHER
    18

    View Slide

  19. Properties
    19
    Adapting genericity
    algorithms
    values
    type
    structures
    type
    segmentation
    graph
    2dmatrix
    3dmatrix
    bool grayscale rgb
    support:regular

    View Slide

  20. Value:
    GUI
    20
    Climb based interface
    I
    A
    H B
    D
    C
    E
    F
    G
    GTK-BOX
    Morpher
    Resize
    climb graph

    View Slide

  21. Conclusion
    21
    Current status
    Image Processing Practitionner Algorithm implementor
    • Built-in algorithms
    • Composition tools
    • Chaining operator
    • Morphers
    • GUI
    • High-level domain model
    • Generic values
    • Generic structures
    • Generic implementations
    Hot topics
    Genericity Usability Performance

    View Slide

  22. QUESTIONS ?
    Thanks for your attention,
    22

    View Slide

  23. Sources
    • Th. Géraud and R. Levillain. Semantics-driven genericity: A sequel to the static C++ object-oriented
    programming paradigm (SCOOP 2).
    • R. Levillain, Th. Géraud, and L. Najman. Why and how to design a generic and efficient image processing
    framework: The case of the Milena library.
    • N. Otsu. A threshold selection method from gray-level histograms.
    • P. Soille. Morphological Image Analysis: Principles and Applications
    • Roland Levillain. Software Architecture for Generic Image Processing Tools
    • Laurent Najman. Point de vue d'un théoricien sur l'intérêt de la généricité pour le traitement d'images
    23

    View Slide