SlideShare una empresa de Scribd logo
1 de 4
Descargar para leer sin conexión
Generic Image Processing With Climb

                 Laurent Senta                   Christopher Chedeau                        Didier Verna
                  senta@lrde.epita.fr          christopher.chedeau@lrde.epita.fr       didier.verna@lrde.epita.fr
                                        Epita Research and Development Laboratory
                                        14-16 rue Voltaire, 94276 Le Kremlin-Bicêtre
                                                        Paris, France



ABSTRACT                                                          a dynamic language. Common Lisp provides the necessary
Categories and Subject Descriptors                                flexibility and extensibility to let us consider several alter-
I.4.0 [Image Processing And Computer Vision]: Gen-                nate implementations of the model provided by Olena, from
eral—image processing software; D.2.11 [Software Engi-            the dynamic perspective.
neering]: Software Architectures—Data abstraction, Domain-
specific architectures                                             First, we provide a survey of the algorithms readily available
                                                                  in Climb. Next, we present the tools available for compos-
                                                                  ing basic algorithms into more complex Image Processing
General Terms                                                     chains. Finally we describe the generic building blocks used
Design, Languages                                                 to create new algorithms, hereby extending the library.

Keywords                                                          2. FEATURES
Generic Image Processing, Common Lisp
                                                                  Climb provides a basic image type with the necessary load-
                                                                  ing and saving operations, based on the lisp-magick library.
1. INTRODUCTION                                                   This allows for direct manipulation of many images formats,
Climb is a generic image processing library written in Com-       such as PNG and JPEG. The basic operations provided by
mon Lisp. It comes with a set of built-in algorithms such as      Climb are loading an image, applying algorithms to it and
erosion, dilation and other mathematical morphology oper-         saving it back. In this section, we provide a survey of the
ators, thresholding and image segmentation.                       algorithms already built in the library.

The idea behind genericity is to be able to write algorithms
only once, independently from the data types to which they        2.1 Histograms
will be applied. In the Image Processing domain, being fully      A histogram is a 2D representation of image information.
generic means being independent from the image formats,           The horizontal axis represents tonal values, from 0 to 255
pixels types, storage schemes (arrays, graphs, dimensions)        in common grayscale images. For every tonal value, the
etc. Such level of genericity, however, may induce an impor-      vertical axis counts the number of such pixels in the image.
tant performance cost.                                            Some Image Processing algorithms may be improved when
                                                                  the information provided by a histogram is known.
In order to reconcile genericity and performance, the LRDE1
has developed an Image Processing platform called Olena2 .
Olena is written in C++ and uses its templating system            Histogram Equalization. An image (e.g. with a low con-
abundantly. Olena is a ten years old project, well-proven         trast) does not necessarily contain the full spectrum of in-
both in terms of usability, performance and genericity. [2]       tensity. In that case, its histogram will only occupy a nar-
                                                                  row band on the horizontal axis. Concretely, this means
In this context, the goal of Climb is to use this legacy for      that some level of detail may be hidden to the human eye.
proposing another vision of the same domain, only based on        Histogram equalization identifies how the pixel values are
                                                                  spread and transforms the image in order to use the full
1
    EPITA Research and development laboratory                     range of gray, making details more apparent.
2
    http://olena.lrde.epita.fr

                                                                  Plateau Equalization. Plateau equalization is used to re-
                                                                  veal the darkest details of an image, that would not oth-
                                                                  erwise be visible. It is a histogram equalization algorithm
                                                                  applied on a distribution of a clipped histogram. The pixels
                                                                  values greater than a given threshold are set to this thresh-
                                                                  old while the other ones are left untouched.

                                                                  2.2 Threshold
Thresholding is a basic binarization algorithm that converts     Mathematical Morphology can also be applied on grayscale
a grayscale image to a binary one. This class of algorithms      images, leading to news algorithms:
works by comparing each value from the original image to a
threshold. Values beneath the threshold are set to False in
the resulting image, while the others are set to True.           TopHat Sharpen details
                                                                 Laplacian operator Extract edges
Climb provides 3 threshold algorithms:
                                                                 Hit-Or-Miss Detect specific patterns

Basic threshold. Apply the algorithm using a user-defined         3. COMPOSITION TOOLS
threshold on the whole image.                                    Composing algorithms like the ones described in the previ-
                                                                 ous section is interesting for producing more complex image
                                                                 processing chains. Therefore, in addition to the built-in al-
Otsu Threshold. Automatically find the best threshold value       gorithms that Climb already provides, a composition infras-
using the image histogram. The algorithm picks the value         tructure is available.
that minimizes the spreads between the True and False do-
mains as described by Nobuyuki Otsu [4].                         3.1 Chaining Operators
                                                                 3.1.1    The $ operator
                                                                 The most essential form of composition is the sequential one:
Sauvola threshold. In images with a lot of variation, global     algorithms are applied to an image, one after the other.
thresholding is not accurate anymore, so adaptive threshold-
ing must be used. The Sauvola thresholding algorithm [5]         Programming a chain of algorithms by hand requires a lot
picks the best threshold value for each pixel from the given     of variables for intermediate storage of temporary images.
image using its neighbors.                                       This renders the code cumbersome to read an maintain.

2.3   Watershed                                                  To facilitate the writing of such a chain, we therefore pro-
                                                                 vide a chaining operator which automates the plugging of
Watershed is another class of image segmentation algorithms.
                                                                 an algorithm’s output to the input of the next one. Such
Used on a grayscale image seen as a topographic relief, they
                                                                 an operator would be written as follows in traditional Lisp
extract the different basins within the image. Watershed al-
                                                                 syntax:
gorithms produce a segmented image where each component
is labeled with a different tag.                                  ( image−s a v e
                                                                    ( algo2
Climb provides a implementation of Meyer’s flooding algo-                 ( algo1
rithm [3]. Components are initialized at the “lowest” region                ( image−l o a d ‘ ‘ image . png ’ ’ )
of the image (the darkest ones). Then, each component is                    param1 )
extended until it collide with another one, following the im-            param2 )
age’s topography.                                                    ‘ ‘ output . png ’ ’ )


2.4   Mathematical Morphology                                    Unfortunately, this syntax is not optimal. The algorithms
Mathematical Morphology used heavily in Image Processing.        must be read in reverse order, and arguments end up far
It defines a set of operators that can be cumulated in order      away from the function to which they are passed.
to extract specific details from images.
                                                                 Inspired by Clojure’s Trush operator (->) 3 and the JQuery4
Mathematical Morphology algorithms are based on the ap-          chaining process, Climb provides the $ macro which allows
plication of a structuring element to every points of an im-     to chain operations in a much clearer form.
age, gathering information using basic operators (e.g. logical   $ ( ( image−l o a d ‘ ‘ image . png ’ ’ )
operators and, or) [6].                                              ( a l g o 1 param1 )
                                                                     ( a l g o 2 param2 )
                                                                     ( image−s a v e ) )
Erosion and Dilation. Applied on a binary image, these
algorithms respectively erodes and dilate the True areas in
the picture. Combining these operators leads to new algo-        3.1.2    Flow Control
rithms:                                                          In order to ease the writing of a processing chain, the $
                                                                 macro is equipped with several other flow control operators.

Opening Apply an erosion then a dilation. This removes
    the small details from the image and opens the True             • The // operator splits the chain into several indepen-
    shapes.                                                           dent subchains that may be executed in parallel.
                                                                 3
                                                                   http://clojure.github.com/clojure/clojure.
Closing Apply a dilation then an erosion. This closes the        core-api.html#clojure.core/->
                                                                 4
     True shapes.                                                  http://api.jquery.com/jQuery/
• The quote modifier (’) allows to execute a function                                Value morpher. A value morpher operates a dynamic trans-
     outside the actual processing chain. This is useful for                           lation from one value type to another. For instance, an RGB
     doing side effects (see the example below).                                        image can be used as a grayscale one when seen through a
                                                                                       morpher that returns the pixels intensity instead of their
   • The $1, $2, etc. variables store the intermediate results                         original color. It is therefore possible to apply a watershed
     from the previous executions, allowing to use them ex-                            algorithm on a colored image in a transparent fashion, with-
     plicitly as arguments in the subsequent calls in the                              out actually transforming the original image into a grayscale
     chain.                                                                            one.
   • The # modifier may be used to disrupt the implicit
     chaining and let the programmer use the $1, etc. vari-
     ables explictly.                                                                  Content morpher. A content morpher operates a dynamic
                                                                                       translation from one image structure to another. For in-
                                                                                       stance, a small image can be used as a bigger one when seen
These operators allow for powerful chaining schemes, as il-                            through a morpher that returns a default value (e.g. black),
lustrated below:                                                                       when accessing coordinates outside the original image do-
( $ ( l o a d ‘ ‘ l e n a g r a y . png ’ ’ )                                          main. It is therefore possible to apply an algorithm built
                                                                                       for images with a specific size (e.g. power of two), without
      (//                                                                              having to extend the original image.
       ( ’ ( timer −s t a r t )
           ( otsu )                                                                    Possible uses for content morphers include restriction (parts
         ’ ( timer −p r i n t ”Otsu ”)                                                 of the structures being ignored), addition (multiple struc-
           ( s a v e ” o t s u . png ”) ) ; $1                                         tures being combined) and reordering (structures order be-
                                                                                       ing modified).
       ( ’ ( timer −s t a r t )
           ( s a u v o l a ( box2d 1 ) )                                               4. EXTENSIBILITY
         ’ ( timer −p r i n t ”Sauvol a 1 ”)                                           The pixels of an image are usually represented aligned on
           ( s a v e ” s a u v o l a 1 . png ”) ) ; $2                                 a regular 2D grid. In this case, the term “pixel” can be
                                                                                       interpreted in two ways, the position and the value, which
       ( ’ ( timer −s t a r t )                                                        we need to clearly separate. Besides, digital images are not
           ( s a u v o l a ( box2d 5 ) )                                               necessarily represented on a 2D grid. Values can be placed
         ’ ( timer −p r i n t ”Sauvol a 5 ”)                                           on hexagonal grids, 3D grids, graphs etc. In order to be
           ( s a v e ” s a u v o l a 5 . png ”) ) ) ; $3                               sufficiently generic, we hereby define an image as a function
                                                                                       from a position (a site) to a value: img(site) = value.
      (//
       (#( d i f f   $1 $2 )                                                           A truly generic algorithm should not depend on the under-
          ( save     ‘ ‘ d i f f −otsu−s a u v o l a 1 . png ’ ’ ) )                   lying structure of the image. Instead it should rely on higher
       (#( d i f f   $1 $3 )                                                           level concepts such as neighborhoods, iterators, etc. More
          ( save     ‘ ‘ d i f f −otsu−s a u v o l a 5 . png ’ ’ ) )                   precisely, we have identified 3 different levels of genericity,
       (#( d i f f   $2 $3 )                                                           as explained below.
          ( save     ‘ ‘ d i f f −s a u v o l a 1 −s a u v o l a 5 . png ’ ’ ) ) ) )
                                                                                       4.1 Genericity on values
                                                                                       Genericity on values is based on the CLOS dispatch. Us-
3.2     Morphers                                                                       ing multimethods, generic operators like comparison and
As we saw previously, many Image Processing algorithms
                                                                                       addition are built for each value type, such as RGB and
result in images of a different type than the original image
                                                                                       Grayscale.
(for instance the threshold of a grayscale image is a boolean
one). What’s more, several algorithms can only be applied
on images of a specific type (for instance, watershed may                               4.2 Genericity on structures
only be applied to grayscale images).                                                  The notion of “site” provides an abstract description for any
                                                                                       kind of position within an image. For instance, a site might
Programming a chain of algorithms by hand requires a lot of                            be an n-uplet for an N-D image, a node within a graph, etc.
explicit conversion from one type to another. This renders
the code cumbersome to read an maintain.                                               Climb also provides a way to represent the regions of an
                                                                                       image through the site-set object. This object is used in or-
To facilitate the writing of such a chain, we therefore provide                        der to browse a set of coordinates and becomes particularly
an extension of the Morpher concept introduced in Olena                                handy when dealing with neighborhoods. For instance, the
with SCOOP2 [1] generalized to any object with a defined                                set of nearest neighbors, for a given site, would be a list of
communication protocol. Morphers are wrappers created                                  coordinates around a point for an N-D image, or the con-
around an object to modify how it is viewed from the outside                           nected nodes in a graph.
world.
                                                                                       4.3 Genericity on implementations
Two main categories of morphers are implemented: value                                 Both of the kinds of genericity described previously allow
morphers and content morphers.                                                         algorithm implementors to produce a single program that
works with any data type. Some algorithms, however, may              Performance By improving the state of the current im-
be implemented in different ways when additional informa-                  plementation, exploring property-based algorithm op-
tion on the underlying image structure is available. For in-              timization and using the compile-time facilities offered
stance, iterators may be implemented more efficiently when                  by the language.
we know image contents are stored in an array. We can also
distinguish the cases where a 2D image is stored as a matrix
or a 1D array of pixels etc.                                         Climb is primarily meant to be an experimental plateform
                                                                     for exploring various generic paradigms from the dynamic
Climb provides a property description and filtering system            languages perspective. In the future however, we also hope
that gives a finer control over the algorithm selection. This is      to reach a level of usability that will trigger interest amongst
done by assigning properties such as :dimension = :1D, :2D,          Image Processing practitioners.
etc. to images. When defining functions with the defalgo
macro, these properties are handled by the dispatch system.          6. REFERENCES
The appropriate version of a function is selected at runtime,        [1] Th. G´raud and R. Levillain. Semantics-driven
                                                                               e
depending on the properties implemented by the processed                 genericity: A sequel to the static C++ object-oriented
image.                                                                   programming paradigm (SCOOP 2). In Proceedings of
                                                                         the 6th International Workshop on Multiparadigm
5. CONCLUSION                                                            Programming with Object-Oriented Languages
Climb is a generic Image Processing library written in Com-              (MPOOL), Paphos, Cyprus, July 2008.
mon Lisp. It is currently architected as two layers targeting        [2] R. Levillain, Th. G´raud, and L. Najman. Why and
                                                                                             e
two different kinds of users.                                             how to design a generic and efficient image processing
                                                                         framework: The case of the Milena library. In
                                                                         Proceedings of the IEEE International Conference on
   • For an image processing practitioner, Climb provides                Image Processing (ICIP), pages 1941–1944, Hong Kong,
     a set of built-in algorithms, composition tools such as             Sept. 2010.
     the chaining operator and morphers to simplify the              [3] F. Meyer. Un algorithme optimal pour la ligne de
     matching of processed data and algorithms IO.                       partage des eaux, pages 847–857. AFCET, 1991.
                                                                     [4] N. Otsu. A threshold selection method from gray-level
   • For an algorithm implementor, Climb provides a very                 histograms. IEEE Transactions on Systems, Man and
     high-level domain model articulated around three lev-               Cybernetics, 9(1):62–66, Jan. 1979.
     els of abstraction. Genericity on values (RGB, Grayscale        [5] J. Sauvola and M. Pietik¨inen. Adaptive document
                                                                                                   a
     etc.), genericity on structures (sites, site sets) and gener-       image binarization. Pattern Recognition, 33(2):225–236,
     icity on implementations thanks to properties.                      2000.
                                                                     [6] P. Soille. Morphological Image Analysis: Principles and
                                                                         Applications. Springer-Verlag New York, Inc., Secaucus,
The level of abstraction provided by the library makes it
                                                                         NJ, USA, 2 edition, 2003.
possible to implement algorithms without any prior knowl-
edge on the images to which they will be applied. Conversly
supporting a new image types should not have any impact
on the already implemented algorithms.

From our experience, it appears that Common Lisp is very
well suited to highly abstract designs. The level of generic-
ity attained in Climb is made considerably easier by Lisp’s
reflexivity and CLOS’ extensibility. Thanks to the macro
system, this level of abstraction can still be accessed in a rel-
atively simple way by providing domain-specific extensions
(e.g. the chaining operators).

Although the current implementation is considered to be
reasonably stable, Climb is still a very yound project and
should still be regarded as a prototype. In particular, noth-
ing has been done in terms of performance yet, as our main
focus was to design a very generic and expressive API. Fu-
ture work will focus on:


Genericity By providing new data types like graphs, and
    enhancing the current property system.

Usability By extending the $ macro with support for au-
    tomatic insertion of required morphers and offering a
    GUI for visual programming of complex Image Pro-
    cessing chains.

Más contenido relacionado

La actualidad más candente

Mixed Reality: Pose Aware Object Replacement for Alternate Realities
Mixed Reality: Pose Aware Object Replacement for Alternate RealitiesMixed Reality: Pose Aware Object Replacement for Alternate Realities
Mixed Reality: Pose Aware Object Replacement for Alternate RealitiesAlejandro Franceschi
 
CNN and its applications by ketaki
CNN and its applications by ketakiCNN and its applications by ketaki
CNN and its applications by ketakiKetaki Patwari
 
Optic flow estimation with deep learning
Optic flow estimation with deep learningOptic flow estimation with deep learning
Optic flow estimation with deep learningYu Huang
 
Intel, Intelligent Systems Lab: Syable View Synthesis Whitepaper
Intel, Intelligent Systems Lab: Syable View Synthesis WhitepaperIntel, Intelligent Systems Lab: Syable View Synthesis Whitepaper
Intel, Intelligent Systems Lab: Syable View Synthesis WhitepaperAlejandro Franceschi
 
05 contours seg_matching
05 contours seg_matching05 contours seg_matching
05 contours seg_matchingankit_ppt
 
04 image transformations_ii
04 image transformations_ii04 image transformations_ii
04 image transformations_iiankit_ppt
 
Chebyshev Functional Link Artificial Neural Networks for Denoising of Image C...
Chebyshev Functional Link Artificial Neural Networks for Denoising of Image C...Chebyshev Functional Link Artificial Neural Networks for Denoising of Image C...
Chebyshev Functional Link Artificial Neural Networks for Denoising of Image C...IDES Editor
 
高精地图数据协议标准探究
高精地图数据协议标准探究高精地图数据协议标准探究
高精地图数据协议标准探究Weijun Zhong
 
Deep learning for image video processing
Deep learning for image video processingDeep learning for image video processing
Deep learning for image video processingYu Huang
 
3-d interpretation from single 2-d image V
3-d interpretation from single 2-d image V3-d interpretation from single 2-d image V
3-d interpretation from single 2-d image VYu Huang
 
Block Image Encryption using Wavelet
Block Image Encryption using WaveletBlock Image Encryption using Wavelet
Block Image Encryption using WaveletIRJET Journal
 
Stereo Matching by Deep Learning
Stereo Matching by Deep LearningStereo Matching by Deep Learning
Stereo Matching by Deep LearningYu Huang
 
Anchor free object detection by deep learning
Anchor free object detection by deep learningAnchor free object detection by deep learning
Anchor free object detection by deep learningYu Huang
 
A Beginner's Guide to Monocular Depth Estimation
A Beginner's Guide to Monocular Depth EstimationA Beginner's Guide to Monocular Depth Estimation
A Beginner's Guide to Monocular Depth EstimationRyo Takahashi
 
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated RenderingPractical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated RenderingMark Kilgard
 
An Improved Image Fusion Scheme Based on Markov Random Fields with Image Enha...
An Improved Image Fusion Scheme Based on Markov Random Fields with Image Enha...An Improved Image Fusion Scheme Based on Markov Random Fields with Image Enha...
An Improved Image Fusion Scheme Based on Markov Random Fields with Image Enha...Editor IJCATR
 
Introduction to Image Processing with MATLAB
Introduction to Image Processing with MATLABIntroduction to Image Processing with MATLAB
Introduction to Image Processing with MATLABSriram Emarose
 
Multi-hypothesis projection-based shift estimation for sweeping panorama reco...
Multi-hypothesis projection-based shift estimation for sweeping panorama reco...Multi-hypothesis projection-based shift estimation for sweeping panorama reco...
Multi-hypothesis projection-based shift estimation for sweeping panorama reco...Tuan Q. Pham
 

La actualidad más candente (20)

Mixed Reality: Pose Aware Object Replacement for Alternate Realities
Mixed Reality: Pose Aware Object Replacement for Alternate RealitiesMixed Reality: Pose Aware Object Replacement for Alternate Realities
Mixed Reality: Pose Aware Object Replacement for Alternate Realities
 
CNN and its applications by ketaki
CNN and its applications by ketakiCNN and its applications by ketaki
CNN and its applications by ketaki
 
Optic flow estimation with deep learning
Optic flow estimation with deep learningOptic flow estimation with deep learning
Optic flow estimation with deep learning
 
(Ebook photo) a-z of digital photography
(Ebook photo)   a-z of digital photography(Ebook photo)   a-z of digital photography
(Ebook photo) a-z of digital photography
 
Intel, Intelligent Systems Lab: Syable View Synthesis Whitepaper
Intel, Intelligent Systems Lab: Syable View Synthesis WhitepaperIntel, Intelligent Systems Lab: Syable View Synthesis Whitepaper
Intel, Intelligent Systems Lab: Syable View Synthesis Whitepaper
 
05 contours seg_matching
05 contours seg_matching05 contours seg_matching
05 contours seg_matching
 
04 image transformations_ii
04 image transformations_ii04 image transformations_ii
04 image transformations_ii
 
Chebyshev Functional Link Artificial Neural Networks for Denoising of Image C...
Chebyshev Functional Link Artificial Neural Networks for Denoising of Image C...Chebyshev Functional Link Artificial Neural Networks for Denoising of Image C...
Chebyshev Functional Link Artificial Neural Networks for Denoising of Image C...
 
Mnist report
Mnist reportMnist report
Mnist report
 
高精地图数据协议标准探究
高精地图数据协议标准探究高精地图数据协议标准探究
高精地图数据协议标准探究
 
Deep learning for image video processing
Deep learning for image video processingDeep learning for image video processing
Deep learning for image video processing
 
3-d interpretation from single 2-d image V
3-d interpretation from single 2-d image V3-d interpretation from single 2-d image V
3-d interpretation from single 2-d image V
 
Block Image Encryption using Wavelet
Block Image Encryption using WaveletBlock Image Encryption using Wavelet
Block Image Encryption using Wavelet
 
Stereo Matching by Deep Learning
Stereo Matching by Deep LearningStereo Matching by Deep Learning
Stereo Matching by Deep Learning
 
Anchor free object detection by deep learning
Anchor free object detection by deep learningAnchor free object detection by deep learning
Anchor free object detection by deep learning
 
A Beginner's Guide to Monocular Depth Estimation
A Beginner's Guide to Monocular Depth EstimationA Beginner's Guide to Monocular Depth Estimation
A Beginner's Guide to Monocular Depth Estimation
 
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated RenderingPractical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
 
An Improved Image Fusion Scheme Based on Markov Random Fields with Image Enha...
An Improved Image Fusion Scheme Based on Markov Random Fields with Image Enha...An Improved Image Fusion Scheme Based on Markov Random Fields with Image Enha...
An Improved Image Fusion Scheme Based on Markov Random Fields with Image Enha...
 
Introduction to Image Processing with MATLAB
Introduction to Image Processing with MATLABIntroduction to Image Processing with MATLAB
Introduction to Image Processing with MATLAB
 
Multi-hypothesis projection-based shift estimation for sweeping panorama reco...
Multi-hypothesis projection-based shift estimation for sweeping panorama reco...Multi-hypothesis projection-based shift estimation for sweeping panorama reco...
Multi-hypothesis projection-based shift estimation for sweeping panorama reco...
 

Similar a Generic Image Processing With Climb – 5th ELS

Bcs apsg 2010-05-06_presentation
Bcs apsg 2010-05-06_presentationBcs apsg 2010-05-06_presentation
Bcs apsg 2010-05-06_presentationGeoff Sharman
 
Lightspeed Preprint
Lightspeed PreprintLightspeed Preprint
Lightspeed Preprintjustanimate
 
Design and Implementation of EZW & SPIHT Image Coder for Virtual Images
Design and Implementation of EZW & SPIHT Image Coder for Virtual ImagesDesign and Implementation of EZW & SPIHT Image Coder for Virtual Images
Design and Implementation of EZW & SPIHT Image Coder for Virtual ImagesCSCJournals
 
Image De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural NetworkImage De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural Networkaciijournal
 
IMAGE DE-NOISING USING DEEP NEURAL NETWORK
IMAGE DE-NOISING USING DEEP NEURAL NETWORKIMAGE DE-NOISING USING DEEP NEURAL NETWORK
IMAGE DE-NOISING USING DEEP NEURAL NETWORKaciijournal
 
A Novel Approach to Image Denoising and Image in Painting
A Novel Approach to Image Denoising and Image in PaintingA Novel Approach to Image Denoising and Image in Painting
A Novel Approach to Image Denoising and Image in PaintingEswar Publications
 
Using A Application For A Desktop Application
Using A Application For A Desktop ApplicationUsing A Application For A Desktop Application
Using A Application For A Desktop ApplicationTracy Huang
 
Image De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural NetworkImage De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural Networkaciijournal
 
Blank Background Image Lossless Compression Technique
Blank Background Image Lossless Compression TechniqueBlank Background Image Lossless Compression Technique
Blank Background Image Lossless Compression TechniqueCSCJournals
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging SystemVrushali Lanjewar
 
A Smart Camera Processing Pipeline for Image Applications Utilizing Marching ...
A Smart Camera Processing Pipeline for Image Applications Utilizing Marching ...A Smart Camera Processing Pipeline for Image Applications Utilizing Marching ...
A Smart Camera Processing Pipeline for Image Applications Utilizing Marching ...sipij
 
An enhanced fireworks algorithm to generate prime key for multiple users in f...
An enhanced fireworks algorithm to generate prime key for multiple users in f...An enhanced fireworks algorithm to generate prime key for multiple users in f...
An enhanced fireworks algorithm to generate prime key for multiple users in f...journalBEEI
 
Kinect v1+Processing workshot fabcafe_taipei
Kinect v1+Processing workshot fabcafe_taipeiKinect v1+Processing workshot fabcafe_taipei
Kinect v1+Processing workshot fabcafe_taipeiMao Wu
 
Presentation1.2.pptx
Presentation1.2.pptxPresentation1.2.pptx
Presentation1.2.pptxpranaykusuma
 
Hardware software co simulation of edge detection for image processing system...
Hardware software co simulation of edge detection for image processing system...Hardware software co simulation of edge detection for image processing system...
Hardware software co simulation of edge detection for image processing system...eSAT Publishing House
 
A New Chaos Based Image Encryption and Decryption using a Hash Function
A New Chaos Based Image Encryption and Decryption using a Hash FunctionA New Chaos Based Image Encryption and Decryption using a Hash Function
A New Chaos Based Image Encryption and Decryption using a Hash FunctionIRJET Journal
 

Similar a Generic Image Processing With Climb – 5th ELS (20)

Bcs apsg 2010-05-06_presentation
Bcs apsg 2010-05-06_presentationBcs apsg 2010-05-06_presentation
Bcs apsg 2010-05-06_presentation
 
Log polar coordinates
Log polar coordinatesLog polar coordinates
Log polar coordinates
 
Lightspeed Preprint
Lightspeed PreprintLightspeed Preprint
Lightspeed Preprint
 
Design and Implementation of EZW & SPIHT Image Coder for Virtual Images
Design and Implementation of EZW & SPIHT Image Coder for Virtual ImagesDesign and Implementation of EZW & SPIHT Image Coder for Virtual Images
Design and Implementation of EZW & SPIHT Image Coder for Virtual Images
 
Image De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural NetworkImage De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural Network
 
IMAGE DE-NOISING USING DEEP NEURAL NETWORK
IMAGE DE-NOISING USING DEEP NEURAL NETWORKIMAGE DE-NOISING USING DEEP NEURAL NETWORK
IMAGE DE-NOISING USING DEEP NEURAL NETWORK
 
A Novel Approach to Image Denoising and Image in Painting
A Novel Approach to Image Denoising and Image in PaintingA Novel Approach to Image Denoising and Image in Painting
A Novel Approach to Image Denoising and Image in Painting
 
Using A Application For A Desktop Application
Using A Application For A Desktop ApplicationUsing A Application For A Desktop Application
Using A Application For A Desktop Application
 
Image De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural NetworkImage De-Noising Using Deep Neural Network
Image De-Noising Using Deep Neural Network
 
Blank Background Image Lossless Compression Technique
Blank Background Image Lossless Compression TechniqueBlank Background Image Lossless Compression Technique
Blank Background Image Lossless Compression Technique
 
M017427985
M017427985M017427985
M017427985
 
Performance Anaysis for Imaging System
Performance Anaysis for Imaging SystemPerformance Anaysis for Imaging System
Performance Anaysis for Imaging System
 
Mnist report ppt
Mnist report pptMnist report ppt
Mnist report ppt
 
Himadeep
HimadeepHimadeep
Himadeep
 
A Smart Camera Processing Pipeline for Image Applications Utilizing Marching ...
A Smart Camera Processing Pipeline for Image Applications Utilizing Marching ...A Smart Camera Processing Pipeline for Image Applications Utilizing Marching ...
A Smart Camera Processing Pipeline for Image Applications Utilizing Marching ...
 
An enhanced fireworks algorithm to generate prime key for multiple users in f...
An enhanced fireworks algorithm to generate prime key for multiple users in f...An enhanced fireworks algorithm to generate prime key for multiple users in f...
An enhanced fireworks algorithm to generate prime key for multiple users in f...
 
Kinect v1+Processing workshot fabcafe_taipei
Kinect v1+Processing workshot fabcafe_taipeiKinect v1+Processing workshot fabcafe_taipei
Kinect v1+Processing workshot fabcafe_taipei
 
Presentation1.2.pptx
Presentation1.2.pptxPresentation1.2.pptx
Presentation1.2.pptx
 
Hardware software co simulation of edge detection for image processing system...
Hardware software co simulation of edge detection for image processing system...Hardware software co simulation of edge detection for image processing system...
Hardware software co simulation of edge detection for image processing system...
 
A New Chaos Based Image Encryption and Decryption using a Hash Function
A New Chaos Based Image Encryption and Decryption using a Hash FunctionA New Chaos Based Image Encryption and Decryption using a Hash Function
A New Chaos Based Image Encryption and Decryption using a Hash Function
 

Más de Christopher Chedeau

Climb - Property-based dispatch in functional languages [Report]
Climb - Property-based dispatch in functional languages [Report]Climb - Property-based dispatch in functional languages [Report]
Climb - Property-based dispatch in functional languages [Report]Christopher Chedeau
 
Climb - Property-based dispatch in functional languages [Slides]
Climb - Property-based dispatch in functional languages [Slides]Climb - Property-based dispatch in functional languages [Slides]
Climb - Property-based dispatch in functional languages [Slides]Christopher Chedeau
 
JSPP: Morphing C++ into Javascript
JSPP: Morphing C++ into JavascriptJSPP: Morphing C++ into Javascript
JSPP: Morphing C++ into JavascriptChristopher Chedeau
 
Climb – Chaining Operators - Report
Climb – Chaining Operators - ReportClimb – Chaining Operators - Report
Climb – Chaining Operators - ReportChristopher Chedeau
 
Climb - A Generic and Dynamic Approach to Image Processing
Climb - A Generic and Dynamic Approach to Image ProcessingClimb - A Generic and Dynamic Approach to Image Processing
Climb - A Generic and Dynamic Approach to Image ProcessingChristopher Chedeau
 
Climb - A Generic and Dynamic Approach to Image Processing
Climb - A Generic and Dynamic Approach to Image ProcessingClimb - A Generic and Dynamic Approach to Image Processing
Climb - A Generic and Dynamic Approach to Image ProcessingChristopher Chedeau
 

Más de Christopher Chedeau (9)

Climb - Property-based dispatch in functional languages [Report]
Climb - Property-based dispatch in functional languages [Report]Climb - Property-based dispatch in functional languages [Report]
Climb - Property-based dispatch in functional languages [Report]
 
Climb - Property-based dispatch in functional languages [Slides]
Climb - Property-based dispatch in functional languages [Slides]Climb - Property-based dispatch in functional languages [Slides]
Climb - Property-based dispatch in functional languages [Slides]
 
JSPP: Morphing C++ into Javascript
JSPP: Morphing C++ into JavascriptJSPP: Morphing C++ into Javascript
JSPP: Morphing C++ into Javascript
 
J
JJ
J
 
Morpho math
Morpho mathMorpho math
Morpho math
 
Slides
SlidesSlides
Slides
 
Climb – Chaining Operators - Report
Climb – Chaining Operators - ReportClimb – Chaining Operators - Report
Climb – Chaining Operators - Report
 
Climb - A Generic and Dynamic Approach to Image Processing
Climb - A Generic and Dynamic Approach to Image ProcessingClimb - A Generic and Dynamic Approach to Image Processing
Climb - A Generic and Dynamic Approach to Image Processing
 
Climb - A Generic and Dynamic Approach to Image Processing
Climb - A Generic and Dynamic Approach to Image ProcessingClimb - A Generic and Dynamic Approach to Image Processing
Climb - A Generic and Dynamic Approach to Image Processing
 

Último

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 

Último (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 

Generic Image Processing With Climb – 5th ELS

  • 1. Generic Image Processing With Climb Laurent Senta Christopher Chedeau Didier Verna senta@lrde.epita.fr christopher.chedeau@lrde.epita.fr didier.verna@lrde.epita.fr Epita Research and Development Laboratory 14-16 rue Voltaire, 94276 Le Kremlin-Bicêtre Paris, France ABSTRACT a dynamic language. Common Lisp provides the necessary Categories and Subject Descriptors flexibility and extensibility to let us consider several alter- I.4.0 [Image Processing And Computer Vision]: Gen- nate implementations of the model provided by Olena, from eral—image processing software; D.2.11 [Software Engi- the dynamic perspective. neering]: Software Architectures—Data abstraction, Domain- specific architectures First, we provide a survey of the algorithms readily available in Climb. Next, we present the tools available for compos- ing basic algorithms into more complex Image Processing General Terms chains. Finally we describe the generic building blocks used Design, Languages to create new algorithms, hereby extending the library. Keywords 2. FEATURES Generic Image Processing, Common Lisp Climb provides a basic image type with the necessary load- ing and saving operations, based on the lisp-magick library. 1. INTRODUCTION This allows for direct manipulation of many images formats, Climb is a generic image processing library written in Com- such as PNG and JPEG. The basic operations provided by mon Lisp. It comes with a set of built-in algorithms such as Climb are loading an image, applying algorithms to it and erosion, dilation and other mathematical morphology oper- saving it back. In this section, we provide a survey of the ators, thresholding and image segmentation. algorithms already built in the library. The idea behind genericity is to be able to write algorithms only once, independently from the data types to which they 2.1 Histograms will be applied. In the Image Processing domain, being fully A histogram is a 2D representation of image information. generic means being independent from the image formats, The horizontal axis represents tonal values, from 0 to 255 pixels types, storage schemes (arrays, graphs, dimensions) in common grayscale images. For every tonal value, the etc. Such level of genericity, however, may induce an impor- vertical axis counts the number of such pixels in the image. tant performance cost. Some Image Processing algorithms may be improved when the information provided by a histogram is known. In order to reconcile genericity and performance, the LRDE1 has developed an Image Processing platform called Olena2 . Olena is written in C++ and uses its templating system Histogram Equalization. An image (e.g. with a low con- abundantly. Olena is a ten years old project, well-proven trast) does not necessarily contain the full spectrum of in- both in terms of usability, performance and genericity. [2] tensity. In that case, its histogram will only occupy a nar- row band on the horizontal axis. Concretely, this means In this context, the goal of Climb is to use this legacy for that some level of detail may be hidden to the human eye. proposing another vision of the same domain, only based on Histogram equalization identifies how the pixel values are spread and transforms the image in order to use the full 1 EPITA Research and development laboratory range of gray, making details more apparent. 2 http://olena.lrde.epita.fr Plateau Equalization. Plateau equalization is used to re- veal the darkest details of an image, that would not oth- erwise be visible. It is a histogram equalization algorithm applied on a distribution of a clipped histogram. The pixels values greater than a given threshold are set to this thresh- old while the other ones are left untouched. 2.2 Threshold
  • 2. Thresholding is a basic binarization algorithm that converts Mathematical Morphology can also be applied on grayscale a grayscale image to a binary one. This class of algorithms images, leading to news algorithms: works by comparing each value from the original image to a threshold. Values beneath the threshold are set to False in the resulting image, while the others are set to True. TopHat Sharpen details Laplacian operator Extract edges Climb provides 3 threshold algorithms: Hit-Or-Miss Detect specific patterns Basic threshold. Apply the algorithm using a user-defined 3. COMPOSITION TOOLS threshold on the whole image. Composing algorithms like the ones described in the previ- ous section is interesting for producing more complex image processing chains. Therefore, in addition to the built-in al- Otsu Threshold. Automatically find the best threshold value gorithms that Climb already provides, a composition infras- using the image histogram. The algorithm picks the value tructure is available. that minimizes the spreads between the True and False do- mains as described by Nobuyuki Otsu [4]. 3.1 Chaining Operators 3.1.1 The $ operator The most essential form of composition is the sequential one: Sauvola threshold. In images with a lot of variation, global algorithms are applied to an image, one after the other. thresholding is not accurate anymore, so adaptive threshold- ing must be used. The Sauvola thresholding algorithm [5] Programming a chain of algorithms by hand requires a lot picks the best threshold value for each pixel from the given of variables for intermediate storage of temporary images. image using its neighbors. This renders the code cumbersome to read an maintain. 2.3 Watershed To facilitate the writing of such a chain, we therefore pro- vide a chaining operator which automates the plugging of Watershed is another class of image segmentation algorithms. an algorithm’s output to the input of the next one. Such Used on a grayscale image seen as a topographic relief, they an operator would be written as follows in traditional Lisp extract the different basins within the image. Watershed al- syntax: gorithms produce a segmented image where each component is labeled with a different tag. ( image−s a v e ( algo2 Climb provides a implementation of Meyer’s flooding algo- ( algo1 rithm [3]. Components are initialized at the “lowest” region ( image−l o a d ‘ ‘ image . png ’ ’ ) of the image (the darkest ones). Then, each component is param1 ) extended until it collide with another one, following the im- param2 ) age’s topography. ‘ ‘ output . png ’ ’ ) 2.4 Mathematical Morphology Unfortunately, this syntax is not optimal. The algorithms Mathematical Morphology used heavily in Image Processing. must be read in reverse order, and arguments end up far It defines a set of operators that can be cumulated in order away from the function to which they are passed. to extract specific details from images. Inspired by Clojure’s Trush operator (->) 3 and the JQuery4 Mathematical Morphology algorithms are based on the ap- chaining process, Climb provides the $ macro which allows plication of a structuring element to every points of an im- to chain operations in a much clearer form. age, gathering information using basic operators (e.g. logical $ ( ( image−l o a d ‘ ‘ image . png ’ ’ ) operators and, or) [6]. ( a l g o 1 param1 ) ( a l g o 2 param2 ) ( image−s a v e ) ) Erosion and Dilation. Applied on a binary image, these algorithms respectively erodes and dilate the True areas in the picture. Combining these operators leads to new algo- 3.1.2 Flow Control rithms: In order to ease the writing of a processing chain, the $ macro is equipped with several other flow control operators. Opening Apply an erosion then a dilation. This removes the small details from the image and opens the True • The // operator splits the chain into several indepen- shapes. dent subchains that may be executed in parallel. 3 http://clojure.github.com/clojure/clojure. Closing Apply a dilation then an erosion. This closes the core-api.html#clojure.core/-> 4 True shapes. http://api.jquery.com/jQuery/
  • 3. • The quote modifier (’) allows to execute a function Value morpher. A value morpher operates a dynamic trans- outside the actual processing chain. This is useful for lation from one value type to another. For instance, an RGB doing side effects (see the example below). image can be used as a grayscale one when seen through a morpher that returns the pixels intensity instead of their • The $1, $2, etc. variables store the intermediate results original color. It is therefore possible to apply a watershed from the previous executions, allowing to use them ex- algorithm on a colored image in a transparent fashion, with- plicitly as arguments in the subsequent calls in the out actually transforming the original image into a grayscale chain. one. • The # modifier may be used to disrupt the implicit chaining and let the programmer use the $1, etc. vari- ables explictly. Content morpher. A content morpher operates a dynamic translation from one image structure to another. For in- stance, a small image can be used as a bigger one when seen These operators allow for powerful chaining schemes, as il- through a morpher that returns a default value (e.g. black), lustrated below: when accessing coordinates outside the original image do- ( $ ( l o a d ‘ ‘ l e n a g r a y . png ’ ’ ) main. It is therefore possible to apply an algorithm built for images with a specific size (e.g. power of two), without (// having to extend the original image. ( ’ ( timer −s t a r t ) ( otsu ) Possible uses for content morphers include restriction (parts ’ ( timer −p r i n t ”Otsu ”) of the structures being ignored), addition (multiple struc- ( s a v e ” o t s u . png ”) ) ; $1 tures being combined) and reordering (structures order be- ing modified). ( ’ ( timer −s t a r t ) ( s a u v o l a ( box2d 1 ) ) 4. EXTENSIBILITY ’ ( timer −p r i n t ”Sauvol a 1 ”) The pixels of an image are usually represented aligned on ( s a v e ” s a u v o l a 1 . png ”) ) ; $2 a regular 2D grid. In this case, the term “pixel” can be interpreted in two ways, the position and the value, which ( ’ ( timer −s t a r t ) we need to clearly separate. Besides, digital images are not ( s a u v o l a ( box2d 5 ) ) necessarily represented on a 2D grid. Values can be placed ’ ( timer −p r i n t ”Sauvol a 5 ”) on hexagonal grids, 3D grids, graphs etc. In order to be ( s a v e ” s a u v o l a 5 . png ”) ) ) ; $3 sufficiently generic, we hereby define an image as a function from a position (a site) to a value: img(site) = value. (// (#( d i f f $1 $2 ) A truly generic algorithm should not depend on the under- ( save ‘ ‘ d i f f −otsu−s a u v o l a 1 . png ’ ’ ) ) lying structure of the image. Instead it should rely on higher (#( d i f f $1 $3 ) level concepts such as neighborhoods, iterators, etc. More ( save ‘ ‘ d i f f −otsu−s a u v o l a 5 . png ’ ’ ) ) precisely, we have identified 3 different levels of genericity, (#( d i f f $2 $3 ) as explained below. ( save ‘ ‘ d i f f −s a u v o l a 1 −s a u v o l a 5 . png ’ ’ ) ) ) ) 4.1 Genericity on values Genericity on values is based on the CLOS dispatch. Us- 3.2 Morphers ing multimethods, generic operators like comparison and As we saw previously, many Image Processing algorithms addition are built for each value type, such as RGB and result in images of a different type than the original image Grayscale. (for instance the threshold of a grayscale image is a boolean one). What’s more, several algorithms can only be applied on images of a specific type (for instance, watershed may 4.2 Genericity on structures only be applied to grayscale images). The notion of “site” provides an abstract description for any kind of position within an image. For instance, a site might Programming a chain of algorithms by hand requires a lot of be an n-uplet for an N-D image, a node within a graph, etc. explicit conversion from one type to another. This renders the code cumbersome to read an maintain. Climb also provides a way to represent the regions of an image through the site-set object. This object is used in or- To facilitate the writing of such a chain, we therefore provide der to browse a set of coordinates and becomes particularly an extension of the Morpher concept introduced in Olena handy when dealing with neighborhoods. For instance, the with SCOOP2 [1] generalized to any object with a defined set of nearest neighbors, for a given site, would be a list of communication protocol. Morphers are wrappers created coordinates around a point for an N-D image, or the con- around an object to modify how it is viewed from the outside nected nodes in a graph. world. 4.3 Genericity on implementations Two main categories of morphers are implemented: value Both of the kinds of genericity described previously allow morphers and content morphers. algorithm implementors to produce a single program that
  • 4. works with any data type. Some algorithms, however, may Performance By improving the state of the current im- be implemented in different ways when additional informa- plementation, exploring property-based algorithm op- tion on the underlying image structure is available. For in- timization and using the compile-time facilities offered stance, iterators may be implemented more efficiently when by the language. we know image contents are stored in an array. We can also distinguish the cases where a 2D image is stored as a matrix or a 1D array of pixels etc. Climb is primarily meant to be an experimental plateform for exploring various generic paradigms from the dynamic Climb provides a property description and filtering system languages perspective. In the future however, we also hope that gives a finer control over the algorithm selection. This is to reach a level of usability that will trigger interest amongst done by assigning properties such as :dimension = :1D, :2D, Image Processing practitioners. etc. to images. When defining functions with the defalgo macro, these properties are handled by the dispatch system. 6. REFERENCES The appropriate version of a function is selected at runtime, [1] Th. G´raud and R. Levillain. Semantics-driven e depending on the properties implemented by the processed genericity: A sequel to the static C++ object-oriented image. programming paradigm (SCOOP 2). In Proceedings of the 6th International Workshop on Multiparadigm 5. CONCLUSION Programming with Object-Oriented Languages Climb is a generic Image Processing library written in Com- (MPOOL), Paphos, Cyprus, July 2008. mon Lisp. It is currently architected as two layers targeting [2] R. Levillain, Th. G´raud, and L. Najman. Why and e two different kinds of users. how to design a generic and efficient image processing framework: The case of the Milena library. In Proceedings of the IEEE International Conference on • For an image processing practitioner, Climb provides Image Processing (ICIP), pages 1941–1944, Hong Kong, a set of built-in algorithms, composition tools such as Sept. 2010. the chaining operator and morphers to simplify the [3] F. Meyer. Un algorithme optimal pour la ligne de matching of processed data and algorithms IO. partage des eaux, pages 847–857. AFCET, 1991. [4] N. Otsu. A threshold selection method from gray-level • For an algorithm implementor, Climb provides a very histograms. IEEE Transactions on Systems, Man and high-level domain model articulated around three lev- Cybernetics, 9(1):62–66, Jan. 1979. els of abstraction. Genericity on values (RGB, Grayscale [5] J. Sauvola and M. Pietik¨inen. Adaptive document a etc.), genericity on structures (sites, site sets) and gener- image binarization. Pattern Recognition, 33(2):225–236, icity on implementations thanks to properties. 2000. [6] P. Soille. Morphological Image Analysis: Principles and Applications. Springer-Verlag New York, Inc., Secaucus, The level of abstraction provided by the library makes it NJ, USA, 2 edition, 2003. possible to implement algorithms without any prior knowl- edge on the images to which they will be applied. Conversly supporting a new image types should not have any impact on the already implemented algorithms. From our experience, it appears that Common Lisp is very well suited to highly abstract designs. The level of generic- ity attained in Climb is made considerably easier by Lisp’s reflexivity and CLOS’ extensibility. Thanks to the macro system, this level of abstraction can still be accessed in a rel- atively simple way by providing domain-specific extensions (e.g. the chaining operators). Although the current implementation is considered to be reasonably stable, Climb is still a very yound project and should still be regarded as a prototype. In particular, noth- ing has been done in terms of performance yet, as our main focus was to design a very generic and expressive API. Fu- ture work will focus on: Genericity By providing new data types like graphs, and enhancing the current property system. Usability By extending the $ macro with support for au- tomatic insertion of required morphers and offering a GUI for visual programming of complex Image Pro- cessing chains.