Roland Levillain

Practical genericity: Writing image processing algorithms both reusable and efficient

By Roland Levillain, Thierry Géraud, Laurent Najman, Edwin Carlinet

2014-09-10

In Progress in pattern recognition, image analysis, computer vision, and applications – proceedings of the 19th iberoamerican congress on pattern recognition (CIARP)

Abstract

An important topic for the image processing and pattern recognition community is the construction of open source and efficient libraries. An increasing number of software frameworks are said to be generic: they allow users to write reusable algorithms compatible with many input image types. However, this design choice is often made at the expense of performance. We present an approach to preserve efficiency in a generic image processing framework, by leveraging data types features. Variants of generic algorithms taking advantage of image types properties can be defined, offering an adjustable trade-off between genericity and efficiency. Our experiments show that these generic optimizations can match dedicated code in terms of execution times, and even sometimes perform better than routines optimized by hand. Digital Topology software should reflect the generality of the underlying mathematics: mapping the latter to the former requires genericity. By designing generic solutions, one can effectively reuse digital topology data structures and algorithms. We propose an image processing framework focused on the Generic Programming paradigm in which an algorithm on the paper can be turned into a single code, written once and usable with various input types. This approach enables users to design and implement new methods at a lower cost, try cross-domain experiments and help generalize results.

Continue reading

Planting, growing and pruning trees: Connected filters applied to document image analysis

By Guillaume Lazzara, Thierry Géraud, Roland Levillain

2013-12-10

In Proceedings of the 11th IAPR international workshop on document analysis systems (DAS)

Abstract

Mathematical morphology, when used in the field of document image analysis and processing, is often limited to some classical yet basic tools. The domain however features a lesser-known class of powerful operators, called connected filters. These operators present an important property: they do not shift nor create contours. Most connected filters are linked to a tree-based representation of an image’s contents, where nodes represent connected components while edges express an inclusion relation. By computing attributes for each node of the tree from the corresponding connected component, then selecting nodes according to an attribute-based criterion, one can either filter or recognize objects in an image. This strategy is very intuitive, efficient, easy to implement, and actually well-suited to processing images of magazines. Examples of applications include image simplification, smart binarization, and object identification.

Continue reading

Writing reusable digital topology algorithms in a generic image processing framework

Abstract

Digital Topology software should reflect the generality of the underlying mathematics: mapping the latter to the former requires genericity. By designing generic solutions, one can effectively reuse digital topology data structures and algorithms. We propose an image processing framework focused on the Generic Programming paradigm in which an algorithm on the paper can be turned into a single code, written once and usable with various input types. This approach enables users to design and implement new methods at a lower cost, try cross-domain experiments and help generalize results.

Continue reading

Writing reusable digital geometry algorithms in a generic image processing framework

By Roland Levillain, Thierry Géraud, Laurent Najman

2012-07-30

In Proceedings of the workshop on applications of digital geometry and mathematical morphology (WADGMM)

Abstract

Digital Geometry software should reflect the generality of the underlying mathematics: mapping the latter to the former requires genericity. By designing generic solutions, one can effectively reuse digital geometry data structures and algorithms. We propose an image processing framework centered on the Generic Programming paradigm in which an algorithm on the paper can be turn into a single code, written once and usable with various input types. This approach enables users to design and implement new methods at a lower cost, try cross-domain experiments and help generalize results.

Continue reading

Towards a software architecture for generic image processing

Abstract

In the context of software engineering for image processing (IP), we consider the notion of reusability of algorithms. In many software tools, an algorithm’s implementation often depends on the type of processed data. In a broad definition, discrete digital images may have various forms—classical 2D images, 3D volumes, non-regular graphs, cell complexes, and so on—thus leading to a combinatorial explosion of the theoretical number of implementations. Generic programming (GP) is a framework suited to the development of reusable software tools. We present a programming paradigm based on GP designed for the creation of scientific software such as IP tools. This approach combines the benefits of reusability, expressive power, extensibility, and efficiency. We then propose a software architecture for IP using this programming paradigm based on a generic IP library. The foundations of this framework define essential IP concepts, enabling the development of algorithms compatible with many image types. We finally present a strategy to build high-level tools on top of this library, such as bridges to dynamic languages or graphical user interfaces. This mechanism has been designed to preserve the genericity and efficiency of the underlying software tools, while making them simpler to use and more flexible.

Continue reading

The SCRIBO module of the Olena platform: A free software framework for document image analysis

By Guillaume Lazzara, Roland Levillain, Thierry Géraud, Yann Jacquelet, Julien Marquegnies, Arthur Crépin-Leblond

2011-06-01

In Proceedings of the 11th international conference on document analysis and recognition (ICDAR)

Abstract

Electronic documents are being more and more usable thanks to better and more affordable network, storage and computational facilities. But in order to benefit from computer-aided document management, paper documents must be digitized and analyzed. This task may be challenging at several levels. Data may be of multiple types thus requiring different adapted processing chains. The tools to be developed should also take into account the needs and knowledge of users, ranging from a simple graphical application to a complete programming framework. Finally, the data sets to process may be large. In this paper, we expose a set of features that a Document Image Analysis framework should provide to handle the previous issues. In particular, a good strategy to address both flexibility and efficiency issues is the Generic Programming (GP) paradigm. These ideas are implemented as an open source module, SCRIBO, built on top of Olena, a generic and efficient image processing platform. Our solution features services such as preprocessing filters, text detection, page segmentation and document reconstruction (as XML, PDF or HTML documents). This framework, composed of reusable software components, can be used to create full-fledged graphical applications, small utilities, or processing chains to be integrated into third-party projects.

Continue reading

Une approche générique du logiciel pour le traitement d’images préservant les performances

By Roland Levillain, Thierry Géraud, Laurent Najman

2011-05-13

In Proceedings of the 23rd symposium on signal and image processing (GRETSI)

Abstract

De plus en plus d’outils logiciels modernes pour le traitement d’images sont conçus en prenant en compte le problème de la généricité du code, c’est-à-dire la possibilité d’écrire des algorithmes réutilisables, compatibles avec de nombreux types d’entrées. Cependant, ce choix de conception se fait souvent au détriment des performances du code exécuté. Du fait de la grande variété des types d’images existants et de la nécessité d’avoir des implémentations rapides, généricité et performance apparaissent comme des qualités essentielles du logiciel en traitement d’images. Cet article présente une approche préservant les performances dans un framework logiciel générique tirant parti des caractéristiques des types de données utilisés. Grâce à celles-ci, il est possible d’écrire des variantes d’algorithmes génériques offrant un compromis entre généricité et performance. Ces alternatives sont capables de préserver une partie des aspects génériques d’origine tout en apportant des gains substantiels à l’exécution. D’après nos essais, ces optimisations génériques fournissent des performances supportant la comparaison avec du code dédié, allant parfois même jusqu’à surpasser des routines optimisées manuellement.

Continue reading

Why and how to design a generic and efficient image processing framework: The case of the Milena library

By Roland Levillain, Thierry Géraud, Laurent Najman

2010-05-26

In Proceedings of the IEEE international conference on image processing (ICIP)

Abstract

Most image processing frameworks are not generic enough to provide true reusability of data structures and algorithms. In fact, genericity allows users to write and experiment virtually any method on any compatible input(s). In this paper, we advocate the use of generic programming in the design of image processing software, while preserving performances close to dedicated code. The implementation of our proposal, Milena, a generic and efficient library, illustrates the benefits of our approach.

Continue reading

Milena: Write generic morphological algorithms once, run on many kinds of images

By Roland Levillain, Thierry Géraud, Laurent Najman

2009-04-09

In Mathematical morphology and its application to signal and image processing – proceedings of the ninth international symposium on mathematical morphology (ISMM)

Abstract

We present a programming framework for discrete mathematical morphology centered on the concept of genericity. We show that formal definitions of morphological algorithms can be translated into actual code, usable on virtually any kind of compatible images, provided a general definition of the concept of image is given. This work is implemented in Milena, a generic, efficient, and user-friendly image processing library.

Continue reading

TWEAST: A simple and effective technique to implement concrete-syntax AST rewriting using partial parsing

By Akim Demaille, Roland Levillain, Benoît Sigoure

2008-10-11

In Proceedings of the 24th annual ACM symposium on applied computing (SAC’09)

Abstract

ASTs are commonly used to represent an input/output program in compilers and language processing tools. Many of the tasks of these tools consist in generating and rewriting ASTs. Such an approach can become tedious and hard to maintain for complex operations, namely program transformation, optimization, instrumentation, etc. On the other hand, concrete syntax provides a natural and simpler representation of programs, but it is not usually available as a direct feature of the aforementioned tools. We propose a simple technique to implement AST generation and rewriting in general purpose languages using concrete syntax. Our approach relies on extensions made in the scanner and the parser and the use of objects supporting partial parsing called Text With Embedded Abstract Syntax Trees (TWEASTS). A compiler for a simple language (Tiger) written in serves as an example, featuring transformations in concrete syntax: syntactic desugaring, optimization, code instrumentation such as bounds-checking, etc. Extensions of this technique to provide a full-fledged concrete-syntax rewriting framework are presented as well.

Continue reading