Font Size: a A A

Design And Implementation Of Bitmap Font Vectorization System Based On Deep Learning

Posted on:2021-01-21Degree:MasterType:Thesis
Country:ChinaCandidate:B D HeFull Text:PDF
GTID:2428330602983859Subject:Software engineering
Abstract/Summary:PDF Full Text Request
Creating a new set of vector fonts requires a lot of manpower,and the workload is huge and cumbersome.If the scanned copybook image can be automatically converted into a vector font,it can shorten the time of font creation,improve efficiency and reduce costs.This paper designs and implements a set of font vectorization system based on deep learning.The system can convert all fonts in copybook pictures into vector fonts in a short time,which greatly reduces the labor cost required for font input and improves work efficiency.In this system,two anchor detection schemes based on polygon and deep learning are implemented,and the two schemes are compared and supplemented with each other.In addition,two simple and effective methods for finding the control points of Bezier curves are designed,and the bezier curves are used to fit the contour curves,thereby realizing the vectorization of bitmap fonts.The paper describes in detail the process of requirement analysis,design and implementation of the font vectorization system.First,the background of the project was discussed,a needs analysis was carried out,the goals of the system and the key problems to be solved were determined,and the overall design of the system was given.The system design and implementation is divided into three stages,namely image preprocessing,anchor point detection,and contour vectorization.First,pre-process the image,including image denoising,tilt correction,character image segmentation and character contour extraction.In the process of image denoising,Gaussian filtering,bilateral filtering,median filtering,connected component method and other technologies are used.In the image skew correction,three methods were tried—Hough line transformation correction,principal component analysis correction,contour polygon approximation correction.Experiments show that these three methods are respectively for English symbol class,Chinese square class,and auxiliary class with border 'S copybook picture works better.According to the number of rows and columns of the image,determine the word spacing,segment the character image,then extract the contour of the character,remove the noise that does not belong to the contour of the character,and obtain the complete contour of the character.The outline of the font needs to be converted into a vector form,and the system uses Bezier curves to represent the outline curve of the character.The system implements two anchor detection schemes based on polygons and deep learning,which are compared and complemented with each other.The polygon-based anchor point detection scheme uses the classic potrace algorithm to approximate the closed path to obtain multiple candidate polygons,and then select an optimal polygon based on the number of polygon vertices and constraints.The polygon vertices are used as the anchor point positions.In the deep learning-based anchor detection scheme,the system refers to the SuperPoint neural network to construct a deep learning model,detect the anchor position of the font outline,and use the character bitmap extracted from the TrueTypeFont font library and the corresponding anchor information as training and testing data.Experiments show that the anchor points detected by the polygon-based anchor point detection scheme have a lot of redundancy,while the anchor points detected by the deep learning-based anchor point detection scheme are closer to the anchor points in the font.Finally,the font outline is divided into several segments according to the anchor point found,and each segment is smoothly fitted with a Bezier curve.The system has designed two simple and effective ways to find the control points of Bezier curve,fitting the contour curve with Bezier curve,and realizing the vectorization of bitmap font.By optimizing the vector diagram of the entire character,the data of the font vector diagram is more concise and effective.The experiment and test results show that the vectorized font given by the system is basically the same as the manually designed font,which improves the work efficiency.
Keywords/Search Tags:Vector font, Bessel curve, Potrace algorithm, Image processing, Convolutional vision network
PDF Full Text Request
Related items