CN1104790A - Enlargement of characters by sample function curves - Google Patents
Enlargement of characters by sample function curves Download PDFInfo
- Publication number
- CN1104790A CN1104790A CN 93115658 CN93115658A CN1104790A CN 1104790 A CN1104790 A CN 1104790A CN 93115658 CN93115658 CN 93115658 CN 93115658 A CN93115658 A CN 93115658A CN 1104790 A CN1104790 A CN 1104790A
- Authority
- CN
- China
- Prior art keywords
- reference mark
- literal
- batten
- character contour
- point
- 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
Links
Images
Landscapes
- Controls And Circuits For Display Device (AREA)
Abstract
The method for enlargement of character, including script or image, by use of sample line functions features that proper dots on outline of character are chosen as control dots of sample line functions and B sample line is used to fit the outline of character. When enlarging, the coordinates of each control dot are multiplied by the amplification and calculating sample curves between adjacent control dots can realize smooth enlargement. Its advantages are high amplification and less distortion. It is suitable to create huge characters and images.
Description
The present invention relates to the amplification method of literal or figure, it specifically is a kind of generating mode that utilizes splines curve magnifying text, when utilizing this mode magnifying text, extract the profile of literal and therefrom select the batten reference mark, use splines to generate the SPL of corresponding smooth and continuous, thereby reach the purpose of level and smooth amplification.
About the amplification method of literal, prior art generally is to adopt dot matrix amplifying method or vector amplifying method.The dot matrix amplifying method generally adopts the method for compensation, do compensation correction to amplifying back ladder sawtooth point, reach local level and smooth purpose, because every bit all needs to judge and revise on the character, so speed is slower, because revise and can only draw according to the situation of contiguous point, therefore can only carry out the part smoothly again, whole structure is not good, still might have modification from the whole profile of font.It is first with the printed words contour vectorization that vector amplifies rule, during amplification each vector is prolonged respectively in proportion.This amplification method speed is very fast, and the vector part is smooth, can satisfy request for utilization when enlargement factor is little, but when enlargement factor was very high, the difference of line of vector direction was excessive, formed tangible broken line, influenced the font amplification effect.
The object of the present invention is to provide a kind of literal enlargement factor unrestricted, fully guarantee the continuous and smooth literal amplification method of magnifying text font, this method is utilized splines, to the point on the text profile line, carry out curve fitting, form curve description on the whole, to give full expression to the characteristics of baroque ideographic language to text profile.
For achieving the above object, the generating mode of magnifying text of the present invention comprises following each step in regular turn:
(1) character contour of extraction literal from the type matrix of literal;
(2) concentrate some points of choosing the whole character contour feature of reflection from the marginal point of character contour, as the batten reference mark;
(3) utilize splines that curve fitting is made at each batten reference mark, obtain the SPL between each batten reference mark, thereby form curve description the character contour line;
(4) each batten reference mark coordinate be multiply by the enlargement ratio of font, and calculate the SPL between each batten reference mark, obtain the character contour of smooth amplification;
(5) printout.
Wherein the type matrix profile of literal is taken from the batten reference mark, and the principle of getting a little is:
(1) under the prerequisite that does not cause big error, draw back the distance between each batten reference mark, embody the trend characteristic of character contour as far as possible.
(2) wedge angle on the character contour line is judged, keep the wedge angle point, thereby keep the vigour of style in writing, character contour comprises the edge line of each stroke in the word, in the amplification of Chinese character and cursive characters, artistic calligraphy etc., keeps the vigour of style in writing and is even more important.
(3) the batten reference mark sequence at the starting point place of character contour is made compensation, make the spring of curve tendency level and smooth.
Splines can adopt three rank B-spline functions, and its definition is:
P(t)=(1/6)×(-t
3+3t
2-3t+1)× ()/(B0) +(1/6)×(3t
3-6t
2+4)× ()/(B1) +(1/6)×(-t
3+3t
2+3t+1)× ()/(B2) +(1/6)×t
3× ()/(B3)
Wherein ()/(B1) and ()/(B2) are the position vector at two adjacent batten reference mark carrying out curve fitting, ()/(B0) and ()/(B3) be respectively with ()/(B1), the position vector at the batten reference mark that ()/(B2) is contiguous, ()/(P(t)) represent with vector mode, B-spline curves between ()/(B1) and ()/(B2), t is corresponding to ()/(P(t)) the relational coordinate value, t=0 or t=1 respectively corresponding ()/(P(t)) starting point ()/(P(0)) or terminal point ()/(P(l)), the change step of t is:
1/(// ()/(P(1)) - ()/(P(0)) //)。
Because three rank B battens have one, the continuous character of second derivative, will be to connect and smooth according to the character contour curve that it generated, thereby make the amplification of literal cancel restriction enlargement factor.In actual computation, the position vector ()/(B0) at batten reference mark, ()/(B1), ()/(B2), ()/(B3)
Deng is not equidistantly to choose, and need to adopt suitable t value and change step thereof to calculate each corresponding B-spline curves of t value ()/(P(t)) on a point, then obtain continuous curve.B-spline curves ()/(P(t)) endpoint location is:
()/(P(O)) =(1/3)×[( ()/(B0) + ()/(B2) )/2]+(2/3)× ()/(B1)
= ()/(B1) +(1/6)×( ()/(B0) - ()/(B1) )+(1/6)×( ()/(B2) + ()/(B1) )
()/(P(1)) =(1/3)×[( ()/(B1) + ()/(B3) )/2]+(2/3)× ()/(B2)
= ()/(B2) +(1/6)×( ()/(B1) - ()/(B2) )+(1/6)×( ()/(B3) - ()/(B2) )
Therefore the length for the B-spline curves of having done between ()/(B1) and ()/(B2) is:
L=// ()/(P(1)) - ()/(P(0)) //
And calculating the used interpolation density of B-spline curves between ()/(B1) and ()/(B2), that is the change step of t is taken as: 1/L
For the literal of handwritten form, or the amplification of other hand-written character or figure, as long as can obtain their dot-matrix font, extract its contour curve clearly, can utilize splines, carry out the amplification of said method, to obtain continuously smooth, undistorted amplification picture and text.Pretreated process is before amplifying:
(1) reads in the computing machine with the literal or the figure of scanning device handwritten form;
(2) will scan the pantography that is obtained and arrive suitable size, carry out binary conversion treatment again, remove discrete zonule point, thereby the band gray scale people, distortion when eliminating scanning, and the error that scanning is brought into revised, make non-black promptly white, the sharp outline of the scanning patter that obtains, as the type matrix profile;
(3) again the type matrix profile is carried out preliminary smooth treatment, remove the burr on the profile, thereby obtain handwritten text or type matrix profile figure, standard.
Afterwards, utilize splines to carry out processing and amplifying again by aforesaid method.When the literal that is exaggerated or figure on output device during printout, if the size of literal or figure during greater than the dimension limit of the printout of output device, can adopt the piecemeal output intent.
The present invention has remedied the deficiency of dot matrix amplifying method or vector amplifying method, in amplifying, literal can realize very high enlargement factor, and can guarantee the continuous, smooth and indeformable of text profile, distortion is very little, can keep the vigour of style in writing of font, and the speed of processing and amplifying is moderate, can not only amplify the dot matrix character of standard, also can amplify the literal or the figure of handwritten form, not high to the requirement of computing machine or output device yet, have very high practicality.The present invention can increase substantially product quality and work efficiency for all conglomeraties such as advertising and industrial art in order to generate jumbo literal or jumbo pattern.
Below in conjunction with accompanying drawing in detail the present invention is described in detail:
Fig. 1 is a theory diagram of the present invention;
Fig. 2 is the flow chart of the embodiment of the invention;
Fig. 3 a is one section curve synoptic diagram of the word lattice type matrix profile of hypothesis;
Fig. 3 b is with the J curve effectJ synoptic diagram of every bit among Fig. 3 a as the match of batten reference mark institute;
When Fig. 4 is a point sequence on following the tracks of the font outline line with the chain representation synoptic diagram of 8 adjacent direction values;
Fig. 5 is a synoptic diagram of following the tracks of the point sequence on the square character contour line;
Fig. 6 is a synoptic diagram of following the tracks of the point sequence on the pointed shape character contour line;
Fig. 7 utilizes four points to 2 synoptic diagram that carry out curve fitting in the middle of it.
Fig. 1 has represented the basic thought of whole literal amplification method.From three above-mentioned rank B-spline functions ()/(P(t)), when carrying out curve fitting for two adjacent batten reference mark, also simultaneously with reference to the adjacent batten reference mark at these two batten reference mark, i.e. ()/(B0) and ()/(B3), the effect curve that comes out of match has just fully been taken into account the tendency of contiguous stroke like this, thereby guaranteed the continuous and smooth of matched curve, eliminated step error and zigzag distortion, distortion.
Selected be used for the splines of curve fitting after, core be the position vector of determining on the profile to topic, that is batten reference mark.If with the reference mark of the every bit on the character contour line as the B batten, although spline fit curve can be a smooth and continuous, but because former character contour line itself is owing to there is certain error in its dot matrix way, thereby spline fit curve will keep original error, effect is still undesirable like this, and calculated amount is very big.As the character contour shown in Fig. 3 a is carried out match, then SPL is shown in Fig. 3 b.So, although SPL can be carried out good match and smooth to the batten reference mark, but expect good match and amplification effect, just need to select suitable curve batten reference mark, make these points can show the tendency of font curve, the error of avoiding bringing in the font dispersion number value process is amplified, thereby keeps former printed words amplification effect.
The principle of choosing the batten reference mark is, do not losing principal character on the former character contour, do not causing under the prerequisite of big distortion, draw back the distance at reference mark as far as possible, make the batten reference mark embody the trend characteristic of whole character contour curve as much as possible, implementation method embodies in the following areas:
1, the dot-matrix font of font should reach certain precision, makes the type matrix profile can show tracing pattern fully, the reflection stroke feature.The dot matrix of suggestion Chinese character font is more than 128 * 128.
2, important control point chooses.
Be considered to point more important on the outline line at the turning point on the character contour, it is representing some key characters on the profile.These points are taken as important batten reference mark and remain, and are considered as the vigour of style in writing information of font.
The method of judging vigour of style in writing point is as follows: begin clockwise direction from starting point and seek next point successively, make type matrix point always on the right of profile tracking direction.Wherein starting point can choose in the character contour go up most, the most left point.With the chain representation of the point sequence on the outline line, as shown in Figure 4 with 8 adjacent direction values.Undertaken by 8 directions because profile is followed the tracks of, when profile had the indent turnover, this tracking mode can not show interior concave point.Profile chain code as shown in Figure 5 should be ... 4444222 ..., and the chain code of actual tracking results is ... 444322 ..., does not reflect on summit, right angle wherein.Arrow among the figure is represented the profile tracking direction; Profile chain code as shown in Figure 6 should be ... 444111 ..., the chain code of actual tracking results is ... 4311 ..., wherein the indent flex point of wedge angle does not reflect yet.Therefore, need apply some difference rule, to seek interior flex point.
During realization, be the run length code of chain code with contour representation.If the run length code of three sections chain codes is:
(dir1,len1),(dir2,len2),(dir3,len3)
Wherein dir1, dir2, dir3 are direction, and value is an integer 0 to 7.Len1, len2, len3 are the length of all directions.If len2=1 and satisfy dir1 and dir3 is interior right angle or interior acute angle, that is:
4≤(dir3-dir1)?mod?8≤6
With: (dir3-dir1) mod 8<(dir2-dir1) mod 8
Judge that then dir1, dir3 are two adjacent edges of indent turnover.Obtain the intersection point on these both sides, revise len1, len3 and remove chain code (dir2, len2) getting final product.
The evagination turning point can be manifested when profile is followed the tracks of naturally, establishes adjacent chain code and is: (dir1, len1), (dir2, len2)
If: (dir2-dir1) mod 8≤4
Then the intersection point on both sides is the evagination flex point.
As vigour of style in writing turning point, should make SPL through this point, and transfer in this.For this reason, in the sequence of the batten reference mark of profile, all turnover position vectors are put continuous triplicate, by three rank B batten characteristics as can be known SPL so also just kept the vigour of style in writing through all turning points and corresponding turnover occurs.
3, general reference mark chooses.
The principle of choosing is to widen the reference mark spacing in the scope of error permission as far as possible.As shown in Figure 7, for position vector sequence ()/(B0), ()/(B1), ()/(B2), ()/(B3) its B batten starting point be corresponding to interlude ()/(B1) to ()/(B2):
()/(P(0)) = ()/(B1) +(1/6)×( ()/(B0) - ()/(B1) )+(1/6)×( ()/(B2) - ()/(B1) )
()/(P(0)) put ()/(P(1)) curve between the point is the matched curve ()/(P(t) of B-spline function).
()/(P(0)) to ()/(B1) be error apart from d, promptly
()/(D) = ()/(P(0)) - ()/(B1) =(1/6)×( ()/(B0) - ()/(B1) )+(1/6)×( ()/(B2) - ()/(B1) )
Because ()/(B1) is not turning point (turning point has been used as important control point and has chosen) in advance, therefore the angle of (()/(B0)-()/(B1)) and (()/(B2)-()/(B1)) will be controlled greater than 90 °
If selecting step-length is 3, that is:
// ()/(B0) - ()/(B1) // = // ()/(B2) - ()/(B1) //= 3
Then d<
/ 2; If to select step-length is 4, then d<2 *
/ 3.Can be according to error requirements and the suitable step-length of font Feature Selection.Generally selecting step-length is 3 or 4, makes error both within control, suitable again big of step-length.
4, the processing of profile starting point
If the profile starting point for the turnover cusp, then with starting point triplicate (at the profile starting and ending), gets final product profile head and the tail closure.Otherwise, at the reference mark tail of sequence, add initial 3 points, make the smooth closure of outline line, promptly in the following way:
()/(B0) , ()/(B1) , ()/(B2) , ()/(B3) ...... ()/(Bn-1) , ()/(B1) , ()/(B2)
Wherein ()/(Bn)=()/(B0)
SPL will be a starting point with ()/(B1) point, get back to ()/(B1) point at last.
After determining the batten reference mark of profile as stated above, each position vector be multiply by the literal enlargement ratio, batten reference mark sequence to profile is made B-spline curves successively, every section curve density (being the step-length of t) is determined by this section length of curve L, thereby generate smooth smoothly, the character contour curve after amplifying, according to using needs, character contour is filled or do not filled again, can use after the printout.
The Chinese character of handwritten form comprises other literal or figure, can use method of the present invention to carry out the smooth amplification of no maximum equally by pre-service.Carrying out pretreated concrete grammar is, a girth thresholding T is set, and extracts the profile of scanning patter, when the profile length of side during less than T, thinks that promptly the contained zone of this profile is discrete zonule, removes that contained stain gets final product in the profile.After carrying out binary conversion treatment, can utilize computer software that figure is carried out suitable additions and deletions and revise, the error that scanning is brought into is revised.
Before scanning patter being carried out the curve amplification, also need carry out preliminary smooth treatment to its profile, remove the burr on the profile.Method is to extract the outline line of scanning patter, and the every bit on the line is replaced with the adjacent mid point in its front and back at 2, forms a new outline line.This new outline line will be more level and smooth than former outline line.Carry out this exchange repeatedly, until think satisfied till.
After finishing above processing, the quality of the scanning patter of handwritten form is greatly improved, and can carry out curve and amplify.
When the character and graphic that is exaggerated can not once be exported, adopt the method for piecemeal output on computer hardware.The size of piece is relevant with the size of output device with quantity, is one when the character and graphic area is less than or equal to the dimension limit of output device, need not piecemeal, otherwise is divided into polylith.The type of piecemeal adapts with the character of computer hardware.In general, dot matrix output device (as printer) adopts bar blocks, and vector type output device (as plotting apparatus or carving machine) adopts rectangular block.No matter which kind of adopts divide block type, all according to from top to bottom, principle from left to right is numbered piece, the output back is combined into jumbo word or figure by number order.
Fig. 2 is the program principle block diagram according to the computer software that method of the present invention realized, as one embodiment of the present of invention, the concrete implementation step and the order of method of the present invention can be described.Its basic process is same as shown in Figure 1.Also be on character contour, to choose earlier the reference mark of suitable point as splines, adopt cubic B-spline match character outline line, when carrying out the font amplification, each reference mark coordinate be multiply by enlargement ratio, reach the purpose of smooth amplification by the SPL between computer control point.Fig. 2 has done whole description to the method for whole amplification font.When using, reality amplified and printout edge up to a hundred square metres jumbo Chinese character smooth and attractive in appearance.
Claims (5)
1, a kind of generating mode that utilizes splines curve magnifying text is characterized in that comprising following each step in regular turn:
(1) character contour of extraction literal from the type matrix of literal;
(2) concentrate some points of choosing the whole character contour feature of reflection from the marginal point of character contour, as the batten reference mark;
(3) utilize splines that curve fitting is made at each batten reference mark, obtain the SPL between each batten reference mark, thereby form curve description the character contour line;
(4) each batten reference mark coordinate be multiply by the enlargement ratio of font, and calculate the SPL between each batten reference mark, obtain the character contour of smooth amplification;
(5) printout.
2, the generating mode of magnifying text according to claim 1 is characterized in that the batten reference mark takes from the type matrix profile of literal, and the principle of getting a little is:
(1) under the prerequisite that does not cause big error, draw back the distance between each batten reference mark, embody the trend characteristic of character contour as far as possible;
(2) wedge angle on the character contour line is judged, keep the wedge angle point, thereby keep the vigour of style in writing;
(3) the batten reference mark sequence at the starting point place of character contour is made compensation, make the spring of curve tendency level and smooth.
3, the generating mode of magnifying text according to claim 1 is characterized in that splines can adopt three rank B-spline functions, and its definition is:
P(t)=(1/6)×(-t
3+3t
2-3t+1)× ()/(B0) +(1/6)×(3t
3-6t
2+4)× ()/(B1) +(1/6)×(-t
3+3t
2+3t+1)× ()/(B2) +(1/6)×t
3× ()/(B3)
Wherein ()/(B1) and ()/(B2) are the position vector at two adjacent batten reference mark carrying out curve fitting, ()/(B0) and ()/(B3) be respectively with ()/(B1), the position vector at the batten reference mark that ()/(B2) is contiguous, ()/(P(t)) represent with vector mode, B-spline curves between ()/(B1) and ()/(B2), t is corresponding to ()/(P(t)) the relational coordinate value, t=0 or t=1 respectively corresponding ()/(P(t)) starting point ()/(P(0)) or terminal point ()/(P(1)), the change step of t is: 1/(// ()/(P(1))-()/(P(0)) //)
4, according to the generating mode of claim 1 or 3 described magnifying texts, it is characterized in that before amplification, will carrying out pre-service to the literal of handwritten form or figure, its process is:
(1) reads in the computing machine with the literal or the figure of scanning device handwritten form;
(2) will scan the pantography that obtained to suitable size, carry out binary conversion treatment again, remove discrete zonule point, thus the band gray scale people, distortion when eliminating scanning, and the error that scanning is brought into revised, make non-black promptly white, the sharp outline of figure;
(3) again the type matrix profile is carried out preliminary smooth treatment, remove the burr on the profile, thereby obtain handwritten text or type matrix profile figure, standard.
5, according to the generating mode of the described magnifying text of arbitrary claim in the claim 1 to 4, it is characterized in that when the literal that is exaggerated or figure on output device during printout, if the size of literal or figure, can adopt the method for piecemeal output greater than the dimension limit of the printout of output device.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN93115658A CN1038161C (en) | 1993-12-28 | 1993-12-28 | Enlargement of characters by sample function curves |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN93115658A CN1038161C (en) | 1993-12-28 | 1993-12-28 | Enlargement of characters by sample function curves |
Publications (2)
Publication Number | Publication Date |
---|---|
CN1104790A true CN1104790A (en) | 1995-07-05 |
CN1038161C CN1038161C (en) | 1998-04-22 |
Family
ID=4991221
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN93115658A Expired - Fee Related CN1038161C (en) | 1993-12-28 | 1993-12-28 | Enlargement of characters by sample function curves |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN1038161C (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100377578C (en) * | 2005-08-02 | 2008-03-26 | 北京北大方正电子有限公司 | Method for processing TV subtitling words |
CN102881033A (en) * | 2012-08-06 | 2013-01-16 | 孙计良 | Method and device for generating adaptive curve |
CN111402366A (en) * | 2020-03-18 | 2020-07-10 | 北京奇艺世纪科技有限公司 | Character rendering method and device, electronic equipment and storage medium |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1020840C (en) * | 1985-04-01 | 1993-05-19 | 株式会社岛津制作所 | Tomographic apparatus |
PT88162B (en) * | 1987-08-10 | 1993-09-30 | Wilhelm Rene Ag | PROCESS AND APPARATUS FOR COLLECTION AND / OR PRE RECOVERY OF ARTICLES |
CN1076042A (en) * | 1993-03-15 | 1993-09-08 | 北京市海淀区先锋电子技术公司 | The mixed-spline functional based method of Chinese character contour is described |
-
1993
- 1993-12-28 CN CN93115658A patent/CN1038161C/en not_active Expired - Fee Related
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN100377578C (en) * | 2005-08-02 | 2008-03-26 | 北京北大方正电子有限公司 | Method for processing TV subtitling words |
CN102881033A (en) * | 2012-08-06 | 2013-01-16 | 孙计良 | Method and device for generating adaptive curve |
CN102881033B (en) * | 2012-08-06 | 2018-06-19 | 西安科技大学 | The generation method and device of adaptive curve |
CN111402366A (en) * | 2020-03-18 | 2020-07-10 | 北京奇艺世纪科技有限公司 | Character rendering method and device, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN1038161C (en) | 1998-04-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP3356612B2 (en) | High-speed contour smoothing method and apparatus | |
CN1095138C (en) | Methods of transforming basic shape element of character, characterutilizing central shaft change and its raster process | |
CN1017666B (en) | Method for producing characters and graphs with controlled size and thick-thin | |
US5852679A (en) | Image processing apparatus and method | |
CN1199197A (en) | Method and apparatus for prints | |
CN1054929C (en) | Character generating method and apparatus cross reference to related application | |
CN1109294C (en) | Bit map character convertor | |
Bigelow | The font wars, part 1 | |
US7477265B2 (en) | System and method for optimising halftoning printer performance | |
CN1104790A (en) | Enlargement of characters by sample function curves | |
CN115841671B (en) | Handwriting skeleton correction method, system and storage medium | |
CN1167302A (en) | Matrix generator capable of generating matrix of character composition factor with linked stroke | |
CN1181556A (en) | Apparatus for and method of measuring focus | |
JPH0832471B2 (en) | output method | |
JPH0918732A (en) | Image processor and its method | |
CN1147823C (en) | Triangular vector approximating method of digitalized character contour | |
JP3034140B2 (en) | Character generation method and device | |
Baudelaire et al. | Techniques for interactive raster graphics | |
JP2833101B2 (en) | Pattern deformation method | |
CN1051996A (en) | General chinese character system for computer | |
JPH07122787B2 (en) | Continuous character generator | |
JP2538631B2 (en) | How to handle vector characters | |
JP3836055B2 (en) | Handwritten drawing conversion program and recording medium | |
Nakamura et al. | A proposal of generating artistic Japanese calligraphic fonts | |
JP2675610B2 (en) | Image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C06 | Publication | ||
PB01 | Publication | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C19 | Lapse of patent right due to non-payment of the annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |