1. A method for operating a computer system for extracting line segments from a digital image, comprising: receiving a digital image comprising a plurality of edge pixels; processing the plurality of edge pixels using a breadth first search to determine a plurality of breadth first search pixels in a breadth first search order for a connected component, wherein the connected component comprises a plurality of components; processing the plurality of breadth first search pixels in an order related to the breadth first search order to determine a plurality of component pixels for at least one component of the plurality of components, wherein each of the plurality of components comprises a line segment; and processing the plurality of component pixels to determine a plurality of line segment pixels for the line segment.