In this paper, programming methods of constructing filters for choosing target images from pathology images are discussed. Automatic construction of these filters would be very useful in the medical field. Image processing filters can be expressed as tree topology operations. Genetic Programming (GP) is an evolutionary computation algorithm that can design tree topology operations. Simulated Annealing Programming (SAP) is also an emergent algorithm that can create tree topology operations. These two algorithms, GP and SAP, were applied to construct Image Processing Filters and the characteristics of these two algorithms were compared. The results indicated that GP has strong search capability for finding the global optimum solution. However, in the latter part of the search, the diversity of solutions is lost and the program size becomes large. This can be avoided by removing introns. It is assumed that filters developed by GP have strong robustness for other images. On the other hand, SAP requires many iterations to find the optimum but the program size is small. Filters developed by SAP are relatively weak from the viewpoint of robustness for other images.