CN114580350A - Text character labeling method and device, computer equipment and storage medium - Google Patents

Text character labeling method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114580350A
CN114580350A CN202011390663.0A CN202011390663A CN114580350A CN 114580350 A CN114580350 A CN 114580350A CN 202011390663 A CN202011390663 A CN 202011390663A CN 114580350 A CN114580350 A CN 114580350A
Authority
CN
China
Prior art keywords
text
text characters
data
model
labeling
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.)
Pending
Application number
CN202011390663.0A
Other languages
Chinese (zh)
Inventor
尤勇敏
其他发明人请求不公开姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiuling Jiangsu Digital Intelligent Technology Co Ltd
Original Assignee
Jiuling Jiangsu Digital Intelligent Technology Co Ltd
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 Jiuling Jiangsu Digital Intelligent Technology Co Ltd filed Critical Jiuling Jiangsu Digital Intelligent Technology Co Ltd
Priority to CN202011390663.0A priority Critical patent/CN114580350A/en
Publication of CN114580350A publication Critical patent/CN114580350A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/169Annotation, e.g. comment data or footnotes

Landscapes

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

Abstract

The present application relates to the field of computer technologies, and in particular, to a text character labeling method and apparatus, a computer device, and a storage medium. The method comprises the following steps: receiving a character marking request of a terminal, wherein the character marking request carries text characters to be marked and marking positions of the text characters to be marked in a model; according to the text characters to be marked, determining the plane grid data corresponding to the text characters from a character grid database; and rendering the text characters at the labeling positions in the model based on the plane grid data to generate the text characters for labeling the model. By adopting the method, the character rendering and editing capacity can be improved.

Description

Text character labeling method and device, computer equipment and storage medium
Technical Field
The present application relates to the technical field of computer aided design, and in particular, to a text character labeling method, apparatus, computer device, and storage medium.
Background
In the building design and building modeling software, the functions of size marking, word description, annotation, design description and the like all relate to the creation, display, interaction and editing of words, and the display and editing of Chinese words are the basic functions of the building design modeling software.
In a traditional mode, the text display technology of the Web end includes a Document Object Model (HTML DOM), Scalable Vector Graphics (SVG), a text map, and the like, and has the problems of low text rendering performance, difficulty in editing text content, and the like.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a text character labeling method, apparatus, computer device and storage medium capable of improving character rendering and editing capabilities.
A method of text word annotation, the method comprising:
receiving a character marking request of a terminal, wherein the character marking request carries text characters to be marked and marking positions of the text characters to be marked in the three-dimensional model;
according to the text characters to be marked, determining the plane grid data corresponding to the text characters from a character grid database;
and rendering the text characters at the labeling positions in the three-dimensional model based on the plane grid data to generate the text characters for labeling the model.
In one embodiment, the text annotation request further comprises view vertical information;
based on the plane grid data, rendering text characters at the labeling positions in the three-dimensional model, and generating the text characters for labeling the model, wherein the rendering comprises the following steps:
determining a view orientation of the model;
and rendering the text characters at the labeling positions in the model according to the view orientation based on the plane grid data according to the view vertical information to generate the text characters for labeling the model.
In one embodiment, the method further includes:
acquiring the display proportion of the model and the display size requirement of text characters;
determining the display precision of the text characters to be marked based on the display scale and the display size requirement;
determining flat mesh data for a corresponding text word, comprising:
determining the plane grid data of the corresponding text characters according to the display precision;
based on the plane grid data, rendering text characters at the labeling positions in the model, and generating the text characters for labeling the model, wherein the rendering comprises the following steps:
and rendering the text characters at the labeling positions in the model based on the plane grid data corresponding to the display precision to generate the text characters for labeling the model.
In one embodiment, the creation mode of the text grid database includes:
acquiring outline description data of the text words;
determining contour vector data of the corresponding text word according to the contour description data;
generating plane grid data corresponding to the text characters based on the contour vector data;
and storing the plane grid data into a database to generate a character grid database.
In one embodiment, generating planar lattice data corresponding to text words based on the contour vector data comprises:
determining each polygon graphic data forming the text characters according to the contour vector data;
and triangulating the polygonal graphs corresponding to the polygonal graph data to generate plane grid data corresponding to the text characters.
In one embodiment, after determining the polygon data that constitutes the text word, the method includes:
judging whether the corresponding polygonal graphs are intersected or not according to the polygonal graph data;
when the fact that the polygonal graphs are intersected is determined, obtaining polygonal graph data corresponding to the intersected polygonal graphs, and carrying out merging processing to obtain the polygonal graph data after the merging processing;
triangulating the polygonal graphs corresponding to each polygonal graph data to generate planar grid data corresponding to text characters, comprising:
and triangulating the polygonal graphs corresponding to the combined polygonal graph data to generate plane grid data corresponding to the text characters.
In one embodiment, determining contour vector data corresponding to a text word from the contour description data comprises:
and generating contour vector data corresponding to different precision requirements according to the contour description data.
A text word labeling apparatus, the apparatus comprising:
the character marking request receiving module is used for receiving a character marking request of the terminal, wherein the character marking request carries text characters to be marked and marking positions of the text characters to be marked in the model;
the plane grid data acquisition module is used for determining plane grid data of corresponding text characters from the character grid database according to the text characters to be marked;
and the rendering module is used for rendering the text characters at the labeling positions in the model based on the plane grid data to generate the text characters for labeling the model.
A computer device comprising a memory storing a computer program and a processor implementing the steps of the method of any of the embodiments described above when the computer program is executed by the processor.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above embodiments.
According to the text character labeling method, the text character labeling device, the computer equipment and the storage medium, a character labeling request of a terminal is received, the character labeling request carries text characters to be labeled and labeling positions of the text characters to be labeled in a model, then plane grid data corresponding to the text characters are determined from a character grid database according to the text characters to be labeled, rendering of the text characters is carried out at the labeling positions in the model based on the plane grid data, and the text characters used for labeling the model are generated. Therefore, the text characters used for labeling can be determined from the character grid database according to the character labeling request, and the text characters are generated by rendering based on the determined plane grid data, so that the rendering capability and the editing capability of the text characters can be improved.
Drawings
FIG. 1 is a diagram illustrating an exemplary embodiment of a text annotation process;
FIG. 2 is a flowchart illustrating a text annotation process according to an embodiment;
FIG. 3 is a flowchart illustrating the steps of creating a text grid database in one embodiment;
FIG. 4 is a block diagram of an embodiment of a text annotation apparatus;
FIG. 5 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The text character labeling method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. A user generates a character marking request through the terminal 102 and sends the character marking request to the server 104, wherein the character marking request carries text characters to be marked and marking positions of the text characters to be marked in the model. After receiving the text annotation request sent by the terminal 102, the server 104 may determine the planar grid data corresponding to the text from the text grid database according to the text to be annotated. The server 104 may then render the text word at the labeled location in the model based on the flat mesh data, generating the text word for labeling the model. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In an embodiment, as shown in fig. 2, a text word tagging method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
step S202, receiving a character marking request of the terminal, wherein the character marking request carries text characters to be marked and marking positions of the text characters to be marked in the model.
The word annotation request refers to a request for annotating words in the model. The text labeling request can carry the text to be labeled and the labeling position of the text to be labeled in the model.
It will be understood by those skilled in the art that the model described herein is not limited to a three-dimensional model, but may also refer to a planar model, etc., and the present application is not limited thereto. In this embodiment, a user may create a model through a terminal, generate corresponding model data, and request to perform text annotation based on the created model.
In this embodiment, a user may select a text annotation type in a model annotation interface through a terminal, click a corresponding annotation position, and then input text characters to be annotated in a popped-up text input interface.
Further, the terminal generates a corresponding sub-label request based on the input of the user and the selected label position, and sends the sub-label request to the server to request to label the model.
In this embodiment, the text characters may refer to numbers, letters, chinese characters, or special characters, and the like, which is not limited in this application.
And step S204, determining the plane grid data of the corresponding text characters from the character grid database according to the text characters to be labeled.
The text grid database is used for storing plane grid data. The planar mesh data refers to data stored in a mesh form, for example, a planar triangular mesh or the like.
In this embodiment, the server may create, in advance, the planar grid data corresponding to each text word, then store the planar grid data in the database, and establish an association relationship between the text word and the corresponding planar grid data, for example, store the planar grid data in the DB database, and establish an association relationship by using a country code of the text word as an index.
Further, when the server obtains the text characters to be annotated input by the user through the terminal, the server can obtain the plane grid data corresponding to the text characters to be annotated from the database based on the association relationship, and perform subsequent processing.
And S206, rendering the text characters at the labeling positions in the model based on the plane grid data to generate the text characters for labeling the model.
In this embodiment, the server may perform rendering of text characters at a labeling position specified by the character labeling request according to the obtained planar mesh data, so as to obtain the text characters for labeling the model.
Specifically, the server may perform combined rendering on the text characters according to a correspondence relationship between planar grids corresponding to the text characters to form a two-dimensional filling font, so as to generate the text characters for labeling.
In the text character labeling method, a character labeling request of a terminal is received, the character labeling request carries text characters to be labeled and labeling positions of the text characters to be labeled in a model, then plane grid data corresponding to the text characters are determined from a character grid database according to the text characters to be labeled, the text characters are rendered at the labeling positions in the model based on the plane grid data, and the text characters used for labeling the model are generated. Therefore, the text characters used for labeling can be determined from the character grid database according to the character labeling request, and the text characters are generated by rendering based on the determined plane grid data, so that the rendering capability and the editing capability of the text characters can be improved.
In one embodiment, the text annotation request can also include view verticality information.
The view vertical information refers to information whether to be displayed vertically with respect to a view, and may be vertical to the view or not, that is, whether text characters are displayed vertically with respect to the view.
In this embodiment, based on the plane grid data, rendering a text character at a labeling position in the model, and generating the text character labeling the model, may include: determining a view orientation of the model; and rendering the text characters at the labeling positions in the model according to the view orientation based on the plane grid data according to the view vertical information to generate the text characters for labeling the model.
In this embodiment, when the server determines that the text word is displayed perpendicular to the view, the server may determine and retrieve the view orientation of the model and cause the rendered text word to be perpendicular to the view orientation.
Further, when the model undergoes view transformation, the server may re-determine the view orientation of the model, and re-render the text characters according to the determined view orientation.
For example, with the origin of camera coordinates observed by the human eye, the server may determine a vector between the origin of camera coordinates and the annotation location as the view orientation of the model, which is transformed for the model when the model is rotated or moved. Therefore, the server can determine the view orientation of the model in real time according to the change of the model, render the text characters to be perpendicular to the view orientation in real time, and improve the rendering display effect of the text characters.
In the above embodiment, the rendering of the text characters is performed according to the view direction of the model and the view vertical information through the view vertical information, so that the rendered text characters are determined according to the view direction and the view vertical information, and the display effect of the text characters can be improved.
In one embodiment, the method may further include: acquiring the display proportion of the model and the display size requirement of text characters; and determining the display precision of the text characters to be marked based on the display scale and the display size requirement.
The display scale may refer to a display percentage in the model display interface, for example, 50% or 100%.
The display size requirement may refer to a requirement such as a specific font size, for example, a font size of four, or a font size of 10, 11, etc.
In this embodiment, the flat mesh data acquired by the server may be data including different font types, and the server may further acquire a font type requirement, and determine the flat mesh data corresponding to the font type based on the font type requirement, for example, the flat mesh data corresponding to the song style, the clerical script, the microsoft jazz, or the regular script.
In this embodiment, after acquiring the display scale of the model and the display size requirement of the text characters, the server may determine the display precision of the text characters to be labeled according to the actual scale and the size requirement.
In this embodiment, determining the planar lattice data of the corresponding text word from the word lattice database may include: and selecting the plane grid data corresponding to the text characters from the character grid database according to the display precision.
Specifically, the server may select, according to the determined display accuracy and/or font type, the planar mesh data corresponding to the text from the text mesh database, such as the planar mesh data at the ordinary accuracy level, or the planar mesh data at the high accuracy level, or the selected planar mesh data corresponding to song, or the planar mesh data corresponding to microsoft jay black.
In this embodiment, based on the plane grid data, rendering a text character at a labeling position in the model, and generating the text character labeling the model, may include: and rendering the text characters at the labeling positions in the model based on the plane grid data corresponding to the display precision to generate the text characters for labeling the model.
In this embodiment, the server may perform rendering of the text characters based on the obtained planar mesh data to generate corresponding text characters.
In the above embodiment, the display accuracy of the text characters corresponding to the to-be-rendered text characters is determined, the plane grid data of the text characters corresponding to the display accuracy is determined, and the rendering is performed, so that the display effect of the generated text characters can be improved.
In one embodiment, referring to fig. 3, the creation manner of the text mesh database may include:
in step S302, outline description data of the text word is acquired.
The outline description data refers to data describing outline of the text characters, and may be outline description data of a TTF font, for example.
In this embodiment, a text is composed of a plurality of outlines, which may intersect with each other. The outline description data controls lines by points, controls outlines by lines, and composes text words by outlines.
Step S304, determining the contour vector data of the corresponding text word according to the contour description data.
In this embodiment, the server may extract the contour vector data of the corresponding text through a contour extraction function. For example, the server may read the Outline of the text word in the Outline description data by using the Windows API function Get Glyph Outline, and set the parameter uFormat to GGO _ NATIVE to extract the vector data of the text word.
In the present embodiment, the contour vector data are control points describing straight line segments and bezier curves. The origin of coordinates of these points is (0, 0).
In this embodiment, the contour vector data may include vector data of outer and inner contours.
Step S306, generating plane grid data corresponding to the text characters based on the contour vector data.
In this embodiment, the server may store the extracted contour vector data in TTF Polygons, and generate the planar mesh data corresponding to the text characters after merging and subdividing the contour vector data.
And step S308, storing the plane grid data into a database to generate a character grid database.
In this embodiment, after obtaining the plane grid data corresponding to the text characters, the server may store the plane grid data into the database according to the storage requirement, so as to generate the character grid database.
In the above embodiment, the text mesh database is generated by acquiring the outline description data of the text word, determining the outline vector data of the corresponding text word based on the outline description data, generating the plane mesh data of the corresponding text word according to the outline vector data, and storing the plane mesh data in the database. Therefore, the planar grid data of the text characters are generated based on the outline description data, the accuracy of the generated planar grid data is improved, and the accuracy of the generated character grid database can be improved.
In one embodiment, generating planar grid data corresponding to the text word based on the contour vector data may include: determining each polygon graphic data forming the text characters according to the contour vector data; and triangulating the polygonal graphs corresponding to the polygonal graph data to generate plane grid data corresponding to the text characters.
In this embodiment, the text word is composed of at least one polygon, for example, corresponding to the text word "one", which may be composed of one polygon, and for the text word "sh", there may be two polygons.
In this embodiment, the server may determine each polygon data corresponding to the text characters according to the extracted vector data, and then triangulate the polygon corresponding to each polygon data to generate corresponding planar grid data. For example, for the text word "one," it may be split into a plurality of triangles to generate corresponding planar grid data.
In the above embodiment, each piece of polygon graphic data forming a text character is determined according to the contour vector data, and then a polygon corresponding to each piece of polygon graphic data is triangulated, for example, by the ear-cutting method, planar grid data corresponding to the text character is generated, so that each text character can be stored in a planar grid manner, rendering of subsequent text characters is facilitated, and the rendering capability of the text character is improved.
In one embodiment, after determining each polygon of the text characters, the method may further include: judging whether the corresponding polygonal graphs are intersected or not according to the polygonal graph data; and when the intersection exists between the polygonal graphs, acquiring polygonal graph data corresponding to the intersected polygonal graphs, and merging to obtain the merged polygonal graph data.
For example, for the text "xi", there is an intersection of "and" on the left part, an intersection of "and" on the right part, and no intersection of the left part and the right part.
In this embodiment, the server may determine whether intersections exist between polygons based on the obtained polygon data, and for the intersected polygons, acquire corresponding polygon data, and perform merging processing, for example, the text "horizontal" and "horizontal" on the left portion and "horizontal" on the right portion, respectively, to obtain the merged polygon data.
In this embodiment, the server performs merging processing on the polygon data corresponding to the intersected polygons, and may obtain the merged polygon data through boolean merge operation or the like.
In this embodiment, triangulating the polygon corresponding to each polygon data to generate the planar mesh data corresponding to the text characters may include: and triangulating the polygonal graphs corresponding to the polygonal graph data after the merging processing to generate plane grid data corresponding to the text characters.
Specifically, the server may triangulate the combined polygonal figure to generate planar mesh data corresponding to the text characters.
In the above embodiment, by determining whether intersections exist between the polygonal graphs, merging the polygonal graph data corresponding to the intersected polygonal graphs, and then performing triangulation, the accuracy of the planar grid data obtained after triangulation can be improved, and the accuracy of text characters rendered based on the planar grid data can be improved.
In one embodiment, determining contour vector data corresponding to the text word from the contour description data may include: and generating contour vector data corresponding to different precision requirements according to the contour description data.
In this embodiment, the server may generate profile vector data corresponding to different precision requirements according to different precision requirements for the profile description data in the TTF Polygons, for example, generate different vector data according to different precision requirements for the bezier curve in the profile description data.
In the above embodiment, by generating the contour vector data corresponding to different precision requirements, when text characters are rendered subsequently, selection can be performed according to the corresponding display precision, so as to improve the display rendering effect of the text characters.
It should be understood that although the various steps in the flowcharts of fig. 2-3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 4, there is provided a text character labeling apparatus, including: a text annotation request receiving module 100, a planar grid data obtaining module 200, and a rendering module 300, wherein:
the text annotation request receiving module 100 is configured to receive a text annotation request of a terminal, where the text annotation request carries text characters to be annotated and annotation positions of the text characters to be annotated in the model.
The plane grid data obtaining module 200 is configured to determine, according to a text word to be labeled, plane grid data corresponding to the text word from a word grid database.
And a rendering module 300, configured to render text characters at the labeled positions in the model based on the planar grid data, so as to generate text characters for labeling the model.
In one embodiment, the text annotation request can also include view vertical information.
In this embodiment, the rendering module 300 may include:
and the orientation determination submodule is used for determining the view orientation of the model.
And the rendering submodule is used for rendering the text characters at the labeling positions in the model according to the view orientation on the basis of the plane grid data according to the view vertical information to generate the text characters for labeling the model.
In one embodiment, the apparatus may further include:
and the display scale and display size requirement module is used for acquiring the display scale of the model and the display size requirement of the text characters.
And the display precision determining module is used for determining the display precision of the corresponding text characters to be marked based on the display scale and the display size requirement.
In this embodiment, the planar grid data obtaining module 200 is configured to determine planar grid data corresponding to text characters according to the display precision.
In this embodiment, the rendering module 300 is configured to render text characters at a labeled position in the model based on the planar grid data corresponding to the display accuracy, so as to generate the text characters for labeling the model.
In one embodiment, the apparatus may further include:
and the outline description data acquisition module is used for acquiring the outline description data of the text words.
And the contour vector data acquisition module is used for determining the contour vector data of the corresponding text word according to the contour description data.
And the plane grid data generation module is used for generating plane grid data corresponding to the text characters based on the contour vector data.
And storing the plane grid data into a database to generate a character grid database.
In one embodiment, generating planar lattice data corresponding to text words based on the contour vector data comprises:
determining each polygon graphic data forming the text characters according to the contour vector data;
and triangulating the polygonal graphs corresponding to the polygonal graph data to generate plane grid data corresponding to the text characters.
In one embodiment, after determining the polygon data that constitutes the text word, the method includes:
judging whether the corresponding polygonal graphs are intersected or not according to the polygonal graph data;
when the fact that the polygonal graphs are intersected is determined, obtaining polygonal graph data corresponding to the intersected polygonal graphs, and carrying out merging processing to obtain the polygonal graph data after the merging processing;
triangulating the polygonal graphs corresponding to each polygonal graph data to generate planar grid data corresponding to text characters, including:
and triangulating the polygonal graphs corresponding to the combined polygonal graph data to generate plane grid data corresponding to the text characters.
In one embodiment, determining contour vector data corresponding to a text word from the contour description data comprises:
and generating contour vector data corresponding to different precision requirements according to the contour description data.
For the specific limitations of the text character labeling apparatus, reference may be made to the above limitations on the text character labeling method, which is not described herein again. All or part of the modules in the text character labeling device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 5. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing data such as character marking requests, plane grid data, text characters and the like. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of text word labeling.
Those skilled in the art will appreciate that the architecture shown in fig. 5 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: receiving a character marking request of a terminal, wherein the character marking request carries text characters to be marked and marking positions of the text characters to be marked in a model; according to the text characters to be marked, determining the plane grid data corresponding to the text characters from a character grid database; and rendering the text characters at the labeling positions in the model based on the plane grid data to generate the text characters for labeling the model.
In one embodiment, the text annotation request can also include view vertical information.
In this embodiment, when the processor executes the computer program, rendering a text word at a labeling position in the model based on the planar grid data, and generating the text word for labeling the model may include: determining a view orientation of the model; and rendering the text characters at the labeling positions in the model according to the view orientation based on the plane grid data according to the view vertical information to generate the text characters for labeling the model.
In one embodiment, the processor, when executing the computer program, may further implement the following steps: acquiring the display proportion of the model and the display size requirement of text characters; and determining the display precision of the text characters to be marked based on the display scale and the display size requirement.
In this embodiment, the determining the planar grid data of the corresponding text word when the processor executes the computer program may include: and determining the plane grid data corresponding to the text characters according to the display precision.
In this embodiment, when the processor executes the computer program, rendering a text word at a labeling position in the model based on the planar grid data, and generating the text word for labeling the model may include: and rendering the text characters at the labeling positions in the model based on the plane grid data corresponding to the display precision to generate the text characters for labeling the model.
In one embodiment, the manner of creating the text mesh database when the processor executes the computer program may include: acquiring outline description data of the text words; determining outline vector data of the corresponding text word according to the outline description data; generating plane grid data corresponding to the text characters based on the contour vector data; and storing the plane grid data into a database to generate a character grid database.
In one embodiment, the processor, when executing the computer program, implements generating planar mesh data corresponding to the text word based on the contour vector data, and may include: determining each polygon graphic data forming the text characters according to the contour vector data; and triangulating the polygonal graphs corresponding to the polygonal graph data to generate plane grid data corresponding to the text characters.
In one embodiment, after the processor executes the computer program to determine the polygon data that constitutes the text word, the following steps may be further implemented: judging whether the corresponding polygonal graphs are intersected or not according to the polygonal graph data; and when the intersection exists between the polygonal graphs, acquiring polygonal graph data corresponding to the intersected polygonal graphs, and merging to obtain the merged polygonal graph data.
In this embodiment, the triangulating, by the processor when executing the computer program, the polygon corresponding to each polygon data to generate the planar grid data corresponding to the text characters may include: and triangulating the polygonal graphs corresponding to the combined polygonal graph data to generate plane grid data corresponding to the text characters.
In one embodiment, the processor, when executing the computer program, determines contour vector data corresponding to the text word from the contour description data may include: and generating contour vector data corresponding to different precision requirements according to the contour description data.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, performs the steps of: receiving a character marking request of a terminal, wherein the character marking request carries text characters to be marked and marking positions of the text characters to be marked in a model; according to the text characters to be marked, determining the plane grid data corresponding to the text characters from a character grid database; and rendering the text characters at the labeling positions in the model based on the plane grid data to generate the text characters for labeling the model.
In one embodiment, the text annotation request can also include view vertical information.
In this embodiment, the computer program, when executed by a processor, for performing rendering of a text word at a labeling position in a model based on planar grid data, and generating the text word for labeling the model, may include: determining a view orientation of the model; and rendering the text characters at the labeling positions in the model according to the view orientation based on the plane grid data according to the view vertical information to generate the text characters for labeling the model.
In one embodiment, the computer program when executed by the processor may further implement the steps of: acquiring the display proportion of the model and the display size requirement of text characters; and determining the display precision of the text characters to be marked based on the display scale and the display size requirement.
In this embodiment, the computer program, when executed by the processor, for determining the planar grid data corresponding to the text word may include: and determining the plane grid data corresponding to the text characters according to the display precision.
In this embodiment, the computer program, when executed by a processor, for performing rendering of a text word at a labeling position in a model based on planar grid data, and generating the text word for labeling the model, may include: and rendering the text characters at the labeling positions in the model based on the plane grid data corresponding to the display precision to generate the text characters for labeling the model.
In one embodiment, the manner in which the computer program is executed by the processor to implement creation of the text mesh database may include: acquiring outline description data of the text words; determining contour vector data of the corresponding text word according to the contour description data; generating plane grid data corresponding to the text characters based on the contour vector data; and storing the plane grid data into a database to generate a character grid database.
In one embodiment, the computer program when executed by the processor for performing generating planar lattice data for a corresponding text word based on the contour vector data may include: determining each polygon graphic data forming the text characters according to the contour vector data; and triangulating the polygonal graphs corresponding to the polygonal graph data to generate plane grid data corresponding to the text characters.
In one embodiment, after the computer program is executed by the processor to determine the polygon data that constitutes the text word, the following steps may be further implemented: judging whether corresponding polygonal graphs are intersected or not according to the polygonal graph data; and when the intersection exists between the polygonal graphs, acquiring polygonal graph data corresponding to the intersected polygonal graphs, and merging to obtain the merged polygonal graph data.
In this embodiment, the performing, by the processor, a triangulation of a polygon corresponding to each polygon data to generate planar mesh data of a corresponding text character may include: and triangulating the polygonal graphs corresponding to the combined polygonal graph data to generate plane grid data corresponding to the text characters.
In one embodiment, the computer program when executed by the processor for performing the determining of contour vector data corresponding to a text word from the contour description data may comprise: and generating contour vector data corresponding to different precision requirements according to the contour description data.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A text character labeling method is characterized by comprising the following steps:
receiving a character marking request of a terminal, wherein the character marking request carries text characters to be marked and marking positions of the text characters to be marked in a model;
according to the text characters to be marked, determining plane grid data corresponding to the text characters from a character grid database;
and rendering text characters at the labeling positions in the model based on the plane grid data to generate the text characters for labeling the model.
2. The method of claim 1, wherein the text annotation request further comprises view vertical information;
the rendering of text characters at the labeling positions in the model based on the planar grid data to generate the text characters for labeling the model includes:
determining a view orientation of the model;
and rendering text characters at the labeling positions in the model according to the view direction based on the plane grid data according to the view vertical information to generate the text characters for labeling the model.
3. The method of claim 1, further comprising:
acquiring the display proportion of the model and the display size requirement of the text characters;
determining the display precision corresponding to the text characters to be marked based on the display proportion and the display size requirement;
the determining planar lattice data corresponding to the text word from the word lattice database includes:
according to the display precision, selecting plane grid data corresponding to the text characters from a character grid database;
the rendering of text characters at the labeling positions in the model based on the planar grid data to generate the text characters for labeling the model includes:
and rendering text characters at the labeling positions in the model based on the plane grid data corresponding to the display precision to generate the text characters for labeling the model.
4. The method of any one of claims 1 to 3, wherein the text mesh database is created in a manner that includes:
acquiring outline description data of the text words;
determining outline vector data corresponding to the text characters according to the outline description data;
generating plane grid data corresponding to the text characters based on the contour vector data;
and storing the plane grid data into a database to generate a character grid database.
5. The method of claim 4, wherein generating planar lattice data corresponding to the text word based on the contour vector data comprises:
determining each multi-edge graphic data forming the text characters according to the contour vector data;
and triangulating the polygonal graphs corresponding to the polygonal graph data to generate plane grid data corresponding to the text characters.
6. The method of claim 5, wherein determining the polygon graphical data that comprises the text word comprises:
judging whether corresponding polygonal graphs are intersected or not according to the polygonal graph data;
when the fact that the polygonal graphs intersect is determined, obtaining polygonal graph data corresponding to the intersected polygonal graphs, and carrying out merging processing to obtain the merged polygonal graph data;
the triangulating the polygonal graphs corresponding to the polygonal graph data to generate planar grid data corresponding to the text characters includes:
and triangulating the polygonal graphs corresponding to the polygonal graph data after the merging processing to generate the planar grid data corresponding to the text characters.
7. The method of claim 4, wherein said determining contour vector data corresponding to said text word from said contour description data comprises:
and generating contour vector data corresponding to different precision requirements according to the contour description data.
8. A text character labeling apparatus, said apparatus comprising:
the character marking request receiving module is used for receiving a character marking request of a terminal, wherein the character marking request carries text characters to be marked and marking positions of the text characters to be marked in the model;
the planar grid data acquisition module is used for determining planar grid data corresponding to the text characters from a character grid database according to the text characters to be marked;
and the rendering module is used for rendering text characters at the labeling positions in the model based on the plane grid data to generate the text characters for labeling the model.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202011390663.0A 2020-12-02 2020-12-02 Text character labeling method and device, computer equipment and storage medium Pending CN114580350A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011390663.0A CN114580350A (en) 2020-12-02 2020-12-02 Text character labeling method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011390663.0A CN114580350A (en) 2020-12-02 2020-12-02 Text character labeling method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114580350A true CN114580350A (en) 2022-06-03

Family

ID=81767405

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011390663.0A Pending CN114580350A (en) 2020-12-02 2020-12-02 Text character labeling method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114580350A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116362202A (en) * 2023-06-01 2023-06-30 合肥高维数据技术有限公司 Font generation method, storage medium and electronic device
CN116385599A (en) * 2023-03-27 2023-07-04 小米汽车科技有限公司 Text interaction method, text interaction device, electronic equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116385599A (en) * 2023-03-27 2023-07-04 小米汽车科技有限公司 Text interaction method, text interaction device, electronic equipment and storage medium
CN116385599B (en) * 2023-03-27 2024-01-30 小米汽车科技有限公司 Text interaction method, text interaction device, electronic equipment and storage medium
CN116362202A (en) * 2023-06-01 2023-06-30 合肥高维数据技术有限公司 Font generation method, storage medium and electronic device
CN116362202B (en) * 2023-06-01 2023-08-11 合肥高维数据技术有限公司 Font generation method, storage medium and electronic device

Similar Documents

Publication Publication Date Title
US11182941B2 (en) Aligning objects with text
CN110852949B (en) Point cloud data completion method and device, computer equipment and storage medium
CN111428457B (en) Automatic formatting of data tables
CN113010937B (en) Parametric modeling method of member section steel bar and related device
US10970458B1 (en) Logical grouping of exported text blocks
CN113094770B (en) Drawing generation method and device, computer equipment and storage medium
CN114580350A (en) Text character labeling method and device, computer equipment and storage medium
KR20060047436A (en) Method, computer program product and data structure for representing two- or three-dimensional object
CN112965645B (en) Page dragging method and device, computer equipment and storage medium
CN111310254B (en) CAD legend identification method and device, storage medium and electronic equipment
CN111325663B (en) Three-dimensional point cloud matching method and device based on parallel architecture and computer equipment
CN114648615B (en) Method, device and equipment for controlling interactive reproduction of target object and storage medium
US20220292795A1 (en) Face image processing method, electronic device, and storage medium
CN116630468A (en) Two-dimensional drawing generation method and device, storage medium and electronic equipment
CN112365590A (en) Drawing generation method and device, computer equipment and storage medium
CN114581639A (en) Method for generating information of beam steel bars in BIM (building information modeling) model based on beam leveling construction drawing
CN114565703A (en) Method, device and equipment for adjusting centralized labeling and readable storage medium
CN113129362B (en) Method and device for acquiring three-dimensional coordinate data
CN112861481A (en) Paging processing method and device, electronic equipment and computer readable storage medium
CN110728736A (en) Picture labeling method and device, computer equipment and storage medium
CN113641284B (en) Regional plotting method and device of electronic map, electronic equipment and storage medium
CN115249303A (en) Layout drawing method, device, equipment and storage medium based on drawing segmentation
JP2008533614A (en) System and method for generating matched contour profiles
CN111145583B (en) Parking space model checking method and device, computer equipment and storage medium
CN115601512B (en) Interactive three-dimensional reconstruction method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination