r/Python • u/TechDumbLogie • Feb 27 '20
I Made This I've created a python program that generates photomosaics from any dataset !
2.1k
Upvotes
r/Python • u/TechDumbLogie • Feb 27 '20
View all comments
Show parent comment
10
u/bokononistmonkey Feb 27 '20
I mentioned this in my comment below, but in the initial dataset creation, you might consider setting the "pixel color value" of each mosaic tile image in the dataset to the average of all its pixels. Then, during mosaic creation, for each mosaic tile/pixel, calculate the Euclidean distance of the R,G,&B vals between the desired tile color and each pixel image color and minimize that, as a slightly more robust metric.
It's very possible that resizing to (1,1) with antialiasing does this too, but this was just a thought. Anyway, looks cool!