摘要 |
A method of converting a raster scan image to a vector-based image including (a) reading a scanline of a raster scan image containing n pixels per scanline; (b) classifying n+1 groupings of four adjacent pixels within the scanline using only the four adjacent pixel values; (c) assigning to each grouping (x,y), for all groupings in the scanline, plural vectors based on (1) the classification of the grouping (x,y) and (2) vectors assigned to a grouping (x−1,y) and vectors assigned to a grouping (x, y−1); (d) adding a point (x,y) to at least one vector assigned to the grouping (x,y) when the classification of grouping (x,y) indicates that the point (x,y) corresponds to a corner; (e) determining whether the points added to any vector form a closed loop; (f) writing out the points added to any vector that form a closed loop; and (g) repeating steps (a)-(f) for all of the scanlines of the raster scan image. |