Vector graphics are very common in the field of graphic design, and their characteristics allow them to be fully utilized in scenarios that require flexibility and clarity. In order to meet the need for vectorization of such grayscale graphs, this paper proposes a method based on contour tracing algorithm and describes it. Firstly, the pixels in different intervals of the image are binarized, then the edge contours are traversed to get multiple closed polygons, the corners that meet specific requirements are smoothed, and then the images in each interval are accumulated and merged to get the final vectorized graph. Finally, the object-oriented operation software is designed under the MFC framework by using VS, and at the same time, the improved method is used to vectorize the image with more details and textures to get the vector graph and compare it with the original graph, and the accuracy of the vectorized graph and the original graph is obtained by calculating the RMSE as a measurement index, which verifies the accuracy of the scheme. The article concludes with an analysis of the SVG file format, and the output of the vectorization results of this paper is saved to a file in SVG format.
|