How a picture becomes a knitting chart
Chart Minder's image importer, derived stage by stage: grid detection as projection profiles of edge energy with a median gap estimator, three sampling estimators for a cell's color, and Hartigan's leader algorithm doing the clustering a k-means would be wrong for. With the arithmetic written out, a worked example, and references to where each method comes from.