Skip to content

ArnoldF/DominoArtSolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Domino Art with Linear Optimization

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):

Original Einstein Domino Einstein


Getting Started

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_USED and IMAGE_FILE in src/main.py
  • Run src/main.py and find the result in images/output

References

Original Describtion

Hosted Solver at Neos

About

Transform images into domino mosaics with linear optimization

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages