Design of an algorithm for analyzing and sorting graphics. Demonstration by creating a mosaic graphic.
The script anlyses the emoji to be displayed and rasterizes it by color values. On this matrix an emoji from the sorted library is placed, which corresponds to the closest matching average color value. Search, selection and placement is done by the automation library PyAutoGUI. Sample database: OpenMoji (72 x 72 px, Color)
- Make sure to have installed PyAutoGUI and Python3.
- Unzip the images folder or use your own set of images.
- Run the openmoji-mosaic.py in the same folders as the images or adjust the file directory specification in the script
- Use the bottom part of the code to clean and sort a custom set of images to use them as mosaic bits.
- Change the "goal.png" to get a different mosaic as result.
Learn more on my website: moritzkuhn.com
OpenMoji is published under the Creative Commons Share Alike License 4.0: CC BY-SA 4.0
Last tested 2020.