WO2012155510A1 - Method and apparatus for processing character deformation special effect - Google Patents

Method and apparatus for processing character deformation special effect Download PDF

Info

Publication number
WO2012155510A1
WO2012155510A1 PCT/CN2011/084304 CN2011084304W WO2012155510A1 WO 2012155510 A1 WO2012155510 A1 WO 2012155510A1 CN 2011084304 W CN2011084304 W CN 2011084304W WO 2012155510 A1 WO2012155510 A1 WO 2012155510A1
Authority
WO
WIPO (PCT)
Prior art keywords
deformation
text
designer
character
special effect
Prior art date
Application number
PCT/CN2011/084304
Other languages
French (fr)
Chinese (zh)
Inventor
曹晓勇
Original Assignee
深圳市万兴软件有限公司
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 深圳市万兴软件有限公司 filed Critical 深圳市万兴软件有限公司
Publication of WO2012155510A1 publication Critical patent/WO2012155510A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/109Font handling; Temporal or kinetic typography
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves

Definitions

  • the invention relates to the technical field of text transformation special effect information processing, in particular to a text deformation special effect processing method and device.
  • the text effect is a kind of graphic effect with decorative or decorative meaning obtained by adjusting the font attributes, size, color, alignment, shadow, deformation effect, contour, filling, etc. of the text. It has beautiful and interesting, eye-catching and other characteristics.
  • Text effects are widely used in publicity, advertising, trademarks, slogans, blackboard newspapers, corporate names, venue layouts, exhibitions, and packaging and decoration of goods, advertisements for various types of advertisements, newspapers, magazines, and books. like.
  • the basic implementation principles of the current common text transformation effects are based on different deformation effects.
  • the mathematical model is manually created by the manual, and then the program generates corresponding text transformation effects according to the established mathematical model.
  • the prior art text transformation special effect process is: manually constructing a mathematical model according to the target deformation shape, and then inputting the corresponding text by the user, and processing according to the established mathematical model to generate a corresponding text deformation special effect.
  • the technical problem to be solved by the present invention is to provide a text deformation special effect processing method and device for the above-mentioned defects of the prior art, which reduces the labor cost when the character deformation special effect is performed, and increases the device to arbitrarily deform the text.
  • the new features make it easy for users.
  • a text deformation special effect processing method which includes:
  • a text deformation designer consisting of an initial rule rectangle and a plurality of control points is set, and the control point is used to control the rectangle of the text deformation designer to perform linear deformation or quadratic deformation;
  • the text morphing designer outputs the deformed special effect text graphic.
  • step A further includes:
  • the control point specifying the initial rectangle is the midpoint on the four sides of the rectangle.
  • step C further comprises: converting a user operation instruction into a text deformation parameter, where the text deformation parameter includes initial control Point parameters and vector motion parameters.
  • step C further includes:
  • the text deformation designer abstracts the coordinates of each control point after the transformation according to the deformation type selected by the user and the special effect shape determined by the user after stretching, and outputs a parameter E indicating the deformation type and a matrix of 2 rows and 2 columns. Recorded as:
  • Point3 Point4 where E represents the type of text deformation, which takes 1 or 2, 1 represents deformation to linear deformation, 2 represents deformation to quadratic deformation; matrix M's four elements Pointl, Point2, Point3, Point4 correspond to 4 The position of the control points: the linear deformation corresponds to the relative coordinates of the four corner vertices of the rectangle, and the quadratic deformation corresponds to the relative coordinates of the midpoints on the four sides of the rectangle.
  • step D further comprises: dividing the generated special effect character graphic, and generating an independent sub-word block according to the number of input characters.
  • the text transformation special effect processing method wherein the generating the special effect text graphic in the step D, and generating the independent sub-word block according to the number of input characters specifically includes:
  • the Chinese character is divided into the generated special effect text, according to the input text
  • the number segmentation generates independent sub-word blocks.
  • a text deformation special effect processing device comprising:
  • a text morphing designer creating module for setting a text morphing designer consisting of an initial regular rectangle and a plurality of control points, the control point is used to control the rectangle of the text morphing designer Linear deformation or quadratic deformation;
  • a receiving and input module configured to receive a text input by the user that needs to be deformed, convert the text that needs to be deformed into a vector graphic, and input the text into a text deformation designer;
  • the model establishing and special effect deformation module is configured to receive an operation instruction of a control point of the user dragging the text deformation designer, and linearly deform and/or quadratic deformation of the text vector graphic according to the mathematical model dynamically created by the text deformation designer;
  • the output module is configured to output the transformed special effect text graphic through the text deformation designer.
  • the character deformation effect processing device wherein the text deformation designer creation module comprises: a first setting unit and a second setting unit;
  • a first setting unit configured to: when the rectangle controlling the text deformation designer is linearly deformed, the control point of the initial rectangle is specified as four corner vertices;
  • a second setting unit configured to: when controlling a rectangle of the text deformation designer to perform quadratic deformation, designating a control point of the initial rectangle as a midpoint on four sides of the rectangle;
  • model creation and special effect deformation module comprises:
  • a conversion unit configured to convert a user operation instruction into a text deformation parameter, where the text deformation parameter includes an initial control point parameter and a vector motion parameter.
  • the text transformation special effect processing device wherein the output module comprises:
  • a dividing unit configured to divide a blank space formed on a vertical projection of the image line according to a blank gap between the word and the word, and a rule that the interval between the Chinese characters is greater than the interval between the Chinese characters, and perform segmentation of the Chinese character on the generated special effect text graphic, according to The number of input characters is divided to generate independent sub-word blocks.
  • the text deformation special effect processing method and device provided by the invention adopts a text deformation designer which is composed of an initial regular rectangle and a plurality of control points, and the control point is used for controlling the linear deformation of the rectangle of the text deformation designer or Quadratic deformation; receiving text input by the user that needs to be deformed, converting the text to be deformed into a vector graphic, inputting to the text deformation designer; receiving an operation instruction of the user dragging the control point of the text deformation designer, according to the text deformation
  • the mathematical model dynamically created by the designer linearly deforms the text vector graphics and/or quadratic deformation; the text deformation designer outputs the deformed special effect text graphics, and the embodiment of the invention reduces the labor required to complete a text special effect Cost, while reducing R&D costs, can achieve different text shape effects through the adjustment matrix parameters of the cartridge, instead of developing for specific effects. It also adds a new function that can arbitrarily transform the text, allowing users to easily create their own favorite text deformation effects, providing
  • FIG. 2 is a flowchart of a method for processing a character deformation effect according to an embodiment of the present invention. Schematic diagram.
  • FIG. 4 is a schematic structural view of a text deformation designer for designing a quadratic deformation effect according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of an example of linear character deformation according to an embodiment of the present invention.
  • FIG. 6a is a schematic diagram of the character structure before the line type change in the embodiment of the present invention
  • FIG. 6b is a schematic diagram of the text structure after applying the line type deformation special effect
  • Fig. 7 is a schematic view showing the structure of a quadratic character deformation according to an embodiment of the present invention.
  • Fig. 8a is a schematic view showing the structure of a character before the change in an embodiment
  • Fig. 8b is a schematic view showing the structure of a character after applying a secondary deformation effect.
  • FIG. 9 is a schematic block diagram of a text deformation special effect processing apparatus according to an embodiment of the present invention.
  • Step S110 Set a text deformation designer consisting of an initial rule rectangle and a plurality of control points, and the control point is used to control the rectangle of the text deformation designer to perform linear deformation or quadratic deformation.
  • the text deformation designer is mainly composed of an initial regular rectangle and four control points, and the user designs the desired target shape by dragging four control points.
  • the design of the text deformation designer is shown in Figures 3 and 4.
  • the control point specifying the initial rectangle is four corner vertices, as shown in FIG. 3, LT, RT, RB, LB.
  • the control point of the designated initial rectangle is the midpoint on the four sides of the rectangle, as shown in FIG.
  • FIG. 3 is a schematic structural view of a text deformation designer for designing a linear deformation effect, by which a user can design a linear deformation effect; wherein, the linear deformation effect refers to a text deformation effect, and all the tensile deformations are straight lines.
  • the text deformation setter in FIG. 3 is composed of an initial regular rectangle 10 and four corner vertices LT, RT, RB, LB of the corresponding rectangle, and four corner vertices LT, RT, RB, LB are the text deformation designer of FIG.
  • the four control points specify the initial coordinates of the four control points of the initial rectangle as LT(-1, 1), RT(1, 1), RB(1, -1), LB(-1,
  • Figure 4 shows the structure of the text deformation designer used to design the quadratic deformation effect. Through this designer, the user can design the quadratic deformation effect. Among them, the quadratic deformation effect refers to: The extension deformation is parabolic.
  • four control points are set on the four sides of the rectangle, which are: MT, RM, MB, LM.
  • the initial coordinates of the four control points specifying the initial rectangle are MT ( 0, 1 ), RM ( 1 , 0 ), MB (-1 , 0), LM (0, -1).
  • Step S120 Receive a text that needs to be deformed input by the user, convert the text that needs to be transformed into a vector graphic, and input it to the text deformation designer.
  • Vectors use lines and curves to describe graphics.
  • the elements of these graphics are points, lines, rectangles, polygons, circles, and arcs, and so on.
  • the text data to be deformed is input into the text deformation designer so that the text is deformed following the change of the text deformation designer.
  • Step S130 Receive an operation instruction that the user drags the control point of the text deformation designer, and linearly deforms the text vector graphic and/or the second-order deformation according to the mathematical model dynamically created by the text deformation designer.
  • the user's operation instruction is converted into a text deformation parameter, and the text is changed.
  • the shape parameter includes an initial control point parameter and a vector motion parameter, wherein, in linear deformation, the four angular vertices LT, RT, RB, and LB as described above are the four control points of the text deformation designer of the FIG.
  • the initial coordinates of the four control points of the specified initial rectangle are LT(-1, 1), RT(1, 1), RB(1, -1), LB(-1, -1), which are expressed as the initial of linear deformation.
  • the initial control point parameter is the initial coordinates MT( 0, 1 ) and RM( 1 , which specify the four control points of the initial rectangle.
  • Type and user The target shape determined after stretching, abstracting the coordinates of each control point after transformation, outputting a parameter E indicating the deformation type and a matrix of 2 rows and 2 columns (ie vector motion parameters) are recorded as:
  • Point 3 Point The parameter E represents the type of text deformation, and the value is 1 or 2, 1 represents linear deformation, and 2 represents quadratic deformation.
  • the deformations correspond to the relative coordinates of the four points of MT, RM, MB, and LM in FIG. 4, respectively.
  • the shape generates a thumbnail of the text deformation effect, which is convenient for the user to customize the text deformation effect template.
  • the type of text deformation effect designed by the user can be known, that is, whether the target deformation shape is linear or quadratic parabola.
  • the first deformation parabola is a straight line, that is, the text deformation designer is the line
  • the four corner vertices of the text deformation designer rectangle are the four control points. It is known that two points can determine a straight line, so the function of the parabolic model of the text deformation can be determined according to the data of the four vertices, and then the final text deformation effect can be generated by correspondingly processing the position of the text according to the function.
  • the details are as follows.
  • the control point is the coordinates of the four corner vertices, and the positions of the four control points before the change are set to a, b, c, d;
  • the four control points are located at a, b, c, d,.
  • Fig. 6a is the text before the change
  • Fig. 6b is the text after the deformation effect is applied.
  • the coordinates of the four corners of the character deformation designer rectangle before the change in FIG. 5 are respectively a(-l, 1), b(l, 1), c(l, -l), d(-l, -1), B
  • point B rises by 0.2 units to b'
  • point c rises by 1.1 units to c, then after deformation
  • the matrix can be expressed as:
  • Point4 represents the coordinates of a, b', c, d' after deformation.
  • the midpoint on the four sides of the initial regular rectangle of the text deformation designer is the four control points; and the four control points before the change are set.
  • the position is 6, f, g, h; the changed text deformation designer has four control point positions e, f, g, h.
  • the quadratic parabola in the present invention uses a parabola. It is known that three points can determine a parabola. Therefore, according to the coordinates of the four control points output by the text deformation effect designer, four vertices are added (in the quadratic deformation, four The data of a fixed point coordinate can determine the function of the text transformation parabola, and then the corresponding text transformation effect can be generated according to the function of the function.
  • the four corners of the border rectangle of the default text are set as a , b , c , d respectively.
  • the positions of the four control points before the change are e, f, g, h; the positions of the four control points of the changed text deformation designer are e, f, g, h,;
  • the text transformation effects corresponding to the model are shown in Fig. 8a and Fig. 8b, and
  • Fig. 8a is the text before the change.
  • Figure 8b is the text after applying the text effect.
  • the coordinates are a(-l, 1), b(l, 1), c(l, -l), d(-l, -l).
  • the coordinates of the e, f, g, and h points of the four control points before the change in Fig. 7 are respectively set to e (0, 1), f (l, 0), g (-l, 0), h (0, -1):
  • two points e and g are compressed inward by 0.3 units; f and h are expanded outward by 0.2 units, and the deformed matrix can be expressed as:
  • Point 3 Point (0,-0.7) (-1.2,0)
  • Pointl, Point2, Point3, and Point4 represent the coordinates of e, f, g, and h after deformation, respectively.
  • y Kx + h
  • Step S140 The text deformation designer outputs the transformed special effect text graphic.
  • GraphicsPa th (a class in the Windows graphics library that records all the processes that the user draws, can provide the ability to draw all the content at once), where Graph icsPath is a class in the Windows graphics library that is used to record users. All the processes you draw can provide the ability to draw all the content at once.
  • the PathDa ta data can be obtained, and the data structure is a collection of control points of the recorded text, where PathData is a helper class in the Windows graphics library, used to record the data in the Graphicspath.
  • PathData is a helper class in the Windows graphics library, used to record the data in the Graphicspath.
  • the position of a certain point in the transformation can be obtained. After all the points are completed, the target text deformation effect is obtained.
  • step S140 the method further comprises: dividing the generated special effect character graphic, and generating independent sub-word blocks according to the number of input characters, and in the specific implementation, vertically projecting on the image line according to a blank gap between the words and the words The formed blank interval, and the interval between the Chinese characters are larger than the interval between the Chinese characters, and the generated special effect character graphics are divided into Chinese characters, and the independent sub-word blocks are generated according to the number of input characters.
  • word segmentation is to separate a single character image from the segmented text image lines.
  • the correctness of the word segmentation directly affects the recognition result.
  • the following is an example of a single Chinese character segmentation:
  • the main method of word segmentation can be determined by means of the idea of segmentation of Chinese character image lines: a single character image is segmented by a blank space formed by the vertical gap between the word and the word on the vertical projection of the image line.
  • the interval between Chinese characters is generally larger than the interval between Chinese characters to first perform coarse segmentation of Chinese characters, and then to perform fine segmentation based on the fact that Chinese characters are basically square graphics.
  • the specific implementation is as follows: According to the line segmentation of Chinese characters, the height information of the Chinese characters can be obtained, so that the basic width of the Chinese characters can be estimated; for each of the roughly divided Chinese characters, the width information is measured, and the starting position of the coarse segmentation is Starting point, search in the left and right directions, and make a slight adjustment to the starting position, so that the word segmentation is more accurate.
  • This method not only ensures that the internal structure of a single Chinese character is not separated, but also avoids the edge of the Chinese character.
  • the segmentation result basically extracts the complete Chinese character and eliminates the false cut of the stroke. In this way, the generated special effect text graphic is divided into a plurality of independent sub-word blocks, and the transformed special effect text graphic is output through the text deformation designer.
  • the embodiment of the present invention reduces the labor cost for completing a text special effect, and at the same time reduces the research and development cost, and can realize different text shape special effects by adjusting the matrix parameters of the single tube, and no longer need Develop for specific effects.
  • the device adds a new function that can arbitrarily deform the text, and realizes segmentation of each glyph for the generated block, each glyph shape is coherent, and can be freely moved and edited, so that the user can easily make a favorite
  • the text deformation effects provide convenience for the user and enhance the user experience.
  • the embodiment of the present invention further provides a text transformation special effect processing device, as shown in FIG. 9, comprising: a text deformation designer creating module 910, configured to set a text deformation designer consisting of an initial regular rectangle and a plurality of control points, wherein the control point is used to control the rectangle of the text deformation designer to perform linear deformation or quadratic deformation; As mentioned above.
  • the receiving and inputting module 920 is configured to receive a text that needs to be deformed by the user, convert the text that needs to be transformed into a vector graphic, and input the text into a text deformation designer; as described above.
  • the model establishing and special effect deformation module 930 is configured to receive an operation instruction of a user dragging a control point of the text deformation designer, and linearly deform the text vector graphic and/or quadratic deformation according to a mathematical model dynamically created by the text deformation designer; Specifically as described above.
  • the output module 940 is configured to output the transformed special effect text graphic through the text deformation designer; as described above.
  • the text deformation designer creating module 910 includes: a first setting unit and a second setting unit;
  • the first setting unit is configured to: when the rectangle controlling the text deformation designer is linearly deformed, the control point of the initial rectangle is specified as four corner vertices; as described above.
  • a second setting unit configured to: when the rectangle controlling the text deformation designer is subjected to quadratic deformation, the control point of the initial rectangle is specified as a midpoint on the four sides of the rectangle; as described above.
  • the model establishment and special effect deformation module 930 includes:
  • a conversion unit configured to convert a user operation instruction into a text deformation parameter, where the text deformation parameter includes an initial control point parameter and a vector motion parameter; as described above.
  • the text transformation special effect processing device wherein the output module comprises: a dividing unit, configured to divide a blank space formed on a vertical projection of the image line according to a blank gap between the word and the word, and a rule that the interval between the Chinese characters is greater than the interval between the Chinese characters, and perform segmentation of the Chinese character on the generated special effect text graphic, according to The number of input characters is divided to generate independent sub-word blocks.
  • a dividing unit configured to divide a blank space formed on a vertical projection of the image line according to a blank gap between the word and the word, and a rule that the interval between the Chinese characters is greater than the interval between the Chinese characters, and perform segmentation of the Chinese character on the generated special effect text graphic, according to The number of input characters is divided to generate independent sub-word blocks.
  • the text deformation special effect processing method and device adopts a text deformation designer composed of an initial regular rectangle and four control points, and four control points are used to control the text deformation design.
  • the rectangle of the device is linearly deformed or quadratic-shaped; receiving the user's operation instruction to drag the four control points of the text deformation designer, and linearly deforming and/or quadratic deformation of the text deformation designer;
  • the mathematical model is dynamically established by linear deformation and/or quadratic deformation, and the processing automatically generates the text that needs to be deformed input by the user into deformation special effect text, and the embodiment of the invention reduces the labor cost for completing a text special effect.
  • the R&D cost is reduced, and different text shape effects can be realized by adjusting the matrix parameters of the cartridge, and it is no longer necessary to develop for specific effects.
  • the device has added a new function that can arbitrarily deform the text, so that users can easily create their own favorite text deformation effects, which is convenient for the user.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Processing Or Creating Images (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

Disclosed are a method and apparatus for processing character deformation special effect; the method comprises: setting a character deformation designer consisting of an initial regular rectangle and a plurality of control points; receiving the character requiring deformation inputted by a user, transforming the character requiring deformation into a vector image, and then inputting the into the character deformation designer; receiving an operational command of the user dragging the control points of the character deformation designer, and performing a linear deformation and/or quadratic deformation to the character vector image according to the mathematical model dynamically built by the character deformation designer; the character deformation designer outputting the deformed special effect character image. According to the present invention, the labor cost required for completing character special effect is reduced and the research and development cost is also reduced simultaneously; different character-shape special effects can be achieved by simply adjusting matrix parameters without research and development for specific special effect. And the new function of performing any deformation to a character is added to the apparatus, thus facilitating the user.

Description

说 明 书  Description
一种文字变形特效处理方法及装置 技术领域  Text deformation special effect processing method and device
本发明涉及文字变形特效信息处理技术领域, 尤其涉及的是一种文字 变形特效处理方法及装置。  The invention relates to the technical field of text transformation special effect information processing, in particular to a text deformation special effect processing method and device.
背景技术 Background technique
文字特效是通过调节文字的字体属性, 大小, 颜色, 对齐方式, 阴影, 变形效果, 轮廓, 填充等获取到的一种有图案意味或装饰意味的字体特效, 具有美观有趣、 醒目张扬等特性。  The text effect is a kind of graphic effect with decorative or decorative meaning obtained by adjusting the font attributes, size, color, alignment, shadow, deformation effect, contour, filling, etc. of the text. It has beautiful and interesting, eye-catching and other characteristics.
文字特效广泛应用于宣传、 广告、 商标、 标语、 黑板报、 企业名称、 会场布置、 展览会, 以及商品包装和装潢, 各类广告、 报刊杂志和书籍的 装帖上等, 越来越被大众喜欢。  Text effects are widely used in publicity, advertising, trademarks, slogans, blackboard newspapers, corporate names, venue layouts, exhibitions, and packaging and decoration of goods, advertisements for various types of advertisements, newspapers, magazines, and books. like.
当前常见的文字变形特效基本实现原理都是根据不同的变形效果, 人 工手动的建立数学模型, 然后程序根据建立好的数学模型生成相应的文字 变形特效。 如图 1 所示, 现有技术中文字变形特效流程是: 根据目标变形 形状, 人工建立数学模型, 然后用户输入相应的文字, 则根据建立好的数 学模型进行处理, 生成相应的文字变形特效。  The basic implementation principles of the current common text transformation effects are based on different deformation effects. The mathematical model is manually created by the manual, and then the program generates corresponding text transformation effects according to the established mathematical model. As shown in Fig. 1, the prior art text transformation special effect process is: manually constructing a mathematical model according to the target deformation shape, and then inputting the corresponding text by the user, and processing according to the established mathematical model to generate a corresponding text deformation special effect.
现有技术方案的主要缺点有: 1、 在软件开发中, 针对每一种文字变形 效果都要人工建立数学模型然后再实现, 美工还要制作相应的形状特效缩 略图, 人工成本大; 2、 用户只能使用软件提供的有限的变形效果, 文字变 形特效种类少, 不具有任意变形的功能。  The main shortcomings of the prior art solutions are as follows: 1. In software development, for each type of text deformation effect, a mathematical model must be manually established and then implemented, and the artist also needs to make a corresponding shape effect thumbnail, which is labor intensive; Users can only use the limited deformation effects provided by the software, and there are few types of text deformation effects, and they do not have any morphing function.
因此, 现有技术还有待于改进和发展。 技术问题 Therefore, the prior art has yet to be improved and developed. technical problem
本发明要解决的技术问题在于, 针对现有技术的上述缺陷, 提供一种 文字变形特效处理方法及装置, 其降低了文字变形特效时的人工成本, 并 使装置增加了可对文字进行任意变形的新功能, 为用户提供了方便。  The technical problem to be solved by the present invention is to provide a text deformation special effect processing method and device for the above-mentioned defects of the prior art, which reduces the labor cost when the character deformation special effect is performed, and increases the device to arbitrarily deform the text. The new features make it easy for users.
技术解决方案 Technical solution
本发明解决技术问题所采用的技术方案如下:  The technical solution adopted by the present invention to solve the technical problem is as follows:
一种文字变形特效处理方法, 其中, 包括:  A text deformation special effect processing method, which includes:
A、设置由一个初始规则矩形和多个控制点组成的文字变形设计器, 控 制点用于控制该文字变形设计器的矩形进行线性变形或二次型变形;  A. A text deformation designer consisting of an initial rule rectangle and a plurality of control points is set, and the control point is used to control the rectangle of the text deformation designer to perform linear deformation or quadratic deformation;
B、接收用户输入的需要变形的文字, 将该需要变形的文字转换为矢量 图形, 输入到文字变形设计器;  B. Receiving a text that needs to be deformed input by the user, converting the text that needs to be transformed into a vector graphic, and inputting it to the text deformation designer;
C、接收用户拖动文字变形设计器的控制点的操作指令, 根据文字变形 设计器动态建立的数学模型将文字矢量图形进行线性变形和 /或二次型变 形;  C. receiving an operation instruction of a user dragging a control point of the text deformation designer, and linearly deforming the text vector graphic and/or quadratic deformation according to a mathematical model dynamically created by the text deformation designer;
D、 文字变形设计器输出经过变形后的特效文字图形。  D. The text morphing designer outputs the deformed special effect text graphic.
所述的文字变形特效处理方法, 其中, 所述步骤 A还包括:  The text transformation special effect processing method, wherein the step A further includes:
Al、 当控制该文字变形设计器的矩形进行线性变形时, 指定初始矩形 的控制点为四个角顶点;  Al. When the rectangle controlling the text deformation designer is linearly deformed, the control point of the initial rectangle is specified as four corner vertices;
A2、 当控制该文字变形设计器的矩形进行二次型变形时, 指定初始矩 形的控制点为矩形四条边上的中点。  A2. When the rectangle controlling the text deformation designer is subjected to quadratic deformation, the control point specifying the initial rectangle is the midpoint on the four sides of the rectangle.
所述的文字变形特效处理方法, 其中, 所述的步骤 C还包括: 将用户的操作指令转化为文字变形参数, 该文字变形参数包括初始控 制点参数与矢量运动参数。 The text transformation special effect processing method, wherein the step C further comprises: converting a user operation instruction into a text deformation parameter, where the text deformation parameter includes initial control Point parameters and vector motion parameters.
所述的文字变形特效处理方法, 其中, 所述步骤 C还包括:  The text transformation special effect processing method, wherein the step C further includes:
C1、 文字变形设计器根据用户选择的变形类型和用户拉伸后所确定的 特效形状, 抽象出变换后各个控制点的坐标, 输出一个表示变形类型的参 数 E以及一个 2行 2列的矩阵, 记为:  C1, the text deformation designer abstracts the coordinates of each control point after the transformation according to the deformation type selected by the user and the special effect shape determined by the user after stretching, and outputs a parameter E indicating the deformation type and a matrix of 2 rows and 2 columns. Recorded as:
Point 1 Point2 Point 1 Point2
M  M
Point3 Point4 其中 E代表文字变形的类型, 取值为 1或者 2, 1代表变形为线性变形 的, 2代表变形为二次型变形; 矩阵 M的四个元素 Pointl , Point2 , Point3 , Point4分别对应 4个控制点的位置:对于线性变形分别依次对应矩形四个角 顶点的相对坐标, 对于二次型变形分别对应矩形中四条边上的中点的相对 坐标。  Point3 Point4 where E represents the type of text deformation, which takes 1 or 2, 1 represents deformation to linear deformation, 2 represents deformation to quadratic deformation; matrix M's four elements Pointl, Point2, Point3, Point4 correspond to 4 The position of the control points: the linear deformation corresponds to the relative coordinates of the four corner vertices of the rectangle, and the quadratic deformation corresponds to the relative coordinates of the midpoints on the four sides of the rectangle.
所述的文字变形特效处理方法, 其中, 所述的步骤 D还包括: 对生成的特效文字图形进行分割, 根据输入文字的个数生成独立的子 字块。  The text transformation special effect processing method, wherein the step D further comprises: dividing the generated special effect character graphic, and generating an independent sub-word block according to the number of input characters.
所述的文字变形特效处理方法, 其中, 所述步骤 D中的对生成的特效 文字图形进行分割, 根据输入文字的个数生成独立的子字块具体包括: The text transformation special effect processing method, wherein the generating the special effect text graphic in the step D, and generating the independent sub-word block according to the number of input characters specifically includes:
D1、根据字与字之间的空白间隙在图像行垂直投影上形成的空白间隔, 以及汉字间的间隔大于汉字内间隔这一规则, 对生成的特效文字图形进行 汉字的分割, 根据输入文字的个数分割生成独立的子字块。 D1, according to the blank space formed by the vertical gap between the word and the word on the vertical projection of the image line, and the rule that the interval between the Chinese characters is larger than the interval between the Chinese characters, the Chinese character is divided into the generated special effect text, according to the input text The number segmentation generates independent sub-word blocks.
一种文字变形特效处理装置, 其中, 包括:  A text deformation special effect processing device, comprising:
文字变形设计器创建模块, 用于设置由一个初始规则矩形和多个控制 点组成的文字变形设计器, 控制点用于控制该文字变形设计器的矩形进行 线性变形或二次型变形; a text morphing designer creating module for setting a text morphing designer consisting of an initial regular rectangle and a plurality of control points, the control point is used to control the rectangle of the text morphing designer Linear deformation or quadratic deformation;
接收与输入模块, 用于接收用户输入的需要变形的文字, 将该需要变 形的文字转换为矢量图形, 输入到文字变形设计器;  a receiving and input module, configured to receive a text input by the user that needs to be deformed, convert the text that needs to be deformed into a vector graphic, and input the text into a text deformation designer;
模型建立与特效变形模块, 用于接收用户拖动文字变形设计器的控制 点的操作指令, 根据文字变形设计器动态建立的数学模型将文字矢量图形 进行线性变形和 /或二次型变形;  The model establishing and special effect deformation module is configured to receive an operation instruction of a control point of the user dragging the text deformation designer, and linearly deform and/or quadratic deformation of the text vector graphic according to the mathematical model dynamically created by the text deformation designer;
输出模块, 用于通过文字变形设计器输出经过变形后的特效文字图形。 所述文字变形特效处理装置, 其中, 所述文字变形设计器创建模块包 括: 第一设置单元和第二设置单元;  The output module is configured to output the transformed special effect text graphic through the text deformation designer. The character deformation effect processing device, wherein the text deformation designer creation module comprises: a first setting unit and a second setting unit;
第一设置单元, 用于当控制该文字变形设计器的矩形进行线性变形时, 指定初始矩形的控制点为四个角顶点;  a first setting unit, configured to: when the rectangle controlling the text deformation designer is linearly deformed, the control point of the initial rectangle is specified as four corner vertices;
第二设置单元, 用于当控制该文字变形设计器的矩形进行二次型变形 时, 指定初始矩形的控制点为矩形四条边上的中点;  a second setting unit, configured to: when controlling a rectangle of the text deformation designer to perform quadratic deformation, designating a control point of the initial rectangle as a midpoint on four sides of the rectangle;
所述文字变形特效处理装置, 其中, 所述模型建立与特效变形模块包 括:  The character deformation special effect processing device, wherein the model creation and special effect deformation module comprises:
转化单元, 用于将用户的操作指令转化为文字变形参数, 该文字变形 参数包括初始控制点参数与矢量运动参数。  a conversion unit, configured to convert a user operation instruction into a text deformation parameter, where the text deformation parameter includes an initial control point parameter and a vector motion parameter.
所述文字变形特效处理装置, 其中, 所述输出模块包括:  The text transformation special effect processing device, wherein the output module comprises:
分割单元, 用于根据字与字之间的空白间隙在图像行垂直投影上形成 的空白间隔, 以及汉字间的间隔大于汉字内间隔这一规则, 对生成的特效 文字图形进行汉字的分割, 根据输入文字的个数分割生成独立的子字块。 有益效果 a dividing unit, configured to divide a blank space formed on a vertical projection of the image line according to a blank gap between the word and the word, and a rule that the interval between the Chinese characters is greater than the interval between the Chinese characters, and perform segmentation of the Chinese character on the generated special effect text graphic, according to The number of input characters is divided to generate independent sub-word blocks. Beneficial effect
本发明所提供的文字变形特效处理方法及装置, 由于采用了设置由一 个初始规则矩形和多个控制点组成的文字变形设计器, 控制点用于控制该 文字变形设计器的矩形进行线性变形或二次型变形; 接收用户输入的需要 变形的文字, 将该需要变形的文字转换为矢量图形, 输入到文字变形设计 器; 接收用户拖动文字变形设计器的控制点的操作指令, 根据文字变形设 计器动态建立的数学模型将文字矢量图形进行线性变形和 /或二次型变形; 文字变形设计器输出经过变形后的特效文字图形, 本发明实施例降低了完 成一种文字特效所要花费的人工成本, 同时降低了研发成本, 可以通过筒 单的调节矩阵参数即可实现不同的文字形状特效, 而不再需要针对特定的 特效进行研发。 并使装置增加了可对文字进行任意变形的新功能, 让用户 可以轻松的制作出自己喜欢的文字变形特效, 为用户提供了方便。  The text deformation special effect processing method and device provided by the invention adopts a text deformation designer which is composed of an initial regular rectangle and a plurality of control points, and the control point is used for controlling the linear deformation of the rectangle of the text deformation designer or Quadratic deformation; receiving text input by the user that needs to be deformed, converting the text to be deformed into a vector graphic, inputting to the text deformation designer; receiving an operation instruction of the user dragging the control point of the text deformation designer, according to the text deformation The mathematical model dynamically created by the designer linearly deforms the text vector graphics and/or quadratic deformation; the text deformation designer outputs the deformed special effect text graphics, and the embodiment of the invention reduces the labor required to complete a text special effect Cost, while reducing R&D costs, can achieve different text shape effects through the adjustment matrix parameters of the cartridge, instead of developing for specific effects. It also adds a new function that can arbitrarily transform the text, allowing users to easily create their own favorite text deformation effects, providing users with convenience.
附图说明 DRAWINGS
图 1是现有技术的文字变形处理流程图。  1 is a flow chart of a text transformation process of the prior art.
图 2为本发明实施例的文字变形特效处理方法流程图。 构示意图。  FIG. 2 is a flowchart of a method for processing a character deformation effect according to an embodiment of the present invention. Schematic diagram.
图 4 为本发明实施例的用来设计二次型变形特效的文字变形设计器的 结构示意图。  4 is a schematic structural view of a text deformation designer for designing a quadratic deformation effect according to an embodiment of the present invention.
图 5为本发明实施例的线性文字变形举例结构示意图。  FIG. 5 is a schematic structural diagram of an example of linear character deformation according to an embodiment of the present invention.
图 6a是本发明实施例中线型变化前的文字结构示意图、 图 6b是应用 线型变形特效后的文字结构示意图。 图 7是本发明实施例的二次型文字变形结构示意图。 FIG. 6a is a schematic diagram of the character structure before the line type change in the embodiment of the present invention, and FIG. 6b is a schematic diagram of the text structure after applying the line type deformation special effect. Fig. 7 is a schematic view showing the structure of a quadratic character deformation according to an embodiment of the present invention.
图 8a是本发明是一实施例中变化前的文字结构示意图、 图 8b是应用 二次型变形特效后的文字结构示意图。  Fig. 8a is a schematic view showing the structure of a character before the change in an embodiment, and Fig. 8b is a schematic view showing the structure of a character after applying a secondary deformation effect.
图 9是本发明实施例的文字变形特效处理装置原理框图  FIG. 9 is a schematic block diagram of a text deformation special effect processing apparatus according to an embodiment of the present invention;
本发明的实施方式 Embodiments of the invention
本发明所提供的文字变形特效处理方法及装置, 为使本发明的目的、 技术方案及优点更加清楚、 明确, 以下参照附图并举实施例对本发明进一 步详细说明。 应当理解, 此处所描述的具体实施例仅仅用以解释本发明, 并不用于限定本发明。  The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
本发明实施例提供的一种文字变形特效处理方法, 如图 2所示, 主要 包括以下步骤:  A text transformation special effect processing method provided by an embodiment of the present invention, as shown in FIG. 2, mainly includes the following steps:
步骤 S110、 设置由一个初始规则矩形和多个控制点组成的文字变形设 计器, 控制点用于控制该文字变形设计器的矩形进行线性变形或二次型变 形。  Step S110: Set a text deformation designer consisting of an initial rule rectangle and a plurality of control points, and the control point is used to control the rectangle of the text deformation designer to perform linear deformation or quadratic deformation.
其中, 设置该文字变形设计器提供两种工作模式, 一种用于设计线性 变形特效, 另一种则用来设计二次型变形特效。 本实施例中文字变形设计 器主要由一个初始规则矩形和四个控制点组成, 用户通过拖动 4个控制点, 设计出自己想要的目标形状。 文字变形设计器的设计如图 3和图 4所示。 当控制该文字变形设计器的矩形进行线性变形时, 指定初始矩形的控制点 为四个角顶点, 如图 3所示的 LT、 RT、 RB、 LB。 当控制该文字变形设计 器的矩形进行二次型变形时, 指定初始矩形的控制点为矩形四条边上的中 点, 如图 4所示的 MT、 RM、 MB、 LM。 图 3表示了用于设计线性变形特效的文字变形设计器的结构示意图, 通过该设计器用户可以设计线性变形特效; 其中, 线性变形特效是指文字 变形特效中, 所有的拉伸变形都是直线型的。 图 3 中的文字变形设置器由 一初始规则矩形 10和对应矩形四个角顶点 LT、 RT、 RB、 LB组成, 四个 角顶点 LT、 RT、 RB、 LB为该图 3的文字变形设计器的四个控制点, 指定 初始矩形四个控制点的初始坐标分别为 LT(-1, 1), RT(1, 1), RB(1, -1) ,LB(-1,Among them, setting the text deformation designer provides two working modes, one for designing linear deformation effects and the other for designing secondary deformation effects. In this embodiment, the text deformation designer is mainly composed of an initial regular rectangle and four control points, and the user designs the desired target shape by dragging four control points. The design of the text deformation designer is shown in Figures 3 and 4. When the rectangle that controls the text morphing designer is linearly deformed, the control point specifying the initial rectangle is four corner vertices, as shown in FIG. 3, LT, RT, RB, LB. When the rectangle of the text deformation designer is controlled to perform quadratic deformation, the control point of the designated initial rectangle is the midpoint on the four sides of the rectangle, as shown in FIG. 4, MT, RM, MB, LM. FIG. 3 is a schematic structural view of a text deformation designer for designing a linear deformation effect, by which a user can design a linear deformation effect; wherein, the linear deformation effect refers to a text deformation effect, and all the tensile deformations are straight lines. Type. The text deformation setter in FIG. 3 is composed of an initial regular rectangle 10 and four corner vertices LT, RT, RB, LB of the corresponding rectangle, and four corner vertices LT, RT, RB, LB are the text deformation designer of FIG. The four control points specify the initial coordinates of the four control points of the initial rectangle as LT(-1, 1), RT(1, 1), RB(1, -1), LB(-1,
-1)。 -1).
图 4展示了用来设计二次型变形特效的文字变形设计器的结构示意图, 通过该设计器用户可以设计二次型变形特效, 其中, 二次型变形特效是指: 文字变形特效中, 拉伸变形是抛物线的。 该图 4所示的实施例中四个控制 点定在矩形四条边的中上, 分别为: MT、 RM、 MB、 LM。 指定该初始矩 形四个控制点的初始坐标分别为 MT ( 0, 1 )、 RM ( 1 , 0 )、 MB (-1 , 0)、 LM (0, -1)。  Figure 4 shows the structure of the text deformation designer used to design the quadratic deformation effect. Through this designer, the user can design the quadratic deformation effect. Among them, the quadratic deformation effect refers to: The extension deformation is parabolic. In the embodiment shown in Fig. 4, four control points are set on the four sides of the rectangle, which are: MT, RM, MB, LM. The initial coordinates of the four control points specifying the initial rectangle are MT ( 0, 1 ), RM ( 1 , 0 ), MB (-1 , 0), LM (0, -1).
步骤 S120、 接收用户输入的需要变形的文字, 将该需要变形的文字转 换为矢量图形, 输入到文字变形设计器。  Step S120: Receive a text that needs to be deformed input by the user, convert the text that needs to be transformed into a vector graphic, and input it to the text deformation designer.
矢量图使用直线和曲线来描述图形, 这些图形的元素是一些点、 线、 矩形、 多边形、 圓和弧线等等。 本发明实施例中将需要变形的文字数据输 入到文字变形设计器中, 以使文字跟随文字变形设计器的变化而变形。  Vectors use lines and curves to describe graphics. The elements of these graphics are points, lines, rectangles, polygons, circles, and arcs, and so on. In the embodiment of the present invention, the text data to be deformed is input into the text deformation designer so that the text is deformed following the change of the text deformation designer.
步骤 S130、 接收用户拖动文字变形设计器的控制点的操作指令, 根据 文字变形设计器动态建立的数学模型将文字矢量图形进行线性变形和 /或二 次型变形。  Step S130: Receive an operation instruction that the user drags the control point of the text deformation designer, and linearly deforms the text vector graphic and/or the second-order deformation according to the mathematical model dynamically created by the text deformation designer.
本发明实施例中, 将用户的操作指令转化为文字变形参数, 该文字变 形参数包括初始控制点参数与矢量运动参数, 其中, 在线性变形时, 如前 所述的四个角顶点 LT、 RT、 RB、 LB为该图 3的文字变形设计器的四个控 制点,指定初始矩形四个控制点的初始坐标分别为 LT(-1, 1), RT(1, 1), RB(1, -1) ,LB(-1, -1), 表示为线性变形的初始控制点参数。 在二次型变形时, 其初 始控制点参数为指定该初始矩形四个控制点的初始坐标 MT( 0, 1 )、 RM( 1 ,In the embodiment of the present invention, the user's operation instruction is converted into a text deformation parameter, and the text is changed. The shape parameter includes an initial control point parameter and a vector motion parameter, wherein, in linear deformation, the four angular vertices LT, RT, RB, and LB as described above are the four control points of the text deformation designer of the FIG. The initial coordinates of the four control points of the specified initial rectangle are LT(-1, 1), RT(1, 1), RB(1, -1), LB(-1, -1), which are expressed as the initial of linear deformation. Control point parameters. In the quadratic deformation, the initial control point parameter is the initial coordinates MT( 0, 1 ) and RM( 1 , which specify the four control points of the initial rectangle.
0 )、 MB (-1 , 0)、 LM (0, 0), MB (-1, 0), LM (0,
类型和用户 拉伸后所确定的目标形状, 抽象出变换后各个控制点的坐标, 输出一个表 示变形类型的参数 E以及一个 2行 2列的矩阵(即矢量运动参数)记为:  Type and user The target shape determined after stretching, abstracting the coordinates of each control point after transformation, outputting a parameter E indicating the deformation type and a matrix of 2 rows and 2 columns (ie vector motion parameters) are recorded as:
( Point 1 Point  ( Point 1 Point
M= (公式 1 )。  M= (Formula 1).
Point 3 Point
Figure imgf000010_0001
其中参数 E代表文字变形的类型,取值为 1或者 2, 1代表为线性变形, 2代表为二次型变形。 矩阵 M 的四个元素 Pointl , Point2, Point3, Point4 分别对应 4个控制点的位置,对于线性变形分别依次对应图 3中的 LT, RT, LB, RB四个点的相对坐标, 对于二次型变形分别对应图 4中的 MT, RM, MB, LM四个点的相对坐标。
Point 3 Point
Figure imgf000010_0001
The parameter E represents the type of text deformation, and the value is 1 or 2, 1 represents linear deformation, and 2 represents quadratic deformation. The four elements of the matrix M, Pointl, Point2, Point3, and Point4, respectively correspond to the positions of the four control points, and the linear deformations correspond to the relative coordinates of the four points LT, RT, LB, and RB in Figure 3, respectively. The deformations correspond to the relative coordinates of the four points of MT, RM, MB, and LM in FIG. 4, respectively.
形 生成该 类文字变形特效的缩略图, 方便用户自定义文字变形特效模板。  The shape generates a thumbnail of the text deformation effect, which is convenient for the user to customize the text deformation effect template.
接上所述, 根据数学知识可以知道, 确定一条直线需要最少两个点, 确定一条二次抛物线则最少需要 3个点。  In addition, according to the mathematical knowledge, it is known that determining a straight line requires a minimum of two points, and determining a quadratic parabola requires a minimum of 3 points.
根据文字变形设计器输出的参数 E ,可以得知用户设计的文字变形特效 的类型, 即目标变形形状是线性的还是二次型的抛物线。 a) 第一种变形抛物线为直线的情况, 即文字变形设计器是进行线 性变形, 则该文字变形设计器矩形的四个角顶点为该四个控制点。 已知两 点可以确定一条直线, 因此根据四个顶点的数据就可以确定出文字变形的 抛物线模型的函数, 然后根据函数对文字的位置做相应处理就可生成最终 的文字变形特效。 具体如下所述。 According to the parameter E output by the text deformation designer, the type of text deformation effect designed by the user can be known, that is, whether the target deformation shape is linear or quadratic parabola. a) The first deformation parabola is a straight line, that is, the text deformation designer is the line For the sexual deformation, the four corner vertices of the text deformation designer rectangle are the four control points. It is known that two points can determine a straight line, so the function of the parabolic model of the text deformation can be determined according to the data of the four vertices, and then the final text deformation effect can be generated by correspondingly processing the position of the text according to the function. The details are as follows.
如图 5所示, 当控制该文字变形设计器的矩形进行线性变形时, 其控 制点为四个角顶点坐标, 并设置变化前的四个控制点位置为 a、 b、 c、 d; 变化后的文字变形设计器四个控制点位置为 a,、 b,、 c,、 d,。 当该边框的顶 点 b, c两个角的位置拖动至 b1, c1位置时, 可以看出此时边框形状已经发 生变化。 上面模型对应的文字变形特效如图 6a、 图 6b所示, 图 6a是变化 前的文字, 图 6b是应用变形特效后的文字。 As shown in FIG. 5, when the rectangle controlling the text deformation designer is linearly deformed, the control point is the coordinates of the four corner vertices, and the positions of the four control points before the change are set to a, b, c, d; After the text deformation designer, the four control points are located at a, b, c, d,. When the position of the two corners of the vertex b, c of the border is dragged to the position b 1 , c 1 , it can be seen that the shape of the border has changed. The text transformation effects corresponding to the above model are shown in Fig. 6a and Fig. 6b, Fig. 6a is the text before the change, and Fig. 6b is the text after the deformation effect is applied.
根据本发明实施例的文字变形设计器的变形处理, 可以得到图 5中变 化前的文字变形设计器矩形的四个角的坐标分别为 a(-l, 1), b(l, 1), c(l, -l), d(-l, -1), 殳图 5的线性文字变形例中 B点上升了 0.2个单位到 b', c点 上升了 1.1个单位到 c , 则变形后的矩阵可以表示为:  According to the deformation processing of the text deformation designer according to the embodiment of the present invention, the coordinates of the four corners of the character deformation designer rectangle before the change in FIG. 5 are respectively a(-l, 1), b(l, 1), c(l, -l), d(-l, -1), B In the linear text modification of Fig. 5, point B rises by 0.2 units to b', and point c rises by 1.1 units to c, then after deformation The matrix can be expressed as:
( (-1,1) (1,1.2) ( (-1,1) (1,1.2)
Figure imgf000011_0001
(-1,-1) (1, 0.3
Figure imgf000011_0001
(-1,-1) (1, 0.3
将变化后的四个控制点的坐标数据输出, 其中 Pointl , Point2, Point3 , Output the coordinate data of the changed four control points, where Pointl , Point2, Point3 ,
Point4分别代表变形后 a , b', c , d'的坐标。 根据已知两点确定一条直线, 设直线方程 y = kx + h, 则将 Pointl (即 a的坐标 ( x,y ) =(-1,1)), Point2(b' 的 坐标(x,y ) =(l , 1.2))两个点代入直线方程 y = kx + h, 如下: Point4 represents the coordinates of a, b', c, d' after deformation. According to the known two points to determine a straight line, let the line equation y = kx + h, then Pointl (ie the coordinate of a (x, y) = (-1, 1)), Point2 (the coordinates of b' ( x , y ) = (l , 1.2)) Two points are substituted into the linear equation y = kx + h, as follows:
l = k * (-l) + h  l = k * (-l) + h
l .2 = k * l + h  l .2 = k * l + h
求解得: k=0.5 , h=0.7。 则可确定出变形后 a,b,这条直线的方程 y = 0.5x + 0.7。 Solved: k = 0.5, h = 0.7. Then we can determine a, b after deformation, the equation of this line is y = 0.5x + 0.7.
同理将直线 b,c,、 直线 c,d,、 直线 d, a,中各直线的两端点坐标依次代 入直线方程: y = kx + h (其中, x,y为坐标值数据), 求解依次得出直线 a,b, 的直线方程函数、 直线 b'c' 的直线方程函数、 直线 c'd' 直线方程函数、 直线 d, a,的直线方程函数。 这样可以建立一个从区域 abed到区域 a,b,c,d, 的线性映射关系。  Similarly, the coordinates of the two ends of the straight line b, c, the straight line c, d, and the straight line d, a are sequentially substituted into the linear equation: y = kx + h (where x, y are coordinate value data), The linear equation function of the straight line a, b, the linear equation function of the straight line b'c', the linear equation function of the straight line c'd', and the linear equation function of the straight line d, a are obtained in sequence. This creates a linear mapping from the area abed to the areas a, b, c, d.
b) 第二种抛物线为 2次抛物线的情况。  b) The case where the second parabola is a 2 parabola.
当文字变形设计器是进行二次型变形时, 如图 7所示, 设该文字变形 设计器初始规则矩形四条边上的中点为该四个控制点; 并设置变化前的四 个控制点位置为6、 f、 g、 h; 变化后的文字变形设计器四个控制点位置为 e,、 f,、 g,、 h,。  When the text deformation designer performs the quadratic deformation, as shown in FIG. 7, the midpoint on the four sides of the initial regular rectangle of the text deformation designer is the four control points; and the four control points before the change are set. The position is 6, f, g, h; the changed text deformation designer has four control point positions e, f, g, h.
本发明中的二次抛物线均使用抛物线, 已知三个点可以确定一条抛物 线, 因此根据文字变形特效设计器输出的四个控制点的坐标加上四个顶点 (在二次型变形中, 四个定点的坐标不动) 的数据就可以确定出文字变形 抛物线的函数, 然后根据函数对文字的位置做相应处理就可生成最终的文 字变形特效。  The quadratic parabola in the present invention uses a parabola. It is known that three points can determine a parabola. Therefore, according to the coordinates of the four control points output by the text deformation effect designer, four vertices are added (in the quadratic deformation, four The data of a fixed point coordinate can determine the function of the text transformation parabola, and then the corresponding text transformation effect can be generated according to the function of the function.
如图 7所示, 设默认文字的边框矩形的四个角, 分别记做 a , b , c , d。 而变化前的四个控制点位置为 e、 f、 g、 h; 变化后的文字变形设计器四个 控制点位置为 e,、 f,、 g,、 h,; 当该边框上各边的中点6、 f、 g、 h被拖 动至 e,、 f,、 g,、 h,时, 该模型对应的文字变形特效如图 8a、 图 8b所示, 图 8a是变化前的文字, 图 8b是应用文字特效后的文字。  As shown in Figure 7, the four corners of the border rectangle of the default text are set as a , b , c , d respectively. The positions of the four control points before the change are e, f, g, h; the positions of the four control points of the changed text deformation designer are e, f, g, h,; When the midpoints 6, f, g, and h are dragged to e, f, g, and h, the text transformation effects corresponding to the model are shown in Fig. 8a and Fig. 8b, and Fig. 8a is the text before the change. Figure 8b is the text after applying the text effect.
根据本发明实施例的文字变形设计器的变形处理, 可以得到四个角的 坐标分别为 a(-l, 1), b(l, 1), c(l,-l), d(-l,-l)。 而图 7中变化前的四个控制点 中点 e、 f、 g、 h坐标分别设为 e (0, 1)、 f (l, 0)、 g(-l, 0)、 h(0, -1): 殳图 8的线性文字变形例子中 e、 g两个点向内压缩了 0.3个单位; f、 h 两点向外扩张了 0.2个单位, 则变形后的矩阵可以表示为: According to the deformation processing of the text deformation designer according to the embodiment of the present invention, four corners can be obtained. The coordinates are a(-l, 1), b(l, 1), c(l, -l), d(-l, -l). The coordinates of the e, f, g, and h points of the four control points before the change in Fig. 7 are respectively set to e (0, 1), f (l, 0), g (-l, 0), h (0, -1): In the linear text transformation example of Fig. 8, two points e and g are compressed inward by 0.3 units; f and h are expanded outward by 0.2 units, and the deformed matrix can be expressed as:
( Point 1 Point 2 ( (0,0.7) (1.2,0)  ( Point 1 Point 2 ( (0,0.7) (1.2,0)
M=  M=
Point 3 Point (0,-0.7) (-1.2,0) 其中该实施例中 Pointl , Point2, Point3, Point4分别代表变形后 e,, f,, g,, h,的坐标, 设直线方程 y = kx + h, 设曲线方程为: y = ίχ2 + jx + q (公式 3)。 Point 3 Point (0,-0.7) (-1.2,0) In this embodiment, Pointl, Point2, Point3, and Point4 represent the coordinates of e, f, g, and h after deformation, respectively. Let the linear equation y = Kx + h, Let the curve equation be: y = ίχ 2 + jx + q (Equation 3).
如图 8所示, 则将 a, e,, b三个点的坐标值 a(-l, l),e,(0, 0.7 ) ,b(l, 1) 代入曲线方程(公式 3),如下: l = ix(-iy + jx(-l + q; 0.7 = x02 + jxO + ^: 1 = X I2 + j l + q; As shown in Fig. 8, the coordinate values a(-l, l), e, (0, 0.7), b(l, 1) of the three points a, e, and b are substituted into the curve equation (formula 3). As follows: l = ix(-iy + jx(-l + q; 0.7 = x0 2 + jxO + ^: 1 = XI 2 + jl + q;
求解得: i=0.3, j=0, q=0.7则可确定出变形后 a, e,, b这条抛物线的 曲线方程为: y = 0.3;c2+0x;c + 0.7。 Solving: i=0.3, j=0, q=0.7, then the curve equation of the parabola a, e, and b after deformation is determined as: y = 0.3; c 2 +0x; c + 0.7.
同理,将抛物线 b f,c,抛物线 c g'd和抛物线 d h'a中各抛物线的两个端 点和一个中点的坐标值代入曲线方程(公式 3), 分别求解 i, j, q,可以计算 出其他几条抛物线的方程。 这样可以建立一个从区域 efgh到区域 e, f, g, h, 变换后的区域的映射模型。  Similarly, the coordinate values of the two endpoints and one midpoint of each parabola in the parabola bf, c, parabola c g'd and parabola d h'a are substituted into the curve equation (Equation 3) to solve i, j, q, respectively. You can calculate the equations for several other parabolas. This creates a mapping model from the region efgh to the region e, f, g, h, transformed region.
步骤 S140、 文字变形设计器输出经过变形后的特效文字图形。  Step S140: The text deformation designer outputs the transformed special effect text graphic.
由上可见, 本发明实施例中线性变形或二次型变形两种文字变形特效 的模型都已建立起来了, 接下来借助 Windows系统提供的 GDI ( GraphicsDevicelnterface图形设备接口) +图形库, 将文字存入 It can be seen from the above that in the embodiment of the present invention, the models of linear deformation or quadratic deformation have been established, and then the GDI provided by the Windows system is used. (GraphicsDevicelnterface graphics device interface) + graphics library, save text
GraphicsPa th( windows图形库中的一个类,用于记录用户绘制的所有过程, 可以提供一次性绘制出所有内容的功能)中,其中, Graph icsPath是 windows 图形库中的一个类, 用于记录用户绘制的所有过程, 可以提供一次性绘制 出所有内容的功能。 然后可以获取到 PathDa ta数据, 其数据结构为记录文 字的控制点的集合, 其中 PathData是 windows图形库中的一个辅助类, 用 于记录 Graphicspath中的数据。 然后 ^据建立起的线性映射关系, 经过计 算就可以得到某一点在变换后的位置, 移动完成所有的点以后, 就得到了 目标文字变形特效。 GraphicsPa th (a class in the Windows graphics library that records all the processes that the user draws, can provide the ability to draw all the content at once), where Graph icsPath is a class in the Windows graphics library that is used to record users. All the processes you draw can provide the ability to draw all the content at once. Then, the PathDa ta data can be obtained, and the data structure is a collection of control points of the recorded text, where PathData is a helper class in the Windows graphics library, used to record the data in the Graphicspath. Then, according to the established linear mapping relationship, after calculation, the position of a certain point in the transformation can be obtained. After all the points are completed, the target text deformation effect is obtained.
本步骤 S140中, 还包括对生成的特效文字图形进行分割, 根据输入文 字的个数生成独立的子字块, 在具体实施时, 可以根据字与字之间的空白 间隙在图像行垂直投影上形成的空白间隔, 以及汉字间的间隔大于汉字内 间隔这一规则, 对生成的特效文字图形进行汉字的分割, 根据输入文字的 个数分割生成独立的子字块。  In step S140, the method further comprises: dividing the generated special effect character graphic, and generating independent sub-word blocks according to the number of input characters, and in the specific implementation, vertically projecting on the image line according to a blank gap between the words and the words The formed blank interval, and the interval between the Chinese characters are larger than the interval between the Chinese characters, and the generated special effect character graphics are divided into Chinese characters, and the independent sub-word blocks are generated according to the number of input characters.
其中, 字分割是从分割出的文本图像行中将单个的字符图像分割出 来。 字分割的正确与否直接影响识别结果, 下面以单个的汉字分割为例来 说明:  Among them, word segmentation is to separate a single character image from the segmented text image lines. The correctness of the word segmentation directly affects the recognition result. The following is an example of a single Chinese character segmentation:
譬如、 可以借助汉字图像行分割的思想, 来确定字分割的主要方法: 利用字与字之间的空白间隙在图像行垂直投影上形成的空白间隔将单个 的字符图像分割出来。  For example, the main method of word segmentation can be determined by means of the idea of segmentation of Chinese character image lines: a single character image is segmented by a blank space formed by the vertical gap between the word and the word on the vertical projection of the image line.
而事实上, 分析图像行的垂直投影可以发现, 垂直投影上的空白间隔 部分不仅没有行与行之间的空白间隔部分宽, 而且分布也不均匀。 是因为 在汉字文本中一般汉字间距远不如行间距明显, 同时汉字中有相当数量汉 字是左、 右结构或左、 中、 右结构的, 这些汉字图像的垂直投影在一个单 字的内部也会出现空白间隙, 使得文本汉字的字分割比行分割困难。 In fact, by analyzing the vertical projection of the image line, it can be found that the blank space portion on the vertical projection is not only not widened by the blank space between the lines, but also unevenly distributed. Because of In Chinese texts, the spacing of Chinese characters is far less obvious than that of line spacing. At the same time, there are a considerable number of Chinese characters in Chinese characters that are left and right structures or left, center, and right structures. The vertical projection of these Chinese characters will also have blank gaps inside a single word. , making word segmentation of text Chinese characters more difficult than row segmentation.
为了解决这个问题, 可以利用汉字间的间隔一般大于汉字内间隔这一 特点先进行汉字的粗分割, 再根据汉字基本是个方块图形这一事实进行细 分割。  In order to solve this problem, it is possible to use the feature that the interval between Chinese characters is generally larger than the interval between Chinese characters to first perform coarse segmentation of Chinese characters, and then to perform fine segmentation based on the fact that Chinese characters are basically square graphics.
具体实现为: 根据汉字的行分割, 可以获得汉字的高度信息, 从而可 以估计出汉字的基本宽度;对粗分割出的每个汉字, 以此宽度信息进行衡 量, 以粗分割的起始位置为出发点, 向左右两方向进行搜索, 对起始位置 进行细微的调整, 从而使得字的分割更准确。 这种方法不仅可以保证单个 汉字的内部结构不被分离, 而且还避免了切除汉字的边缘, 其分割结果基 本提取出了完整的汉字, 消除了笔划的误切除。 这样, 对生成的特效文字 图形进行分割成多个独立的子字块再通过文字变形设计器输出经过变形 后的特效文字图形。  The specific implementation is as follows: According to the line segmentation of Chinese characters, the height information of the Chinese characters can be obtained, so that the basic width of the Chinese characters can be estimated; for each of the roughly divided Chinese characters, the width information is measured, and the starting position of the coarse segmentation is Starting point, search in the left and right directions, and make a slight adjustment to the starting position, so that the word segmentation is more accurate. This method not only ensures that the internal structure of a single Chinese character is not separated, but also avoids the edge of the Chinese character. The segmentation result basically extracts the complete Chinese character and eliminates the false cut of the stroke. In this way, the generated special effect text graphic is divided into a plurality of independent sub-word blocks, and the transformed special effect text graphic is output through the text deformation designer.
由上可见, 本发明实施例降低了完成一种文字特效所要花费的人工成 本, 同时降^^了研发成本, 可以通过筒单的调节矩阵参数即可实现不同的 文字形状特效, 而不再需要针对特定的特效进行研发。 并使装置增加了可 对文字进行任意变形的新功能, 并且实现对生成的字块对每个字形进行分 割, 每个字形形状连贯, 并且可以自由移动编辑, 让用户可以轻松的制作 出自己喜欢的文字变形特效, 为用户提供了方便, 提升了用户体验。  It can be seen from the above that the embodiment of the present invention reduces the labor cost for completing a text special effect, and at the same time reduces the research and development cost, and can realize different text shape special effects by adjusting the matrix parameters of the single tube, and no longer need Develop for specific effects. And the device adds a new function that can arbitrarily deform the text, and realizes segmentation of each glyph for the generated block, each glyph shape is coherent, and can be freely moved and edited, so that the user can easily make a favorite The text deformation effects provide convenience for the user and enhance the user experience.
基于上述实施例的文字变形特效处理方法, 本发明实施例还提供了一 种文字变形特效处理装置, 如图 9所示, 包括: 文字变形设计器创建模块 910 ,用于设置由一个初始规则矩形和多个控 制点组成的文字变形设计器, 控制点用于控制该文字变形设计器的矩形进 行线性变形或二次型变形; 具体如上所述。 Based on the text transformation special effect processing method of the above embodiment, the embodiment of the present invention further provides a text transformation special effect processing device, as shown in FIG. 9, comprising: a text deformation designer creating module 910, configured to set a text deformation designer consisting of an initial regular rectangle and a plurality of control points, wherein the control point is used to control the rectangle of the text deformation designer to perform linear deformation or quadratic deformation; As mentioned above.
接收与输入模块 920, 用于接收用户输入的需要变形的文字, 将该需要 变形的文字转换为矢量图形, 输入到文字变形设计器; 具体如上所述。  The receiving and inputting module 920 is configured to receive a text that needs to be deformed by the user, convert the text that needs to be transformed into a vector graphic, and input the text into a text deformation designer; as described above.
模型建立与特效变形模块 930,用于接收用户拖动文字变形设计器的控 制点的操作指令, 根据文字变形设计器动态建立的数学模型将文字矢量图 形进行线性变形和 /或二次型变形; 具体如上所述。  The model establishing and special effect deformation module 930 is configured to receive an operation instruction of a user dragging a control point of the text deformation designer, and linearly deform the text vector graphic and/or quadratic deformation according to a mathematical model dynamically created by the text deformation designer; Specifically as described above.
输出模块 940,用于通过文字变形设计器输出经过变形后的特效文字图 形; 具体如上所述。  The output module 940 is configured to output the transformed special effect text graphic through the text deformation designer; as described above.
其中, 所述文字变形设计器创建模块 910 包括: 第一设置单元和第二 设置单元;  The text deformation designer creating module 910 includes: a first setting unit and a second setting unit;
第一设置单元, 用于当控制该文字变形设计器的矩形进行线性变形时, 指定初始矩形的控制点为四个角顶点; 具体如上所述。  The first setting unit is configured to: when the rectangle controlling the text deformation designer is linearly deformed, the control point of the initial rectangle is specified as four corner vertices; as described above.
第二设置单元, 用于当控制该文字变形设计器的矩形进行二次型变形 时, 指定初始矩形的控制点为矩形四条边上的中点; 具体如上所述。  And a second setting unit, configured to: when the rectangle controlling the text deformation designer is subjected to quadratic deformation, the control point of the initial rectangle is specified as a midpoint on the four sides of the rectangle; as described above.
其中, 所述模型建立与特效变形模块 930包括:  The model establishment and special effect deformation module 930 includes:
转化单元, 用于将用户的操作指令转化为文字变形参数, 该文字变形 参数包括初始控制点参数与矢量运动参数; 具体如上所述。  a conversion unit, configured to convert a user operation instruction into a text deformation parameter, where the text deformation parameter includes an initial control point parameter and a vector motion parameter; as described above.
所述文字变形特效处理装置, 其中, 所述输出模块包括: 分割单元, 用于根据字与字之间的空白间隙在图像行垂直投影上形成 的空白间隔, 以及汉字间的间隔大于汉字内间隔这一规则, 对生成的特效 文字图形进行汉字的分割, 根据输入文字的个数分割生成独立的子字块。 The text transformation special effect processing device, wherein the output module comprises: a dividing unit, configured to divide a blank space formed on a vertical projection of the image line according to a blank gap between the word and the word, and a rule that the interval between the Chinese characters is greater than the interval between the Chinese characters, and perform segmentation of the Chinese character on the generated special effect text graphic, according to The number of input characters is divided to generate independent sub-word blocks.
综上所述, 本发明所提供的文字变形特效处理方法及装置, 由于采用 了设置由一个初始规则矩形和四个控制点组成的文字变形设计器, 四个控 制点用于控制该文字变形设计器的矩形进行线性变形或二次型变形; 接收 用户的操作指令拖动文字变形设计器的四个控制点, 将文字变形设计器进 行线性变形和 /或二次型变形; 根据文字变形设计器的进行线性变形和 /或二 次型变形动态建立数学模型, 并进行处理自动将用户输入的需要变形的文 字生成为变形特效文字, 本发明实施例降低了完成一种文字特效所要花费 的人工成本, 同时降低了研发成本, 可以通过筒单的调节矩阵参数即可实 现不同的文字形状特效, 而不再需要针对特定的特效进行研发。 并使装置 增加了可对文字进行任意变形的新功能, 让用户可以轻 的制作出自己喜 欢的文字变形特效, 为用户提供了方便。  In summary, the text deformation special effect processing method and device provided by the present invention adopts a text deformation designer composed of an initial regular rectangle and four control points, and four control points are used to control the text deformation design. The rectangle of the device is linearly deformed or quadratic-shaped; receiving the user's operation instruction to drag the four control points of the text deformation designer, and linearly deforming and/or quadratic deformation of the text deformation designer; The mathematical model is dynamically established by linear deformation and/or quadratic deformation, and the processing automatically generates the text that needs to be deformed input by the user into deformation special effect text, and the embodiment of the invention reduces the labor cost for completing a text special effect. At the same time, the R&D cost is reduced, and different text shape effects can be realized by adjusting the matrix parameters of the cartridge, and it is no longer necessary to develop for specific effects. And the device has added a new function that can arbitrarily deform the text, so that users can easily create their own favorite text deformation effects, which is convenient for the user.
应当理解的是, 本发明的应用不限于上述的举例, 对本领域普通技术 人员来说, 可以根据上述说明加以改进或变换, 所有这些改进和变换都应 属于本发明所附权利要求的保护范围。  It is to be understood that the application of the present invention is not limited to the above-described examples, and those skilled in the art can make modifications and changes in accordance with the above description, all of which are within the scope of the appended claims.

Claims

权 利 要 求 书 Claim
1、 一种文字变形特效处理方法, 其特征在于, 包括: A method for processing a character deformation special effect, comprising:
A、设置包括一个初始规则矩形和多个控制点的文字变形设计器, 控制 点用于控制该文字变形设计器的矩形进行线性变形或二次型变形;  A. setting a text deformation designer including an initial rule rectangle and a plurality of control points, wherein the control point is used to control the rectangle of the text deformation designer to perform linear deformation or quadratic deformation;
B、接收用户输入的需要变形的文字, 将该需要变形的文字转换为像素 矩阵, 输入到文字变形设计器;  B. Receiving a text that needs to be deformed input by the user, converting the character that needs to be transformed into a pixel matrix, and inputting it to the text deformation designer;
C、接收用户拖动文字变形设计器的控制点的操作指令, 根据文字变形 设计器动态建立的数学模型将文字矢量图形进行线性变形和 /或二次型变 形;  C. receiving an operation instruction of a user dragging a control point of the text deformation designer, and linearly deforming the text vector graphic and/or quadratic deformation according to a mathematical model dynamically created by the text deformation designer;
D、 文字变形设计器输出经过变形后的特效文字图形。  D. The text morphing designer outputs the deformed special effect text graphic.
2、 根据权利要求 1所述的文字变形特效处理方法, 其特征在于, 所述 步骤 A还包括:  The method of processing a character deformation effect according to claim 1, wherein the step A further comprises:
Al、 当控制该文字变形设计器的矩形进行线性变形时, 指定初始矩形 的控制点为四个角顶点;  Al. When the rectangle controlling the text deformation designer is linearly deformed, the control point of the initial rectangle is specified as four corner vertices;
A2、 当控制该文字变形设计器的矩形进行二次型变形时, 指定初始矩 形的控制点为矩形四条边上的中点。  A2. When the rectangle controlling the text deformation designer is subjected to quadratic deformation, the control point specifying the initial rectangle is the midpoint on the four sides of the rectangle.
3、 根据权利要求 1 所述的文字变形特效处理方法, 其特在在于, 所 述的步骤 C还包括:  3. The text transformation effect processing method according to claim 1, wherein the step C further comprises:
将用户的操作指令转化为文字变形参数, 该文字变形参数包括初始控 制点参数与矢量运动参数。  The user's operation instructions are converted into text deformation parameters, which include initial control point parameters and vector motion parameters.
4、 根据权利要求 3所述的文字变形特效处理方法, 其特征在于, 所述 步骤 C还包括: CI、 文字变形设计器根据用户选择的变形类型和用户拉伸后所确定的 特效形状, 抽象出变换后各个控制点的坐标, 输出一个表示变形类型的参 数 E以及一个 2行 2列的矩阵, 记为: The method for processing a character deformation effect according to claim 3, wherein the step C further comprises: CI, text deformation designer abstracts the coordinates of each control point after transformation according to the deformation type selected by the user and the special effect shape determined by the user after stretching, and outputs a parameter E indicating the deformation type and a matrix of 2 rows and 2 columns. Recorded as:
Point 1 Point2 Point 1 Point2
M  M
Point3 Point4 其中 E代表文字变形的类型,取值为 1或者 2, 1代表变形为线性变形, 2代表变形为二次型变形;矩阵 M的四个元素 Pointl , Point2, Point3 , Point4 分别对应 4个控制点的位置: 对于线性变形分别依次对应矩形四个角顶点 的相对坐标, 对于二次型变形分别对应矩形中四条边上的中点的相对坐标。  Point3 Point4 where E represents the type of text deformation, the value is 1 or 2, 1 represents deformation to linear deformation, 2 represents deformation to quadratic deformation; matrix M's four elements Pointl, Point2, Point3, Point4 correspond to 4 The position of the control point: For the linear deformation, the relative coordinates of the four corner vertices of the rectangle are sequentially corresponding, and the quadratic deformation respectively corresponds to the relative coordinates of the midpoints of the four sides of the rectangle.
5、 根据权利要求 1 所述的文字变形特效处理方法, 其特征在于, 所 述的步骤 D还包括:  The method for processing a character deformation effect according to claim 1, wherein the step D further comprises:
对生成的特效文字图形进行分割, 根据输入文字的个数生成独立的子 字块。  The generated special effect text graphics are divided, and independent sub-word blocks are generated according to the number of input characters.
6、 根据权利要求 5所述的文字变形特效处理方法, 其特征在于, 所述 步骤 D中的对生成的特效文字图形进行分割, 根据输入文字的个数生成独 立的子字块具体包括:  The character deformation effect processing method according to claim 5, wherein the generating the special effect character graphic in the step D, and generating the independent sub-word block according to the number of the input characters comprises:
D1、根据字与字之间的空白间隙在图像行垂直投影上形成的空白间隔, 以及汉字间的间隔大于汉字内间隔这一规则, 对生成的特效文字图形进行 汉字的分割, 根据输入文字的个数分割生成独立的子字块。  D1, according to the blank space formed by the vertical gap between the word and the word on the vertical projection of the image line, and the rule that the interval between the Chinese characters is larger than the interval between the Chinese characters, the Chinese character is divided into the generated special effect text, according to the input text The number segmentation generates independent sub-word blocks.
7、 一种文字变形特效处理装置, 其特征在于, 包括:  7. A text transformation special effect processing device, comprising:
文字变形设计器创建模块, 用于设置包括一个初始规则矩形和多个控 制点组成的文字变形设计器, 控制点用于控制该文字变形设计器的矩形进 行线性变形或二次型变形; 接收与输入模块, 用于接收用户输入的需要变形的文字, 将该需要变 形的文字转换为图形像素矩阵, 输入到文字变形设计器; a text deformation designer creating module, configured to set a text deformation designer comprising an initial rule rectangle and a plurality of control points, wherein the control point is used to control the rectangle of the text deformation designer to perform linear deformation or quadratic deformation; a receiving and input module, configured to receive a text input by the user that needs to be deformed, convert the text that needs to be transformed into a graphic pixel matrix, and input the text to the text deformation designer;
模型建立与特效变形模块, 用于接收用户拖动文字变形设计器的控制 点的操作指令, 根据文字变形设计器动态建立的数学模型将文字矢量图形 进行线性变形和 /或二次型变形;  The model establishing and special effect deformation module is configured to receive an operation instruction of a control point of the user dragging the text deformation designer, and linearly deform and/or quadratic deformation of the text vector graphic according to the mathematical model dynamically created by the text deformation designer;
输出模块, 用于通过文字变形设计器输出经过变形后的特效文字图形。 The output module is configured to output the transformed special effect text graphic through the text deformation designer.
8、 根据权利要求 7所述文字变形特效处理装置, 其特征在于, 所述文 字变形设计器创建模块包括: 第一设置单元和第二设置单元; The text transformation effect processing device according to claim 7, wherein the text deformation designer creation module comprises: a first setting unit and a second setting unit;
第一设置单元, 用于当控制该文字变形设计器的矩形进行线性变形时, 指定初始矩形的控制点为四个角顶点;  a first setting unit, configured to: when the rectangle controlling the text deformation designer is linearly deformed, the control point of the initial rectangle is specified as four corner vertices;
第二设置单元, 用于当控制该文字变形设计器的矩形进行二次型变形 时, 指定初始矩形的控制点为矩形四条边上的中点;  a second setting unit, configured to: when controlling a rectangle of the text deformation designer to perform quadratic deformation, designating a control point of the initial rectangle as a midpoint on four sides of the rectangle;
9、 根据权利要求 7所述文字变形特效处理装置, 其特征在于, 所述模 型建立与特效变形模块包括:  9. The text transformation special effect processing apparatus according to claim 7, wherein the model establishing and special effect deformation module comprises:
转化单元, 用于将用户的操作指令转化为文字变形参数, 该文字变形 参数包括初始控制点参数与矢量运动参数。  a conversion unit, configured to convert a user operation instruction into a text deformation parameter, where the text deformation parameter includes an initial control point parameter and a vector motion parameter.
10、 根据权利要求 7所述文字变形特效处理装置, 其特征在于, 所述 输出模块包括:  10. The text transformation special effect processing apparatus according to claim 7, wherein the output module comprises:
分割单元, 用于根据字与字之间的空白间隙在图像行垂直投影上形成 的空白间隔, 以及汉字间的间隔大于汉字内间隔这一规则, 对生成的特效 文字图形进行汉字的分割, 根据输入文字的个数分割生成独立的子字块。  a dividing unit, configured to divide a blank space formed on a vertical projection of the image line according to a blank gap between the word and the word, and a rule that the interval between the Chinese characters is greater than the interval between the Chinese characters, and perform segmentation of the Chinese character on the generated special effect text graphic, according to The number of input characters is divided to generate independent sub-word blocks.
PCT/CN2011/084304 2011-05-19 2011-12-20 Method and apparatus for processing character deformation special effect WO2012155510A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2011101305446A CN102156688B (en) 2011-05-19 2011-05-19 Character transforming effect processing method and device
CN201110130544.6 2011-05-19

Publications (1)

Publication Number Publication Date
WO2012155510A1 true WO2012155510A1 (en) 2012-11-22

Family

ID=44438190

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/084304 WO2012155510A1 (en) 2011-05-19 2011-12-20 Method and apparatus for processing character deformation special effect

Country Status (2)

Country Link
CN (1) CN102156688B (en)
WO (1) WO2012155510A1 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102156688B (en) * 2011-05-19 2012-12-12 深圳市万兴软件有限公司 Character transforming effect processing method and device
CN102523388B (en) * 2011-12-22 2014-06-18 深圳万兴信息科技股份有限公司 Method and system for adding cloud special effects into videos
CN102819325A (en) * 2012-07-21 2012-12-12 上海量明科技发展有限公司 Input method and system for obtaining a plurality of character presenting effects
CN103824310B (en) * 2014-03-03 2016-08-17 网易(杭州)网络有限公司 A kind of method and device generating light literal with special effect
TWI575389B (en) * 2015-06-10 2017-03-21 文鼎科技開發股份有限公司 A font deformation method
CN106503713A (en) * 2016-11-16 2017-03-15 广西大学 One kind is based on thick periphery feature character recognition method
CN110134921B (en) * 2018-02-09 2020-12-04 北大方正集团有限公司 Method and device for checking whether font outline is deformed
CN109558195B (en) * 2018-11-12 2021-07-06 厦门欢乐逛科技股份有限公司 Font special effect adjusting method, medium, computer equipment and device
JP7171145B2 (en) * 2019-02-13 2022-11-15 株式会社ワコム Character data generator, method and program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1154519A (en) * 1995-10-12 1997-07-16 夏普公司 Character pattern generator
JP2010000547A (en) * 2008-06-18 2010-01-07 Universal Shipbuilding Corp Creation method and printing method of printing data
US20100302594A1 (en) * 2009-06-01 2010-12-02 Xerox Corporation Real-time image personalization
CN102156688A (en) * 2011-05-19 2011-08-17 深圳市万兴软件有限公司 Character transforming effect processing method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100440115C (en) * 2006-01-26 2008-12-03 致伸科技股份有限公司 Hand-held electronic installation
CN100541534C (en) * 2007-03-30 2009-09-16 腾讯科技(深圳)有限公司 A kind of picture special effect processing method and system
CN101072289B (en) * 2007-06-11 2010-06-02 北京中星微电子有限公司 Automatic generating method and device for image special effect
CN101197948A (en) * 2007-12-04 2008-06-11 北京工业大学 Method for implementing multiple special effects of icon and subtitling in video

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1154519A (en) * 1995-10-12 1997-07-16 夏普公司 Character pattern generator
JP2010000547A (en) * 2008-06-18 2010-01-07 Universal Shipbuilding Corp Creation method and printing method of printing data
US20100302594A1 (en) * 2009-06-01 2010-12-02 Xerox Corporation Real-time image personalization
CN102156688A (en) * 2011-05-19 2011-08-17 深圳市万兴软件有限公司 Character transforming effect processing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
DING, YOUHE: "Implementation of Specific Text Using VC++", JOURNAL OF COMPUTER APPLICATIONS, vol. 21, no. 8, August 2001 (2001-08-01), pages 93 - 94 *
LI, YING ET AL.: "Preprocessing algorithms for Chinese handwriting recognition", JOURNAL OF SHANDONG UNIVERSITY (ENGINEERING SCIENCE), vol. 37, no. 2, April 2007 (2007-04-01), pages 80 - 83 *

Also Published As

Publication number Publication date
CN102156688B (en) 2012-12-12
CN102156688A (en) 2011-08-17

Similar Documents

Publication Publication Date Title
WO2012155510A1 (en) Method and apparatus for processing character deformation special effect
US11328523B2 (en) Image composites using a generative neural network
US9734613B2 (en) Apparatus and method for generating facial composite image, recording medium for performing the method
WO2018040511A1 (en) Method for implementing conversion of two-dimensional image to three-dimensional scene based on ar
CN101156175B (en) Depth image-based representation method for 3d object, modeling method and apparatus, and rendering method and apparatus using the same
JP5299173B2 (en) Image processing apparatus, image processing method, and program
TW486642B (en) Glyph-based outline font generation independent of resolution
US7412360B2 (en) Method and apparatus for shape deformation and placement
CN110009721A (en) Generate the triangle gridding of the image indicated by curve
JP7307194B2 (en) Animation character driving method and its device, equipment and computer program
JPH1049704A (en) Image conversion method
Miranda et al. Sketch express: facial expressions made easy
CN114797109A (en) Object editing method and device, electronic equipment and storage medium
Guo Computer aided design of artistic Chinese characters
JP4706723B2 (en) Method and apparatus for reducing and compiling figures
CN112631322B (en) Method and system for generating performance animation of clustered unmanned aerial vehicle, unmanned aerial vehicle and terminal
CN104143204A (en) Moving least square two-dimensional character deformation method considering topological structure
Xie et al. DragD3D: Vertex-based Editing for Realistic Mesh Deformations using 2D Diffusion Priors
Chen et al. A New Design Method of Mechanical and Electrical Products Appearance Modeling Based on Entity Patterns Gene
TWI723547B (en) Style transfer method and computer program product thereof
Adilbayev et al. OPPORTUNITIES FOR THE USE OF COMPUTER TECHNOLOGY IN THE TEACHING OF LANDSCAPE ARCHITECTURE
Cimen et al. Perceptual caricaturization of 3D models
CN118172496B (en) Three-dimensional reconstruction method, system, medium, device and program product
CN115631091B (en) Selective style migration method and terminal
JP6888411B2 (en) 3D shape data editing device and 3D shape data editing program

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11865896

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11865896

Country of ref document: EP

Kind code of ref document: A1