15
Evolutionary Image Reconstruction with Genetic Algorithms
In this chapter, we are going to experiment with one of the most popular ways genetic algorithms have been applied to image processing – the reconstruction of an image with a set of semi-transparent polygons. Along the way, we will gain useful experience in image processing, coupled with a visual insight into the evolutionary process.
We will start with an overview of image processing in Python and get acquainted with two useful libraries – Pillow and OpenCV-Python. Then, we will find out how an image can be drawn from scratch using polygons and how the difference between two images can be calculated. Next, we will develop a genetic algorithm-based program to reconstruct a segment ...
Get Hands-On Genetic Algorithms with Python - Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.