Genetic algorithm - Image approximation

preview_player
Показать описание
• Python
• OpenCV
• Edge detection
• Generating an image using simple genetic algorithm.
• Approximation of an image using line segments.
• This video shows the algorithm slowly approaching the original image.
• App - Coming soon

Genetic algorithm

• Goal was to create animation
- each frame of animation is the best individual for every 1000 generations
- after set amount of generations for every image, target image was changed

• Target
- through edge detection tool

• Individual
- height and width of an image
- line segments

• Objective function
- sum(distances between corresponding target and individual genes)

• Selection
- selects best individual

• Mutation
- randomly change gene
- adaptive mutation

Рекомендации по теме
Комментарии
Автор

Very cool simulation. i did not know genetic algorithm could do this. What is the objective function of the GA in this problem? image size?

SolvingOptimizationProblems