Working with Color

The color map of technical images can be complex, or fairly mundane and easily extracted. The first case is all the more common (unfortunately!) since subtle and nuanced changes in pixel values give rise to far more pleasing images. The challenge then is to group pixel values into dominant colors and extract sub-images according to clusters. As before, t-sne proves useful when trying to visualize the similarity of pixel regions eg., below 5 distinct groups can be identified from a particular plot. Clustering colors into groups is not only important for PDF documents, but particularly in scraping data from images attached to web pages eg., produced using d3.js.