Toolbox of image processing for numerical python

8 downloads 4848 Views 101KB Size Report
guage serving for interface to a library of high performance normally written in C or Fortran. Python, as well as the. Numerical package [3], offers this organization ...
Toolbox of Image Processing for Numerical Python ALEXANDRE CONCALVES SILVA’, ROBERTO DE ALENCAR LOTUFO’, RUBENSCAMPOS MACHAD02 ‘FEEC-Faculdade de Engenharia ElCtrica e de Computaqiio - Caixa Postal 6101, 13083-970, Campinas, SP, Brasil {alexgs,lotufo}@dca.fee.unicamp.br 21TI-Instituto Nacional de Tecnologia da Informaqgo - Caixa Postal 6162, 13089-500, Campinas, SP, B r a d [email protected]

Abstract. This work consists of the study, development and implementation of a toolbox of image processing for Python language [ 11. This environment will be useful in education, research and development of final applications. The toolbox will be done using the easinesses of the Adesso project [2] for development of software of scientific computation. 1 Introduction

sign scientific components where most of the information is stored in a XML database and code, documentation and packaging are generated automatically using the Adesso engine. The methodology of the Adesso allows to a lesser effort of maintenance and management of the information, consistency in the user interface, flexibility in the presentation based on designed stylesheets, greater immunity to errors, among others characteristics.

A generic computational tool for image processing usually offers two levels of programming: a script interpreted language serving for interface to a library of high performance normally written in C or Fortran. Python, as well as the Numerical package [3], offers this organization through a well-defined modular form to program. This association guarantees efficient multidimensional computation that is essential for image processing. There are diverse appropriate tools for image processing nowadays. The objective is to congregate the positive features of platforms such as MATLAB and on-line image processing course such as the Digital Image Processing (DIP) using Khoros [4] into a freely available open system.

4 Conclusions The extensible Python language allows the efficient implementation of algorithms suitable for image processing. The toolbox being created with Adesso will be another option for the current MATLAB image processing toolbox being developed at DCA-FEEC-UNICAMP and used in its graduated courses, while retaining its compatibility.

2 Python language Python is a modern open source, interpreted, object oriented, very high level, rapid prototyping language, with an easy’syntax (reads like “pseudo-code”), extensible (C/ C++/Java), suitable for embedded applications, extremely portable and sufficiently efficient for our intention when associated to the Numerical package. Python has the flexibility of Perl, associated with the numerical power and easy of use of MATLAB, available as an open source environment. Below we have an example of function in Python. The figure shows the output generated for a call to this function by typing cos2d([64,64],[32,16],pi)in the Python console:

References [I] G. Rossum, Python Tutorial, E L. Drake Jr., editor, April 15,2001. http://www.python.org/doc/current/tut/tut.html

[2] R. C. Machado, R. A. Lotufo, “Adesso: Ambiente Computacional para Desenvolvimento Rdpido de Aplicqdes ”. DCA-FEiEC-UNICAMP/FCTI Activities Report, May, 2000, Campinas.

[3] D. Ascher, P. E Dubois, K. Hinsen, J. Hugunin, and T. Oliphant’ , Numerical Python, LLNLL, University of California, June 1, 2001.

from Numeric import * def cos2d(s, T, Phi): a l . a2 = range(s[O]). range(s[ll) x = resize(a1, (len(a2), len(a1))) y = transpose(resize(a2,(len(al), len(a2)))) reNI7I cos(2*pi*x/r[O] + 2*pi*ym[1] +Phi)

http://www.pfdubois.com/numpy/html2/numpy.html

[4] R. Jordan, R. A. Lotufo, Interactive Digital Image Processing Course on the World-Wide Web, Proccedings of the 1996 International Conference on Image Processing. IEEE Signal Processing Society. pp.433-436. September 16-19, 1996, Lausanne, Switzerland.

3 Adesso environment The Python Image Processing Toolbox is built using the Adesso authoring system. Adesso is an environment to de-

1530-1834/01$10.00 0 2001 IEEE

402