Utilizing tkinter, rectangles are recursively drawn to mimic the style of Mondrian's abstract art.
Images are saved using Ghostscript to the /img folder.
After a new image is generated and saved, the structural similarity of this image compared to a pool of "base" Mondrian images is calculated in color and in grayscale. The average ssim value for color and gray is displayed at the top of the window.
Python 3.6 is required.
To install Ghoscript (Linux):
sudo apt-get install ghostscript
Mac:
brew install ghostscript
Install the image processing requirements:
pip install -r requirements.txt
Finally, to run the abstract goodness:
python mondrian.py
3/6/18 -- added thresholds to ensure no squares overlap
3/7/18 -- added simulation to generate most Mondrian-like image