Journal of Al-Nahrain University Vol.10(2), December, 2007, pp.168-171 Science 8 A GENETIC ALGORITHM FOR LEARNING IMAGE BLUR AND SHARPEN FILTERS Dr. Sarab M. Hameed University of Baghdad\ College of Science Computer Science Department Sarab_majeed@yahoo.com Abstract This paper presents an approach for learning traditional image filters (blurring and sharpening). The concept of learning is based on the mechanism of Genetic algorithm (GA). By GA, filters applied on one source image can be learned and then used to process automatically another target image. By this way, blurring and sharpening can be implicitly deduced and applied without requiring to mathematically defining (i.e. explicitly) them. The proposed approach is simple and can provide good results; however, applying the filter directly is much more efficient. Keywords: Genetic algorithm, blur, sharpen, image analogy. Introduction There are, commonly, three models for computer learning [1]. One approach models learning as acquisition of explicitly represented domain knowledge. Based on its experience the learner constructs or modifies expression in a formal language, such as logic, and retains this knowledge for future use. The second approach is neural or connectionist networks which represent knowledge as patterns of activity in network of small, individual processing units. Inspired by the architecture of animals brains, connectionist network learn by modifying their structure and weights in response to training data. The third approach is genetic learning approach which inspired by genetic and evolutionary analog. This approach to learning through adaptation is reflected in genetic algorithms, genetic programming, and artificial life research. Genetic algorithms begin with population of candidate problem solution. Candidate solutions are evaluated according to their ability to solve problem instances. Only the fittest survive are combined with each other to produce next generation of possible solution. In the few years ago, researches are interested in transferring properties from one image to another. One such algorithm is of Hertzmann et al. called image analogies [2]. Image analogies are a new framework that uses machine learning and various methods in order to learn and apply filters to an image. In practice image analogies includes two stages: a design phase and application phase in order to produce the desired output. In design phase a pair of images A, and A', is used as training data where A is the original and the other is a filtered version of that one; and an application phase, in which the learned filter is applied to some new target image B in order to produce an analogous filtered result B'. Image analogies algorithm provide a very natural means of specifying image transformations. In a boarder context, image analogies are based on various algorithms from different areas. It combines techniques from machine learning, rendering and texture synthesis of Ashikhmin [3] and Wei and Levoy’s work [4]. Ashikhmin presents a simple pixel-based texture synthesis and transfer algorithm that is well-suited for a specific class of naturally occurring textures. The algorithm starts from a sample image and generates a new image of arbitrary size the appearance of which is similar to that of the original image. Similar research as image analogies has been done by Freeman et al. [5] where they use Markov Random Fields (MRFs) for scene learning. This paper presents a Genetic Algorithm (GA) to blur or sharpen an image. Rather than using an explicit filter, the mechanism of GA is used as learning strategy to learn a filter implicitly from one source image and then apply the learned filter to a new target image. The paper is organized as follows. Section 2 describes how we use GA to learn blur and sharpen filters and how to process an image to