1. A method, using a computer, for generating vector and digital representations of lines present in an input pixelated image, from a dataset corresponding to the input pixelated image, the method comprising: receiving the dataset corresponding to the input pixelated image in a computer-readable form; extracting a centerline of the dataset, wherein extracting the centerline includes: identifying a plurality of pixels in the dataset; estimating a direction from at least some of the plurality of pixels to an estimated centerline; and advancing the at least some of the plurality of pixels towards the estimated centerline; determining a topology of the lines in the input pixelated image, thereby forming topology data, the topology data comprising end points and junctions connected by a minimum spanning tree; using the topology data to identify locations of endpoints and junctions of at least some of the lines; determining stroke intersections, representing stroke intersection points or regions, wherein determining stroke intersections is done dependent on the identified locations of endpoints and junctions; and generating a vector representation of the input pixelated image, representing lines, line segments or curve portions that correspond to centerlines or reference lines for each of a plurality of strokes corresponding to lines formed by pixel color values of the input pixelated image.