"Can you identify this coastline? Given time, yes."
– Photo caption, Dante Stella (http://www.dantestella.com/technical/hex352.html)
– Photo caption, Dante Stella (http://www.dantestella.com/technical/hex352.html)
A small selection of reference images is included in this book's GitHub repository in a folder called Chapter002/images. Feel free to experiment with the classifier by adding more reference images, since a larger set may yield more reliable results. Bear in mind that our classifier relies on average similarity, so the more times you include a given color scheme in the reference images, the more heavily you are weighting the classifier in favor of that color scheme.
At the end of HistogramClassifier.py, let's add a main method to train and serialize a classifier using our reference images. We will also run the classifier on a couple of the...