Refresh to see a new image.
Image processing with canvas. First, the RGB grid is read using getImageData
then that grid is compacted so every 9x9 pixel region becomes a pixel with a value equal to the “Most dominant color” in that region. Color is defined as a hue region (with high or low luminosity defined as white and black). The resulting compacted grid is then fed into d3.geom.concaveHull to draw a concave hull around the regions of similar color, which is then filled with the hue and the average saturation and luminosity of that hue across the entire image.