Optimization can also create art! This repository is a Python implementation of the Domino Artwork, originally published by Robert Bosch.
Given a defined number of complete Domino sets, it creates an approximation of the given image by minimizing the difference between the average brightness in each field and the number of dots on the domino which covers it. The model ensures further that
- All domino tiles are used
- Each field is covered
With 24 Domino sets you can already achieve the following (and puzzle it at home):
This implementation requires Python 3.7+, a library for loading images (cv2 is used here),
and a library to build and solve linear optimization problems (pulp is used here).
pip install opencv-python
pip install pulp- Place your image in
images/input - Adapt the parameters
DOMINO_SETS_USEDandIMAGE_FILEinsrc/main.py - Run
src/main.pyand find the result inimages/output

