Takes an image, simplifies the colours, generates a list of DMC embroidery threads that could be used to make the image as an embroidered piece of fabric
The image is loaded into the script as an array of pixel values (R,G,B)
RGB is then converted into LAB colourspace. This is so that colours found during the next step are more perceptually similar to one another than would be the case if using RGB.
K-means Clustering is then used to simplify the image into just 16 unique colours.
Load the DMC thread data from the csv file into a list of custom classes.
Iterate through the colours in the image to find the closest thread using the euclidean distance of the colour values.
Currently done through RGB, will be changed to LAB for reasons stated above.
$> python3 generate_pattern.py [-c number_of_colours] [-f filename]
default number of colours : 16
filename : "yosemite-valley.jpg"