This paper proposes a computational modeling for image filtering processes based on the Cartesian Genetic Programming (CGP) methodology, suitable for hardware devices. A computational system named ALIF-CGP (Automatic Learning of Image Filters Using Cartesian Genetic Programming) was designed as a simulator for automatically constructing a sequence of operators, mainly morphological and logical, which can filter a particular shape of image. ALIF-CGP is a convenient option for executing the non-trivial task, usually manually done by human experts, of selecting the sequence of nonlinear operators to be used in morphological filters. ALIF-CGP has already a built-in pool of morphological and logical operators, which can be used by default. The user, however, has the flexibility of choosing only those operators which are of interest or then, conveniently introduce new ones. The system expects as input a pair of images (input-target). The flexibility given by the CGP-based computational modeling used by ALIF-CGP as well as its efficiency and satisfactory results, obtained in various image processing case studies, recommend its use when developing a hardware implementation for the purposes of image filtering. A few case studies using ALIF-CGP are presented and comparatively analyzed in relation to previous results available in the literature.The manual process employed by humans, when dealing with digital image processing, is usually very slow due to the trial and error approach commonly used. The ad-hoc nature of the problem invariably turns the search for the best sequence of image operators into a complex task and its solution unsuitable for reuse.Many available research works published over the past years have focused their efforts trying to reduce the complexity involved in designing new image operators that would be able to perform various computational tasks [8,9,49,50,65]. Particularly, computational tools based on the mathematical morphology formalism are considered the most effective approach when applied in practical and theoretical problems from areas such as image analysis and image processing. Developments in these areas have great importance and impact in subjacent areas such as robotic vision, visual inspection, medicine, analysis of textures, among many others.