CN110246104A - A kind of Chinese character image processing method - Google Patents

A kind of Chinese character image processing method Download PDF

Info

Publication number
CN110246104A
CN110246104A CN201910512174.9A CN201910512174A CN110246104A CN 110246104 A CN110246104 A CN 110246104A CN 201910512174 A CN201910512174 A CN 201910512174A CN 110246104 A CN110246104 A CN 110246104A
Authority
CN
China
Prior art keywords
image
path
point
polygon
binaryzation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910512174.9A
Other languages
Chinese (zh)
Other versions
CN110246104B (en
Inventor
王存睿
刘宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dalian Ruiyun Ziku Technology Co ltd
Original Assignee
Dalian Nationalities University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dalian Nationalities University filed Critical Dalian Nationalities University
Priority to CN201910512174.9A priority Critical patent/CN110246104B/en
Publication of CN110246104A publication Critical patent/CN110246104A/en
Application granted granted Critical
Publication of CN110246104B publication Critical patent/CN110246104B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/40Image enhancement or restoration using histogram techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20084Artificial neural networks [ANN]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a kind of Chinese character image processing method, includes the steps that the Chinese character image denoising to input includes the following: step 1: template center being allowed successively to be overlapped with each pixel of input picture;Step 2: the respective pixel of the input picture that coefficients are overlapped with template is multiplied, then by product addition;Step 3: assigning output image result;By the picture breakdown after binaryzation be path the step of include the following: step 1: binary map constitutes the boundary between black and white region;Step 2: each path is all approximately an optimal polygon;Step 3: each polygon is converted to smooth profile;Step 4: result curve is optimized by linking continuous Bezier segment.The application sufficiently combines the advantage of modern information technologies, can carry out reduction reproduction to font with machine means, so that character cultural bursts out new vitality in the impact of modern society's culture, be conducive to the succession of traditional culture and develop.

Description

A kind of Chinese character image processing method
Technical field
The present invention relates to a kind of Chinese character image processing methods.
Background technique
A kind of mode that Chinese character is expressed as image conversion, the structure of itself are relationship and the utilization by sublayer and system Multiple fonts component and stroke are that unit is successively combined by nested with modes such as merging, pass through point, line, face and block The stroke member of composition, as the basic element of Chinese character, itself the characteristics of a crucial factor is taken to the description of Chinese character, and It is carefully and neatly done well-balanced no matter stroke distribution shows that entire Chinese character area in word frame, and passes through layer-by-layer design and pen Combination cutting is drawn, a kind of design of new font is finally completed.
In Chinese character style design, analysis design requirement is first had to, hiding emotional appeals are found, it is such as thick mad, soft and graceful, empty Spirit, fashion etc. find corresponding graphic feature, do basic stroke.At least prepare the basic strokes such as horizontal, vertical, hook, cross break, point, body The feature of existing word, then then the designing fonts basic framework on manuscript paper, the whole style of designing fonts will design whole wind The font of lattice is fixed to rough draft, then designed rough draft is carried out the processing that colors in, and finally coloring in that treated, font is clapped According to incoming computer equipment carries out vectorized process to font image on computers.The advantage of vector fonts is to replace There is the problems such as fuzzy amplification and edge sawtooth for dot-matrix, but as the expansion problem of use scope is gradually exposed, The information content as included by stroke in Chinese character style is larger, and there is no the succinct of dot matrix word description for the design of vector fonts, especially It is that complicated stroke amplification rear profile crenellated phenomena still occurs.
Summary of the invention
It is a primary object of the present invention to propose a kind of Chinese character image processing method, existing font image vector quantization effect is solved Fruit is poor, the low problem of the degree of automation.
To achieve the above object, the technical solution of the application are as follows: a kind of Chinese character image processing method includes the following steps: The step of to the Chinese character image denoising of input, the step of binaryzation is carried out to the image after denoising and by the figure after binaryzation As the step of being decomposed into path;
Described pair input Chinese character image denoising the step of include the following:
Step 1: template moves over an input image, and template center is allowed successively to be overlapped with each pixel of input picture;
Step 2: the respective pixel of the input picture that coefficients are overlapped with template is multiplied, then by product addition;
Step 3: assigning output image, location of pixels and the position consistency of template center over an input image result;
Described pair denoising after image carry out binaryzation the step of include the following:
Step 1: calculating image histogram;
Step 2: histogram data being smoothed according to certain radius, and data are most after calculating smoothing processing Big value;
Step 3: according to the distance of above-mentioned peak value and minimum value selected threshold according to a certain percentage;
Step 4;Pixel value is set to 1 greater than selected threshold, pixel value is set to 0 less than selected threshold, thus complete At the binaryzation of image;
The picture breakdown by after binaryzation be path the step of include the following:
Step 1: binary map constitutes the boundary between black and white region, and binary map is decomposed into path;
Step 2: each path is all approximately an optimal polygon;
Step 3: each polygon is converted to smooth profile;
Step 4: result curve is optimized by linking continuous Bezier segment.
Further, to the Chinese character image denoising of input, the specific implementation steps are as follows:
S101 starts to carry out image processing flow;
S102, input is in the image that colors in that treated;
S103 generates convolution mask;
The convolution mask of generation is placed the initial position of image by S104;
S105 calculates template and image respective pixel;
S106, by calculated result K, output to new image;
S107 makes convolution mask move right on the image a pixel;
S108, judges whether image reaches rightmost circle, if convolution mask does not reach rightmost circle, repeats Step S105 carries out step S109 if convolution mask reaches rightmost circle;
S109 judges whether that the last line for reaching image terminates if reaching the last line of image;If figure As not reaching last line, then step S110 is carried out;
Convolution mask is moved to the image leftmost side, and moves down a line by S110, continues S105 step.
Further, to the image progress binaryzation after denoising, the specific implementation steps are as follows:
S201 starts to carry out image binaryzation processing;
S202, the image after inputting denoising;
S203, the histogram of calculating input image;
S204 carries out maximum value that is smooth, and calculating smooth rear data according to certain radius to histogram data;
S205, according to the distance of above-mentioned peak value and minimum value selected threshold according to a certain percentage;
S206, judges whether pixel value is greater than selected threshold;
S207, if current pixel value is less than the threshold value chosen and is set to 0;
S208, if the pixel that pixel value is greater than selected threshold is currently set to 1;
S209 completes the binaryzation of image.
Further, it is that the specific implementation steps are as follows in path by the picture breakdown after binaryzation:
S301 starts progress image and switchs to path processing;
S302, the image after inputting binaryzation;
S303 carries out path decomposing;
S304 removes the isolated point in image;
S305 considers a closed path p={ V now0..., Vn, it is assumed that Vn=V0, so the length in path is n; Any pair of index i, j ∈ { 0 ..., n-1 } define a sub- path PI, j, wherein path is Vi..., Vj, it is if i≤j Vi..., Vn-1It is V if j < i0..., Vj;It is denoted asTo the annular difference between j and i, if i≤jIf j < iTherefore, subpath PI, jLength be accuratelyIt is assumed that addition and Subtraction is all to modulo n;
S306, will find an optimal polygon problem be converted into found in a digraph one it is optimal annular ask Topic;One optimal annular is found in time A (nm), and wherein n is the size for inputting path, and m is longest possible segment length Degree;
S307, one polygon { i when output0..., im-1One closed path { V of association0..., Vn, refer to rope Draw i0..., im-1And their associated point Vi as polygon vertex0..., Vim-1;Because polygon be annular, So index modulus;In order to calculate punishment, the vertex i of polygon is accurately placed in the point V of respective pathi, that is, sitting There is the point of integer coordinate in mark system;It is associated with each vertex ik, a point akIn coordinate system;
Carry out set-point a using following algorithmsk: to each continuous vertex ikAnd ik+1, calculate optimal approximation point Vik..., Vik+1Straight line Lk, Lk+1;If Lk-1, LkAnd Lk+1It is continuous vertex, then most wanting akIt is placed on Lk-1, LkAnd Lk+1's Infall;Allow akAs the maximum distance in unit squarePoint, in this way from akTo Lk-1, LkAnd Lk+1's The quadratic sum of Euclidean distance is minimum;Especially if Lk-1, LkAnd Lk+1Intersection point in this unit square;Otherwise, It places it in from VikClose point, that is, ion-exchange crunode is close;
S308, input are S306 polygons adjusted, it is assumed that the vertex of this polygon is a0..., ak-1, enable b0..., bk-1For the midpoint of polygon edge, i.e. b0=(ai+ai+1)/2;For each i, corner b is considered nowi-1, ai, bi, and Decided whether by a smooth curve it is approximate it;Firstly, in point aiOne unit of upper picture is rectangular, then, finds and is parallel to bi-1biLine Li, and in aiAround touch rectangular, and it is close to straight line bi-1bi, enabling c is L and bi-1biFriendship Point, and enabling g is bi-1The length and b of ci-1aiQuotient, and with Bezier link bi-1And biWith;This curve tangent line is in bi- 1ai, Li, aibiThis 3 lines.
S309 needs to find a single Bezier and carrys out approximate one group of given shorter Bezier;It is assumed that Here there is such curve C, C is by tangent line in b0a1And anbn, find b0a1And anbnIntersection point o.
S310, one group of curve of generation, each is made of Bezier and linear segments;The end point of these segments With the arbitrary point that control point is in coordinate plane;
S311, image, which switchs to path processing, to be completed.
The present invention due to using the technology described above, can obtain following technical effect: this method first to image into Image generated noise when shooting transmission is eliminated in row denoising, and to treated, image carries out binary conversion treatment, two-value Changing treated, image can eliminate most of garbage in image, retains main information, by the figure after binary conversion treatment As being decomposed into path.The application sufficiently combines the advantage of modern information technologies, can be restored again with machine means to font It is existing so that character cultural bursts out new vitality in the impact of modern society's culture, be conducive to the succession of traditional culture with It develops, is conducive to promote state utility function soft power.
Detailed description of the invention
Fig. 1 is the flow chart of Chinese character image denoising;
Fig. 2 is that convolution mask and image respective pixel calculate schematic diagram;
Fig. 3 is image binaryzation flow chart;
Fig. 4 is bianry image path decomposing flow chart;
Fig. 5 is path decomposing schematic diagram;
Fig. 6 is Bezier schematic diagram;
Fig. 7 is curvilinear corner detection schematic diagram;
Fig. 8 is optimization of profile schematic diagram.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, carries out to the technical solution in present invention implementation clear, complete Description, it is to be understood that described example is only a part of example of the invention, instead of all the embodiments. Based on the embodiment of the present invention, those skilled in the art without making creative work it is obtained it is all its His embodiment, belongs to protection scope of the present invention.
In Chinese character style design, it is necessary first to the font for designing whole style are fixed to rough draft, then will be designed Rough draft carry out the processing that colors in, finally coloring in that treated, font is taken pictures, and is passed to computer equipment.To the processing that colors in When image afterwards is taken pictures, influenced by factors such as environment, light, image during generation and transmission usually because by The interference of various noises and the quality for influencing to reduce image, in order to inhibit noise, improving image quality, convenient for higher level place Reason, it is necessary to which noise suppression preprocessing is carried out to image.That a part of image is clearly understood that when image is switched to path is Black is pure white, so that text word image is switched to path.Due to not being available gray level image, it is therefore necessary to be converted to them Black white image.The image of binaryzation will be broken down into path, and the path after decomposition only includes the coordinate letter of each point in the path Breath.Include wherein excessive redundancy, need to be converted to specific format, straight line, the Bezier in path are converted For specified representation, and then complete the vector representation of Chinese character style.
Referring to Fig.1, Fig. 1 is the flow chart of Chinese character image denoising
When taking pictures to the image that colors in that treated, influenced by factors such as environment, light, image generating and Usually because of the quality of interference and influence reduction image by various noises in transmission process.Picture noise makes image fuzzy, Characteristics of image even is flooded, brings difficulty to analysis.Therefore, in order to inhibit noise, improving image quality, convenient for higher level Processing, it is necessary to which noise suppression preprocessing is carried out to image.The specific implementation steps are as follows:
S101 starts to carry out image processing flow;
S102, input is in the image that colors in that treated;
S103, generates convolution mask, and the functions such as image smoothing, image sharpening, edge detection may be implemented in mask convolution.Mould Plate can be a small image, be also possible to a filter;
The convolution mask of generation is placed the initial position of image, i.e. (0,0) position of image by S104;
S105 calculates template and image respective pixel, and calculation is as shown in Figure 3, it is assumed that 3*3 picture before image Element value is (A, B, C, D, E, F, G, H, I), and the pixel value of convolution mask is (a, b, c, d, e, f, g, h, i), if output valve is K, Then calculation is K=A*a+B*b+C*c+D*d+E*e+F*f+G*g+H*h+I*i;
S106, by calculated result K, output to new image;
S107 makes convolution mask move right on the image a pixel;
S108, judges whether image reaches rightmost circle, if convolution mask does not reach rightmost circle, repeats S105 step carries out step S109 if convolution mask reaches rightmost circle;
S109 judges whether that the last line for reaching image terminates if reaching the last line of image;If figure As not reaching last line, then step S110 is carried out;
Convolution mask is moved to the image leftmost side, and moves down a line by S110, continues S105 step.
Referring to Fig. 4, the flow chart of image binaryzation processing, binary map can be presented in the form of vector.Two-value Figure is by image as be not one by one black being exactly white pixel grid.One image is then passed through its wheel of algebraic specification by polar plot Exterior feature is presented, and uses Global thresholding for image binaryzation, sets black for the pixel for being lower than some threshold value in image, and Others are set as white.Select the median of all possible values, therefore for the image of 8 locating depths (range is from 0 to 255), 128 will be selected, and its step are as follows:
S201 starts to carry out image binaryzation processing;
S202, the image after inputting denoising;
S203, the histogram of calculating input image;
S204 carries out maximum value that is smooth, and calculating smooth rear data according to certain radius to histogram data.It is flat
Sliding purpose reduces influence of the noise to maximum value;
S205, according to the distance of above-mentioned peak value and minimum value selected threshold according to a certain percentage;
S206, judges whether pixel value is greater than selected threshold;
S207, if current pixel value is less than the threshold value chosen and is set to 0;
S208, if the pixel that pixel value is greater than selected threshold is currently set to 1;
S209, and complete the binaryzation of image.
Exhibition Fig. 4, binary map can be presented in the form of vector.Binary map is to regard image one by one not to be Black is exactly white pixel grid.Polar plot is then presented an image by its profile of algebraic specification, such as Bezier. It with the benefit that approach vector is presented is that he can be scaled to arbitrary size without the reduction in quality by an image. Image outline is all independent for any special output equipment.It is path shown in specific step is as follows by picture breakdown:
S301 starts progress image and switchs to path processing;
S302, the image after inputting binaryzation;
S303 carries out path decomposing, it is assumed that the corner that bitmap is placed in an each pixel of coordinate system has integer coordinate. It is assumed that background is white, prospect is black.Region beyond bitmap boundary is assumed white filling.Construction one is oriented now Figure is as shown in Figure 5.If 4 pixels are not same color, this point is referred to as vertex.If v and w are vertex, if v Say there is a side from v to w here with the Euclidean distance of w for 1, and if it is one that this linear segments, which divides v and w, Black pixel and a white pixel make black pixel in its left side white pixel on its right when shifting to w from v.It allows this result Digraph claims.One path is a series of vertex { V0,…,Vn, to all i=0 ..., n-1 has a line from ViTo Vi+1, These sides are all very clear.If a paths, which are referred to as, closes Vn=V0.The length in path is the number, that is, path decomposing on side Target is will to scheme G to be decomposed into closed path.The set for finding a closed path occurs each edge of G all only once.Often It is secondary to find a Closed Graph, it is removed from figure by inverting the color of its all pixels.That define a new bitmap, This figure continues this algorithm of Recursion Application until not having black picture element remaining.There is the adjacent pixel of different colours to open from a pair Begin.It can be thus completed, for example pass through the selection leftmost black pixel of certain a line.Two selected pixels phases in a line Meet, change this edge direction come make black picture element side left side white pixel on the right.While being defined as the road that length is 1 Diameter.Continue to expand this paths make new side have a black picture element it one, left side white pixel on the right, relatively In the direction in path.In other words, it is moved between pixel along side, when encountering a corner every time, directly to walk or turn left to turn The right side is determined according to the color around pixel.It continues until back to that point started, i.e., that defines an envelope Close the point of figure.
S304 removes the isolated point in image, goes isolated point can be by removing all inside track pixels less than t picture The path of element.T is a threshold value of setting.
S305 considers a closed path p={ V now0..., Vn, it is assumed that Vn=V0, so the length in path is n; Any pair of index i, j ∈ { 0 ..., n-1 } define a sub- path PI, j, wherein path is Vi..., Vj, it is if i≤j Vi..., Vn-1It is V if j < i0..., Vj;It is denoted asTo the annular difference between j and i, if i≤jIf j < iTherefore, subpath PI, jLength be accuratelyIt is assumed that addition and Subtraction is all to modulo n;
Want to construct a shape changeable from closed path p now.Say here there is a possible segment from i to j such as FruitAnd subpath PI-1, j+1Be as front definition be straight.In other words, a subpath is corresponding If it can all expand 1 pixel on the direction on both sides and keep directly in a possible segment.
S306 finds an optimal annular in this way, finding an optimal polygon and being reduced in a digraph.It uses The variable of the graph-theoretical algorithm of one standard efficiently to solve this problem come the optimal annular found in digraph.Once figure is counted It lets it pass, an optimal annular can be found within the time 0 (nm), and wherein n is the size for inputting path, and m is longest possible Fragment length.Notice it is that the algorithm that this optimization allows is non local, because entire path once must be taken into consideration;Optimize polygon Every part is likely to be dependent on other parts.The stage in a bitmap path is calculated in front, and next polygon is switched to swear Measure profile stage, be all it is local, i.e., they just look at seldom adjacent point every time.
S307, one polygon { i when output of algorithm previous stage0..., im-1One closed path of association {V0..., Vn}.Refer to index i0..., im-1And their associated point Vi as polygon vertex0..., Vim-1。 Because polygon be annular, by convention index modulus.In order to calculate punishment, accurately by the vertex i of polygon It is placed in the point V of respective pathi, i.e., have the point of integer coordinate in coordinate system.It is seated the crosspoint of 4 pixels of source bitmap. It is arranged so that vertex allows efficiently to calculate punishment, this is not necessary in optimization range.It is associated with each vertex i nowk One point akIn coordinate system, do not need be integer, such akFrom VikIt is close, and polygon any two are continuously pushed up Point ikAnd ik+1, as a result line segment akak+1It is rationally close to source subpath Vik..., Vik+1
Carry out set-point a using following algorithmsk: to each continuous vertex ikAnd ik+1, calculate optimal approximation point Vik..., Vik+1Straight line Lk, Lk+1, it minimizes their Euclidean distances from straight line for this.If Lk-1, LkAnd Lk+1It is Continuous vertex, then most wanting akIt is placed on Lk-1, LkAnd Lk+1Infall.However, being not intended to allow akToo far from former top Point Vik.Therefore, a is allowedkAs the maximum distance in unit squarePoint, in this way from akTo Lk-1, LkAnd Lk+1 Euclidean distance quadratic sum be minimum.Especially if Lk-1, LkAnd Lk+1Intersection point in this unit square;It is no Then, it places it in from VikClose point, that is, ion-exchange crunode " close ".
S308, the input of the final stage of algorithm are S306 polygons adjusted.It is assumed that the vertex of this polygon is a0..., ak-1.Enable b0..., bk-1For the midpoint of polygon edge, i.e. b0=(ai+ai+1)/2.For each i, consider to turn now Angle bi-1, ai, bi, and decided whether by a smooth curve it is approximate it, as shown in Figure 7.Firstly, in point aiOne list of upper picture Position is rectangular.Then, it finds and is parallel to bi-1biLine Li, and in aiAround touch rectangular, and it is close to straight line bi-1bi.Enabling c is L and bi-1biIntersection point, and enable g be bi-1The length and b of ci-1aiQuotient.And b is linked with Bezieri-1With biWith.This curve tangent line is in bi-1ai, Li, aibiThis 3 lines.
S309 needs to find a single Bezier and carrys out approximate one group of given shorter Bezier.It is assumed that Here there is such curve C.Obviously, C is by tangent line in b0a1And anbn.B can be found0a1And anbnIntersection point o.Such as Fig. 8 institute Show.
S310, by having produced one group of curve after S309 operation, each is made of Bezier and linear segments.This The end point of a little segments and control point are the arbitrary points in coordinate plane.According to required parameter, a linear change is executed Change, zoomed image to the size needed, and can be rotated
S311, when vector quantization describes, it usually needs 6 parameters go to describe each Bezier segment, including 1 2 control points of a end point.However, each segment can be only encoded to 3 to 4 really by eliminating extra parameter Number.
S312, image, which switchs to path processing, to be completed.
Path vectorization after decomposition can be indicated, SVG path representation is used when vector quantization indicates.The path SVG is only Need to set seldom point, so that it may create the lines of smooth flow, the shape of SVG path elements be by d attribute definition, The value of d attribute is the sequence of one " order+parameter ".SVG path elements have the order of 5 picture straight lines, as implied by the name, straight line Order is exactly to draw straight line between two points.It is order first, M, there are two parameters for it, are the x for needing the point being moved to respectively The coordinate of axis and y-axis.When resolver reads this order, it is known that you are intended to and is moved to some point.It follows in command word It is female subsequent, it is the x and y-axis coordinate of that point that you need to be moved to.For example it is moved to the order of (10,10) this point, it answers This is write as " M1010 ".After this section of character ends, resolver will go to read next section of order.The order for drawing smoothed curve comes Draw Bezier, with C order creation Cubic kolmogorov's differential system, need to be arranged three groups of coordinate parameters: Cx1y1, x2y2, xy this In the last one coordinate (x, y) indicate be curve terminal, other two coordinate is control point, and (x1, y1) is starting point Control point, (x2, y2) are the control points of terminal.Path, which is switched to SVG, through the above way indicates, can by this representation Font image is switched to the path SVG, font image directly can will be switched to by SVG by the path SVG, it can be by SVG by software File imports character library.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair The equivalent structure or equivalent flow shift that bright specification and accompanying drawing content are done is applied directly or indirectly in other relevant skills Art field similarly includes in scope of patent protection of the invention.

Claims (4)

1. a kind of Chinese character image processing method, which comprises the steps of: to the Chinese character image denoising of input Step, to after denoising image carry out binaryzation the step of and by the picture breakdown after binaryzation be path the step of;
Described pair input Chinese character image denoising the step of include the following:
Step 1: template moves over an input image, and template center is allowed successively to be overlapped with each pixel of input picture;
Step 2: the respective pixel of the input picture that coefficients are overlapped with template is multiplied, then by product addition;
Step 3: assigning output image, location of pixels and the position consistency of template center over an input image result;
Described pair denoising after image carry out binaryzation the step of include the following:
Step 1: calculating image histogram;
Step 2: histogram data being smoothed according to certain radius, and calculates the maximum of data after smoothing processing Value;
Step 3: according to the distance of above-mentioned peak value and minimum value selected threshold according to a certain percentage;
Step 4;Pixel value is set to 1 greater than selected threshold, pixel value is set to 0 less than selected threshold, to complete to scheme The binaryzation of picture;
The picture breakdown by after binaryzation be path the step of include the following:
Step 1: binary map constitutes the boundary between black and white region, and binary map is decomposed into path;
Step 2: each path is all approximately an optimal polygon;
Step 3: each polygon is converted to smooth profile;
Step 4: result curve is optimized by linking continuous Bezier segment.
2. a kind of Chinese character image processing method according to claim 1, which is characterized in that at the Chinese character image denoising of input The specific implementation steps are as follows for reason:
S101 starts to carry out image processing flow;
S102, input is in the image that colors in that treated;
S103 generates convolution mask;
The convolution mask of generation is placed the initial position of image by S104;
S105 calculates template and image respective pixel;
S106, by calculated result K, output to new image;
S107 makes convolution mask move right on the image a pixel;
S108, judges whether image reaches rightmost circle, if convolution mask does not reach rightmost circle, repeats step S105 carries out step S109 if convolution mask reaches rightmost circle;
S109 judges whether that the last line for reaching image terminates if reaching the last line of image;If image is not Last line is reached, then carries out step S110;
Convolution mask is moved to the image leftmost side, and moves down a line by S110, continues S105 step.
3. a kind of Chinese character image processing method according to claim 1, which is characterized in that carry out two-value to the image after denoising The specific implementation steps are as follows for change:
S201 starts to carry out image binaryzation processing;
S202, the image after inputting denoising;
S203, the histogram of calculating input image;
S204 carries out maximum value that is smooth, and calculating smooth rear data according to certain radius to histogram data;
S205, according to the distance of above-mentioned peak value and minimum value selected threshold according to a certain percentage;
S206, judges whether pixel value is greater than selected threshold;
S207, if current pixel value is less than the threshold value chosen and is set to 0;
S208, if the pixel that pixel value is greater than selected threshold is currently set to 1;
S209 completes the binaryzation of image.
4. a kind of Chinese character image processing method according to claim 1, which is characterized in that be by the picture breakdown after binaryzation The specific implementation steps are as follows in path:
S301 starts progress image and switchs to path processing;
S302, the image after inputting binaryzation;
S303 carries out path decomposing;
S304 removes the isolated point in image;
S305 considers a closed path p={ V now0,…,Vn, it is assumed that Vn=V0, so the length in path is n;It is any right Index i, j ∈ 0 ..., and n-1 } define a sub- path Pi,j, wherein path is Vi,…,Vj, it is V if i≤ji,…, Vn-1, it is V if j < i0,…,Vj;It is denoted asTo the annular difference between j and i, if i≤jIf J < i is thenTherefore, subpath Pi,jLength be accuratelyIt is assumed that addition and subtraction are all to modulo n;
S306 will find an optimal polygon problem and be converted into and finds the problem of an optimal annular in a digraph; One optimal annular is found in time A (nm), and wherein n is the size for inputting path, and m is longest possible fragment length;
S307, one polygon { i when output0,…,im-1One closed path { V of association0,…,Vn, refer to index i0,…, im-1And their associated point Vi as polygon vertex0,…,Vim-1;Because polygon be annular, index Modulus;In order to calculate punishment, the vertex i of polygon is accurately placed in the point V of respective pathi, i.e., have integer in coordinate system The point of coordinate;It is associated with each vertex ik, a point akIn coordinate system;
Carry out set-point a using following algorithmsk: to each continuous vertex ikAnd ik+1, calculate optimal approximation point Vik,…,Vik+1's Straight line Lk,Lk+1;If Lk-1, LkAnd Lk+1It is continuous vertex, then most wanting akIt is placed on Lk-1, LkAnd Lk+1Intersection Place;Allow akAs the maximum distance in unit squarePoint, in this way from akTo Lk-1, LkAnd Lk+1Europe it is several In distance quadratic sum be minimum;Especially if Lk-1, LkAnd Lk+1Intersection point in this unit square;Otherwise, by it It is placed on from VikClose point, that is, ion-exchange crunode is close;
S308, input are S306 polygons adjusted, it is assumed that the vertex of this polygon is a0,…,ak-1, enable b0,…,bk-1 For the midpoint of polygon edge, i.e. b0=Xiang ai+ai+1)/2;For each i, corner b is considered nowi-1,ai,bi, and pass through one Smooth curve come decide whether it is approximate it;Firstly, in point aiOne unit of upper picture is rectangular, then, finds and is parallel to bi-1biLine Li, and in aiAround touch rectangular, and it is close to straight line bi-1bi, enabling c is L and bi-1biIntersection point, and enable g For bi-1The length and b of ci-1aiQuotient, and with Bezier link bi-1And biWith;This curve tangent line is in bi-1ai,Li,aibi This 3 lines;
S309 needs to find a single Bezier and carrys out approximate one group of given shorter Bezier;It is assumed that here There is such curve C, C is by tangent line in b0a1And anbn, find b0a1And anbnIntersection point o;
S310, one group of curve of generation, each is made of Bezier and linear segments;The end point and control of these segments System point is the arbitrary point in coordinate plane;
S311, image, which switchs to path processing, to be completed.
CN201910512174.9A 2019-06-13 2019-06-13 Chinese character image processing method Active CN110246104B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910512174.9A CN110246104B (en) 2019-06-13 2019-06-13 Chinese character image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910512174.9A CN110246104B (en) 2019-06-13 2019-06-13 Chinese character image processing method

Publications (2)

Publication Number Publication Date
CN110246104A true CN110246104A (en) 2019-09-17
CN110246104B CN110246104B (en) 2023-04-25

Family

ID=67886947

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910512174.9A Active CN110246104B (en) 2019-06-13 2019-06-13 Chinese character image processing method

Country Status (1)

Country Link
CN (1) CN110246104B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090279802A1 (en) * 2008-05-07 2009-11-12 Canon Kabushiki Kaisha Image processing device and image processing method
CN103942552A (en) * 2014-02-11 2014-07-23 北京大学 Character image vectorization method and system based on framework instruction
CN104008401A (en) * 2014-05-07 2014-08-27 中国科学院信息工程研究所 Method and device for image character recognition
CN104156730A (en) * 2014-07-25 2014-11-19 山东大学 Anti-noise Chinese character feature extraction method based on framework
US20150139513A1 (en) * 2013-11-19 2015-05-21 Toshiba Medical Research Institute Cylinder source software-positioning method for pet calibration and image quality assurance
CN106503756A (en) * 2016-10-18 2017-03-15 上海子墨国际文化传播有限公司 Based on the method that image outline sets up Chinese character handwriting model
US20180293711A1 (en) * 2017-04-06 2018-10-11 Disney Enterprises, Inc. Kernel-predicting convolutional neural networks for denoising

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090279802A1 (en) * 2008-05-07 2009-11-12 Canon Kabushiki Kaisha Image processing device and image processing method
US20150139513A1 (en) * 2013-11-19 2015-05-21 Toshiba Medical Research Institute Cylinder source software-positioning method for pet calibration and image quality assurance
CN103942552A (en) * 2014-02-11 2014-07-23 北京大学 Character image vectorization method and system based on framework instruction
CN104008401A (en) * 2014-05-07 2014-08-27 中国科学院信息工程研究所 Method and device for image character recognition
CN104156730A (en) * 2014-07-25 2014-11-19 山东大学 Anti-noise Chinese character feature extraction method based on framework
CN106503756A (en) * 2016-10-18 2017-03-15 上海子墨国际文化传播有限公司 Based on the method that image outline sets up Chinese character handwriting model
US20180293711A1 (en) * 2017-04-06 2018-10-11 Disney Enterprises, Inc. Kernel-predicting convolutional neural networks for denoising

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
W.PAN ET AL.: "《Skeleton-guidedvectorizationofChinesecalligraphy images》", 《MULTIMEDIASIGNALPROCESSING》 *
李雪超: "《基于矢量化的雷达图像研究》", 《中国优秀硕士学位论文全文数据库 (信息科技辑)》 *

Also Published As

Publication number Publication date
CN110246104B (en) 2023-04-25

Similar Documents

Publication Publication Date Title
CN101702309B (en) Method for rendering a region of a composite glyph
US7161601B2 (en) Synthesis of progressively-variant textures and application to arbitrary surfaces
EP1361544B1 (en) System and method for editing electronic images
CN109712165B (en) Similar foreground image set segmentation method based on convolutional neural network
CN109064522A (en) The Chinese character style generation method of confrontation network is generated based on condition
CN102509357B (en) Pencil sketch simulating and drawing system based on brush stroke
CN101923715B (en) Image segmentation method based on texture information constrained clustering of particle swarm optimization space
CN101334701A (en) Method for directly writing handwriting information
Ren et al. Two-stage sketch colorization with color parsing
JP2014167635A (en) Method for processing stroke-based font for low-resolution display
CN111931908B (en) Face image automatic generation method based on face contour
CN114298181B (en) Vector font generation method based on bimodal learning
CN108596992B (en) Rapid real-time lip gloss makeup method
CN110232724A (en) A kind of Chinese character style image vector representation method
CN111666739A (en) Chinese vector word stock generation method based on Potrace algorithm
CN110675463A (en) Local color pencil drawing generation method and device
KR20040085659A (en) Vector font generation method and apparatus
CN110246104A (en) A kind of Chinese character image processing method
CN116563443A (en) Shoe appearance design and user customization system based on 3D generation countermeasure network
CN112232022B (en) Method and system for dynamically adjusting parameters and designing Chinese character patterns and layouts
US20230186444A1 (en) Systems and Methods for Image Transformation
CN112836467B (en) Image processing method and device
Li et al. Fast content-aware resizing of multi-layer information visualization via adaptive triangulation
US11544882B1 (en) Systems and methods for image transformation based on transformation instructions
US11557066B1 (en) Systems and methods for image transformation based on API calls

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20240523

Address after: Room 215, 2nd Floor, No. 56A Torch Road, High tech Industrial Park, Dalian City, Liaoning Province, 116000

Patentee after: Dalian Ruiyun Ziku Technology Co.,Ltd.

Country or region after: China

Address before: 116600 No. 18 West Liaohe Road, Dalian economic and Technological Development Zone, Liaoning

Patentee before: DALIAN MINZU University

Country or region before: China