Generating and Testing Halftoning Filters Co-Evolutionarily TIMO MANTERE Department of Information Technology Lappeenranta University of Technology P.O. Box 20, FIN-53851 Lappeenranta FINLAND tmantere@lut.fi http://www.uwasa.fi/~a70752 JARMO T. ALANDER Department of Technical Sciences University of Vaasa P.O. Box 700, FIN-65101 Vaasa FINLAND jal@uwasa.fi http://www.uwasa.fi/~jal Abstract: - In this paper we evaluate the potentials of using co-evolutionary optimization method to automatically generate both halftoning filters and their test images. The genetic algorithm generates halftone filters and at the same time, tries to create the hardest test image for each filter. The best filter being the one for which the hardest test image, when dithered, differs least from the original. An image population defines the fitness of halftoning filters and vice versa. Key-Words: - Co-evolution, digital halftoning, genetic algorithms, software testing, test image generation. 1 Introduction There does not seem to be much systematic research in the field of test image evaluation. How to determine that a particular test image is good for testing some specific image processing algorithm or software? What are the essential characteristics of a good test image? Much more often than not researchers rely on commonly used and unfortunately very limited test image sets. We encountered this problem, when we wanted to test an image halftoning system we implemented for an ink jet marking machine [1-2]. In our other study [3-4] we used genetic algorithms (GA) for software testing purposes. In this work we try to combine the knowledge gained in these two previous studies in order to use GAs for generating test images for the halftoning software. In [5] we find that GA is indeed able to find images that are considerably distorted when halftoned, and thus reveal potential problematic image features that the halftoning method is not able to reproduce satisfactorily. This paper concentrates on finding how co-evolution can be adapted to help defining good halftoning filters and test images for them. 1.1 Genetic algorithms Genetic algorithms [6] are optimization methods that are based on simplified computational models of evolutionary biology in nature. A GA forms a kind of electronic population, the members of which fight for survival, adapting as well as possible to the environment, which is an optimization problem. GAs use genetic operations, such as selection, crossover, and mutation in order to generate solution trials that meet the given optimization constraints ever better. Surviving and crossbreeding possibilities depend on how well individuals fulfill the target function. GAs do not require the optimized function to be continuous or derivable, or even be expressed as a mathematical formula, that is perhaps the most important factor why they are gaining more and more popularity in practical technical optimization. Today GA methods form a broad spectrum of heuristic optimization methods under intense study. 1.2 Co-evolution Co-evolutionary computation [7-8] (CEC) generally means that an evolutionary algorithm is composed of several species with different types of individuals, while standard evolutionary algorithm has only single population of individuals. In CEC the genetic operations, crossover and mutation, are applied to only a single species, while selection can be performed among individuals of one or more species. When we deal with an optimization problem, where the environmental conditions are stochastic or immeasurable, co-evolution can be applied to develop the environmental conditions concurrently with the problem. Trial solutions implied by one species are evaluated in the environment implied by another species. The goal is to accomplish an upward spiral, an arms race, where both species would achieve ever better results. 1.3 Dithering Digital halftoning [9], or dithering, is a method used to convert continuous tone images into images with a limited number of tones, usually only two: black and white. The main problem is to do the halftoning so that the bi-level output image does not contain prominent artifacts, such as alias, moiré, lines or