Summary
Paint by Number is a popular business where customers can purchase kits that include a set of paint and a canvas with many labelled shapes. All they then have to do is the colour in each shape with the corresponding paint. The end result can appear to be quite organic to non-artistic eyes like mine.
They also offer a service where you can send in your own photos and they will produce a custom kit for you. This inspired me to create something similar, that given an image, I can produce a reduced version of it that should be manageable to paint, i.e. consists of a limited number of colours.
In essence, the algorithm categorises pixels into groups and reprints the image using each group's mean RGB value. As this process is repeated, each group approaches their true value and the end result can reflect the original image more accurately.
A more comprehensive breakdown is included in the Demo link, which points to a Jupyter notebook.
References and credits
Photo by Dids from Pexels